Traffic light detection method and device for automatic driving

By fitting the relative distance and angle between the vehicle and the traffic light in the world coordinate system, the pixel coordinates of the traffic light are directly determined, solving the problems of cumbersome coordinate system conversion and large errors in the existing technology, and achieving more efficient traffic light detection.

CN118570762AActive Publication Date: 2024-08-30BEIJING QINGFENG ZHIXING TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410613464.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-08-30
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

In the existing technology, traffic light recognition is affected by lighting conditions, camera angle of view and surrounding environment. The coordinate system conversion process is cumbersome and has large errors, which affects the accuracy and efficiency of recognition.

Method used

By collecting the relative distance and angle between the vehicle and the traffic light in the world coordinate system, the linear functional relationship between the relative distance and the pixel coordinates is obtained by fitting, and the pixel coordinates of the traffic light in the image are directly determined, avoiding the complex coordinate system conversion process.

Benefits of technology

The accuracy and efficiency of traffic light detection are improved, errors are reduced, and the detection process is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570762A
    Figure CN118570762A
Patent Text Reader

Abstract

The invention discloses a traffic light detection method and device for automatic driving, and the method comprises the steps: collecting vehicle position information, traffic light position information and a vehicle course angle in a world coordinate system, and calculating the relative distance and relative angle between a vehicle and a traffic light in the world coordinate system; determining the pixel coordinates of the traffic light in the image based on the relative distance and the relative angle between the vehicle and the traffic light in the world coordinate system according to a pre-configured function relationship; determining a traffic light detection area according to the pixel coordinates of the traffic light in the image; wherein the function relation is obtained by fitting the relative distance data, the relative angle data and the pixel coordinates of the traffic light in the image, which are obtained in advance. By adopting the scheme provided by the invention, the world coordinate of the traffic light does not need to be converted to the pixel coordinate of the image shot by the camera by using a coordinate system conversion technology, so that a complex coordinate conversion process is not needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of autonomous driving, and in particular to a traffic light detection method and device for autonomous driving. Background Art

[0002] Traffic light detection is a crucial task in the field of autonomous driving. In order to ensure the safe driving of vehicles, it is necessary to be able to accurately detect and identify traffic light signals on the road. However, traffic light recognition is affected by many factors, such as lighting conditions, camera viewing angle, surrounding environment, etc. Therefore, effectively determining the region of interest (ROI) is crucial to improving the accuracy and efficiency of traffic light recognition algorithms.

[0003] In the prior art, coordinate system conversion technology is used to convert the world coordinates of the traffic light to the pixel coordinates of the image taken by the camera, so as to determine the region of interest of the image. However, this method is cumbersome and is greatly affected by errors in the process of converting multiple coordinate systems. Summary of the invention

[0004] The object of the present invention is to provide a traffic light detection method and device for autonomous driving to overcome or at least alleviate at least one of the above-mentioned defects of the prior art.

[0005] To achieve the above object, the present invention provides a traffic light detection method for autonomous driving, which is applied to an autonomous driving vehicle equipped with a camera, comprising:

[0006] Collect vehicle position information, traffic light position information, and vehicle heading angle in the world coordinate system, and calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system;

[0007] According to a functional relationship between a relative angle between the vehicle and the traffic light in a preconfigured world coordinate system and a pixel coordinate x of the traffic light in the image, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system;

[0008] Determine the pixel coordinate y of the traffic light in the image based on the relative distance between the vehicle and the traffic light in the world coordinate system according to a functional relationship between the relative distance between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image;

[0009] Determine the traffic light detection area according to the pixel coordinates x and y of the traffic light in the image;

[0010] The first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image.

[0011] Preferably, calculating the relative distance between the vehicle and the traffic light in the world coordinate system includes:

[0012] The relative distance between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0013]

[0014] Among them, point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

[0015] Preferably, calculating the relative angle between the vehicle and the traffic light in the world coordinate system includes:

[0016] The relative angle between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0017] angle = arctan2(y A -y B ,x A -x B )*180 / π+360-yaw

[0018] Among them, yaw is the heading angle of the vehicle.

[0019] Preferably, the first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image, including:

[0020] Pre-collect the vehicle position information, traffic light position information, vehicle heading angle, and pixel coordinates of the traffic light in the image in the world coordinate system;

[0021] Calculate relative distance data and relative angle data;

[0022] According to the relative distance data and the pixel coordinate y, a linear function relationship between the pixel coordinate y and the relative distance is obtained;

[0023] The linear function relationship between the pixel coordinate x and the relative angle is obtained by fitting the relative angle data and the pixel coordinate x.

[0024] Preferably, the functional relationship between the pixel coordinate x of the traffic light and the relative angle is angle=k1x+b1;

[0025] The linear function relationship between the pixel coordinate y of the traffic light and the relative distance is dist = k2y + b2;

[0026] Among them, k1, b1, k2 and b2 are constants.

[0027] Preferably, the function relationship 1 and the function relationship 2 are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image, including: when the relative distance between the vehicle and the traffic light is less than a first threshold and greater than a second threshold, the relative distance data and the relative angle data are calculated based on the collected data, and the function relationship 1 and the function relationship 2 are obtained by fitting;

[0028] According to a preconfigured functional relationship 1 between the relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinate x of the traffic light in the image, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system, comprising: when the relative distance between the vehicle and the traffic light is less than a second threshold, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to the functional relationship 1;

[0029] According to a second functional relationship between the relative distance between the vehicle and the traffic light in a preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system, including: when the relative distance between the vehicle and the traffic light is less than a second threshold, according to the second functional relationship, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system.

[0030] The present invention also provides a traffic light detection device for autonomous driving, which is applied to an autonomous driving vehicle equipped with a camera, comprising:

[0031] The acquisition module is used to collect vehicle position information, traffic light position information, and vehicle heading angle in the world coordinate system;

[0032] The processing module is used to: calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system; determine the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to the first function relationship between the relative angle between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate x of the traffic light in the image; determine the pixel coordinate y of the traffic light in the image based on the relative distance between the vehicle and the traffic light in the world coordinate system according to the second function relationship between the relative distance between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image;

[0033] A detection module, used to determine a traffic light detection area according to pixel coordinates x and y of the traffic light in the image;

[0034] The first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image.

[0035] Preferably, the processing module is used to:

[0036] The relative distance between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0037]

[0038] Among them, point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

[0039] Preferably, the processing module is used to:

[0040] The relative angle between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0041] angle = arctan2(y A -y B ,x A -x B )*180 / π+360-yaw

[0042] Among them, yaw is the heading angle of the vehicle.

[0043] Preferably, the acquisition module is further used to: pre-acquire vehicle position information, traffic light position information, vehicle heading angle, and pixel coordinates of the traffic light in the image in a world coordinate system;

[0044] The device also includes a fitting module for:

[0045] Calculate the relative distance data and relative angle data in the world coordinate system;

[0046] According to the relative distance data and the pixel coordinate y, a linear function relationship between the pixel coordinate y and the relative distance is obtained;

[0047] The linear function relationship between the pixel coordinate x and the relative angle is obtained by fitting the relative angle data and the pixel coordinate x.

[0048] The present invention adopts the above technical solution, which has the following advantages:

[0049] In the solution provided by the embodiment of the present invention, the plane coordinates of the vehicle and the traffic light and the heading angle of the vehicle in the world coordinate system are used to calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system, and then the corresponding relationship between the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinates of the traffic light in the image is obtained by fitting. There is no need to use coordinate system conversion technology to convert the world coordinates of the traffic light into the pixel coordinates of the image taken by the camera, so there is no need for a complicated coordinate conversion process, and a new solution for determining the pixel coordinates of the traffic light is provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A flow chart of a traffic light detection method for autonomous driving provided in an embodiment of the present invention.

[0051] Figure 2 A flow chart of a traffic light detection method for autonomous driving provided as an example of the present invention.

[0052] Figure 3 A schematic diagram showing the result of fitting the relative angle data and the pixel coordinate x in an embodiment of the present invention is shown.

[0053] Figure 4 A schematic diagram showing the result of fitting the relative angle data and the pixel coordinate y in an embodiment of the present invention is shown.

[0054] Figure 5 A schematic diagram of the structure of a traffic light detection device for autonomous driving provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0055] In the drawings, the same or similar reference numerals are used to represent the same or similar elements or elements with the same or similar functions. The embodiments of the present invention are described in detail below in conjunction with the drawings.

[0056] In the description of the present invention, the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the scope of protection of the present invention.

[0057] In the absence of conflict, the technical features in the various embodiments and implementations of the present invention may be combined with each other and are not limited to the embodiments or implementations to which the technical features are applied.

[0058] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. It should be pointed out that the technical solution and design principle of the present invention are described in detail below only with an optimized technical solution, but the protection scope of the present invention is not limited to this.

[0059] The following terms are involved in this article. For ease of understanding, their meanings are explained as follows. Those skilled in the art should understand that the following terms may also have other names, but without departing from their meanings, any other names should be considered consistent with the terms listed in this article.

[0060] The embodiment of the present invention provides a traffic light detection method for autonomous driving, which is applied to an autonomous driving vehicle equipped with a camera, such as Figure 1 As shown, the method includes:

[0061] Step 101 , collecting vehicle position information, traffic light position information, and vehicle heading angle in a world coordinate system, and calculating a relative distance and a relative angle between the vehicle and the traffic light in the world coordinate system.

[0062] Among them, calculating the relative distance between the vehicle and the traffic light in the world coordinate system includes:

[0063] The relative distance between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0064]

[0065] Among them, point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

[0066] Among them, calculating the relative angle between the vehicle and the traffic light in the world coordinate system includes:

[0067] The relative angle between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0068] angle = arctan2(y A -y B ,x A -x B )*180 / π+360-yaw

[0069] Among them, yaw is the heading angle of the vehicle.

[0070] Step 102, according to a preconfigured functional relationship between the relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinate x of the traffic light in the image, determine the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system.

[0071] Step 103, according to the second functional relationship between the relative distance between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system.

[0072] Step 104 , determining a traffic light detection area according to pixel coordinates x and y of the traffic light in the image.

[0073] The first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image.

[0074] The function relationship 1 and the function relationship 2 are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image, and include:

[0075] Pre-collect the vehicle position information, traffic light position information, vehicle heading angle, and pixel coordinates of the traffic light in the image in the world coordinate system;

[0076] Calculate relative distance data and relative angle data;

[0077] According to the relative distance data and the pixel coordinate y, a linear function relationship between the pixel coordinate y and the relative distance is obtained;

[0078] The linear function relationship between the pixel coordinate x and the relative angle is obtained by fitting the relative angle data and the pixel coordinate x.

[0079] The functional relationship between the pixel coordinate x of the traffic light and the relative angle is angle=k1x+b1, and the linear functional relationship between the pixel coordinate y of the traffic light and the relative distance is dist=k2y+b2; wherein k1, b1, k2 and b2 are constants.

[0080] In one embodiment, the function relationship 1 and the function relationship 2 are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image, including: when the relative distance between the vehicle and the traffic light is less than a first threshold and greater than a second threshold, the relative distance data and the relative angle data are calculated based on the collected data, and the function relationship 1 and the function relationship 2 are obtained by fitting;

[0081] According to a preconfigured functional relationship 1 between the relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinate x of the traffic light in the image, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system, comprising: when the relative distance between the vehicle and the traffic light is less than a second threshold, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to the functional relationship 1;

[0082] According to a second functional relationship between the relative distance between the vehicle and the traffic light in a preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system, including: when the relative distance between the vehicle and the traffic light is less than a second threshold, according to the second functional relationship, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system.

[0083] In the method provided by the embodiment of the present invention, the plane coordinates of the vehicle and the traffic light and the heading angle of the vehicle in the world coordinate system are used to calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system, and then the corresponding relationship between the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinates of the traffic light in the image is obtained by fitting. There is no need to use coordinate system conversion technology to convert the world coordinates of the traffic light into the pixel coordinates of the image taken by the camera, so there is no need for a complicated coordinate conversion process, and a new solution for determining the pixel coordinates of the traffic light is provided.

[0084] The following is an example to illustrate the traffic light detection method for autonomous driving provided by the present invention. Figure 2 As shown, the method includes:

[0085] Step 201: data collection and calculation.

[0086] By collecting rich data, the algorithm can better fit the position of traffic lights in the image at different distances and angles, thereby improving accuracy and robustness.

[0087] For different types of vehicles, data collection can be performed separately, so that fitting can be performed separately for different types of vehicles to obtain fitting results for different types of vehicles.

[0088] Use a vehicle equipped with a high-resolution camera to record the sensor data at different distances from the target traffic light (including the world coordinates of the vehicle, the heading angle yaw of the vehicle, the pixel coordinates of the traffic light in the image, etc.). The location information of the traffic light can be obtained in advance based on the GPS map information.

[0089] Data collection needs to be performed within a specified driving range, such as less than 200m, in order to meet the needs of detecting traffic lights during actual driving.

[0090] After obtaining the world coordinates of the vehicle, the heading angle yaw of the vehicle, and the world coordinate position information of the traffic light, the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system can be calculated.

[0091] For example, the location information of the next traffic light can be obtained based on the pre-collected GPS map information, and the relative distance between the vehicle and the traffic light ahead can be calculated in real time by combining the high-precision positioning GPS / IMU device of the vehicle.

[0092] Assume that point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system. In this example, the height coordinates of the traffic light and the vehicle are not needed. The relative distance between the vehicle and the traffic light in the world coordinate system can be calculated by the following formula (1):

[0093]

[0094] Among them, point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

[0095] The relative angle between the vehicle and the traffic light in the world coordinate system can be calculated according to the following formula (2):

[0096] angle = arctan2(y A -y B ,x A -x B )*180 / π+360-yaw (2)

[0097] Among them, yaw is the heading angle of the vehicle.

[0098] Step 202: data fitting.

[0099] After the calculation in step 201, the relative angle between the vehicle and the traffic light in the world coordinate system and the relative distance between the vehicle and the traffic light in the world coordinate system are obtained, and the pixel coordinates x and y of the traffic light in the image have been collected, so the fitting operation can be performed.

[0100] Figure 3 FIG. 4 is a schematic diagram showing the result of fitting the relative angle data and the pixel coordinate x. Figure 3 As shown, according to the relative angle data and the pixel coordinate x, a linear function relationship between the pixel coordinate x and the relative angle is obtained: angle=k1x+b1, where k1 and b1 are constants.

[0101] Figure 4 FIG. 4 is a schematic diagram showing the result of fitting the relative angle data and the pixel coordinate y. Figure 4 As shown, the linear function relationship between the pixel coordinate y and the relative angle is obtained by fitting the relative angle data and the pixel coordinate y: dist=k2y+b2, where k2 and b2 are constants.

[0102] Step 203, deployment on board.

[0103] When the vehicle is driving automatically, the telephoto camera installed on the vehicle is responsible for capturing the environmental information far ahead. Within the specified driving range, the location information of the next traffic light is obtained based on the pre-collected GPS map information, and combined with the vehicle's high-precision positioning GPS / IMU device, the relative distance between the vehicle and the traffic light ahead is calculated in real time.

[0104] When the relative distance between the vehicle and the traffic light in front meets certain conditions (such as less than 200m), the relative angle and relative distance between the vehicle and the traffic light in front are calculated simultaneously. The function obtained by fitting in step 202 is used to obtain the pixel x and pixel y of the traffic light in the photo in the world coordinate system. A certain area is demarcated with the coordinate point (x, y) as the center, which is the area of ​​interest. The traffic light detection is performed on the area of ​​interest to obtain the traffic light detection result. For example, the target detection algorithm outputs all the traffic light information in the image, and combines the area of ​​interest to obtain the final recognition result.

[0105] In one implementation of the present invention, a fitting process may be performed in advance for each traffic light to obtain a fitting function corresponding to each traffic light. In other words, each traffic light corresponds to its fitting function, and different traffic lights may correspond to different fitting functions.

[0106] In one implementation of the embodiment of the present invention, the process of the vehicle performing fitting includes:

[0107] The vehicle performs data collection and fitting processes before the distance threshold, and determines the pixel coordinates of the traffic light in the image according to the function relationship 1 and the function relationship 2 obtained by fitting after the distance threshold.

[0108] For example, the distance threshold is 100 meters, and the vehicle performs data collection and fitting processing between 200 meters and 100 meters. By setting the data collection frequency, the data required for fitting is obtained. The relative angle and relative distance between the vehicle and the traffic light in front are calculated with reference to the above method, and the linear function relationship between the pixel coordinate x and the relative angle, and the linear function relationship between the pixel coordinate y and the relative angle are obtained based on the pixel coordinates of the traffic light in the photo in the world coordinate system. After entering the 100-meter range, the vehicle calculates the relative angle and relative distance between the vehicle and the traffic light in front based on the data collected in real time, and determines the pixel coordinates x and y of the traffic light in the photo based on the fitting results.

[0109] The embodiment of the present invention also provides a traffic light detection device for autonomous driving, which is applied to an autonomous driving vehicle equipped with a camera, such as Figure 5 As shown, including:

[0110] The acquisition module 51 is used to acquire vehicle position information, traffic light position information, and vehicle heading angle in the world coordinate system;

[0111] The processing module 52 is used to: calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system; determine the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to a preconfigured functional relationship 1 between the relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinate x of the traffic light in the image; determine the pixel coordinate y of the traffic light in the image based on the relative distance between the vehicle and the traffic light in the world coordinate system according to a preconfigured functional relationship 2 between the relative distance between the vehicle and the traffic light in the world coordinate system and the pixel coordinate y of the traffic light in the image;

[0112] A detection module 53, for determining a traffic light detection area according to pixel coordinates x and y of the traffic light in the image;

[0113] The first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image.

[0114] The processing module 52 may be used for:

[0115] The relative distance between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0116]

[0117] Among them, point A (x A ,x B ) and point B (y A ,y B) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

[0118] The processing module 52 may be used for:

[0119] The relative angle between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula:

[0120] angle = arctan2(y A -y B ,x A -x B )*180 / π+360-yaw

[0121] Among them, yaw is the heading angle of the vehicle.

[0122] The acquisition module 51 may also be used to: pre-acquire vehicle position information, traffic light position information, vehicle heading angle, and pixel coordinates of traffic lights in the image in the world coordinate system;

[0123] It also includes a fitting module 54 for:

[0124] Calculate the relative distance data and relative angle data in the world coordinate system;

[0125] According to the relative distance data and the pixel coordinate y, a linear function relationship between the pixel coordinate y and the relative distance is obtained;

[0126] The linear function relationship between the pixel coordinate x and the relative angle is obtained by fitting the relative angle data and the pixel coordinate x.

[0127] Among them, the functional relationship between the pixel coordinate x of the traffic light and the relative angle is angle=k1x+b1; the linear functional relationship between the pixel coordinate y of the traffic light and the relative distance is dist=k2y+b2; among them, k1, b1, k2 and b2 are constants.

[0128] The fitting module 54 may be used for:

[0129] When the relative distance between the vehicle and the traffic light is less than the first threshold and greater than the second threshold, relative distance data and relative angle data are calculated based on the collected data, and functional relationship 1 and functional relationship 2 are obtained by fitting;

[0130] When the relative distance between the vehicle and the traffic light is less than a second threshold, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to functional relationship 1;

[0131] When the relative distance between the vehicle and the traffic light is less than the second threshold, according to functional relationship 2, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system.

[0132] In the solution provided by the embodiment of the present invention, the plane coordinates of the vehicle and the traffic light and the heading angle of the vehicle in the world coordinate system are used to calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system, and then the corresponding relationship between the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinates of the traffic light in the image is obtained by fitting. There is no need to use coordinate system conversion technology to convert the world coordinates of the traffic light into the pixel coordinates of the image taken by the camera, so there is no need for a complicated coordinate conversion process, and a new solution for determining the pixel coordinates of the traffic light is provided.

[0133] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Those skilled in the art should understand that the technical solutions described in the above embodiments may be modified, or some of the technical features thereof may be replaced by equivalents; these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A traffic light detection method for autonomous driving, applied to an autonomous driving vehicle equipped with a camera, characterized in that: include: Collect vehicle position information, traffic light position information, and vehicle heading angle in the world coordinate system, and calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system; According to a functional relationship between a relative angle between the vehicle and the traffic light in a preconfigured world coordinate system and a pixel coordinate x of the traffic light in the image, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system; Determine the pixel coordinate y of the traffic light in the image based on the relative distance between the vehicle and the traffic light in the world coordinate system according to a functional relationship between the relative distance between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image; Determine the traffic light detection area according to the pixel coordinates x and y of the traffic light in the image; The first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image.

2. The traffic light detection method for autonomous driving according to claim 1, characterized in that: Calculating the relative distance between the vehicle and the traffic light in the world coordinate system includes: The relative distance between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula: Among them, point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

3. The traffic light detection method for autonomous driving according to claim 2, characterized in that: Calculating the relative angle between the vehicle and the traffic light in the world coordinate system includes: The relative angle between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula: angle=arctan2(y A -and B ,x A -x B )*180 / π+360-yaw Among them, yaw is the heading angle of the vehicle.

4. The traffic light detection method for autonomous driving according to any one of claims 1 to 3, characterized in that: Functional relationship 1 and function relationship 2 are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image, including: Pre-collect the vehicle position information, traffic light position information, vehicle heading angle, and pixel coordinates of the traffic light in the image in the world coordinate system; Calculate relative distance data and relative angle data; According to the relative distance data and the pixel coordinate y, a linear function relationship between the pixel coordinate y and the relative distance is obtained; The linear function relationship between the pixel coordinate x and the relative angle is obtained by fitting the relative angle data and the pixel coordinate x.

5. The traffic light detection method for autonomous driving according to claim 4, characterized in that: The functional relationship between the pixel coordinate x of the traffic light and the relative angle is angle = k1x + b1; The linear function relationship between the pixel coordinate y of the traffic light and the relative distance is dist = k2y + b2; Among them, k1, b1, k2 and b2 are constants.

6. The traffic light detection method for autonomous driving according to claim 1, characterized in that: Functional relationship 1 and function relationship 2 are obtained by fitting based on pre-obtained relative distance data, relative angle data, and pixel coordinates of the traffic light in the image, including: when the relative distance between the vehicle and the traffic light is less than a first threshold and greater than a second threshold, relative distance data and relative angle data are calculated based on the collected data, and function relationship 1 and function relationship 2 are obtained by fitting; According to a preconfigured functional relationship 1 between the relative angle between the vehicle and the traffic light in the world coordinate system and the pixel coordinate x of the traffic light in the image, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system, comprising: when the relative distance between the vehicle and the traffic light is less than a second threshold, determining the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to the functional relationship 1; According to a second functional relationship between the relative distance between the vehicle and the traffic light in a preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system, including: when the relative distance between the vehicle and the traffic light is less than a second threshold, according to the second functional relationship, the pixel coordinate y of the traffic light in the image is determined based on the relative distance between the vehicle and the traffic light in the world coordinate system.

7. A traffic light detection device for autonomous driving, applied to an autonomous driving vehicle equipped with a camera, characterized in that: include: The acquisition module is used to collect vehicle position information, traffic light position information, and vehicle heading angle in the world coordinate system; The processing module is used to: calculate the relative distance and relative angle between the vehicle and the traffic light in the world coordinate system; determine the pixel coordinate x of the traffic light in the image based on the relative angle between the vehicle and the traffic light in the world coordinate system according to the first function relationship between the relative angle between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate x of the traffic light in the image; determine the pixel coordinate y of the traffic light in the image based on the relative distance between the vehicle and the traffic light in the world coordinate system according to the second function relationship between the relative distance between the vehicle and the traffic light in the preconfigured world coordinate system and the pixel coordinate y of the traffic light in the image; A detection module, used to determine a traffic light detection area according to pixel coordinates x and y of the traffic light in the image; The first function relationship and the second function relationship are obtained by fitting based on the pre-obtained relative distance data, relative angle data, and the pixel coordinates of the traffic light in the image.

8. The traffic light detection device for autonomous driving according to claim 7, characterized in that: The processing module is used to: The relative distance between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula: Among them, point A (x A ,x B ) and point B (y A ,y B ) are the plane coordinates of the traffic light and the vehicle in the world coordinate system.

9. The traffic light detection device for autonomous driving according to claim 8, characterized in that: The processing module is used to: The relative angle between the vehicle and the traffic light in the world coordinate system is calculated according to the following formula: angle=arctan2(y A -and B ,x A -x B )*180 / π+360-yaw Among them, yaw is the heading angle of the vehicle.

10. The traffic light detection device for autonomous driving according to any one of claims 7 to 9, characterized in that: The acquisition module is also used to: pre-acquire vehicle position information, traffic light position information, vehicle heading angle, and pixel coordinates of the traffic light in the image in the world coordinate system; Also included are fitting modules for: Calculate the relative distance data and relative angle data in the world coordinate system; According to the relative distance data and the pixel coordinate y, a linear function relationship between the pixel coordinate y and the relative distance is obtained; The linear function relationship between the pixel coordinate x and the relative angle is obtained by fitting the relative angle data and the pixel coordinate x.

Citation Information

Patent Citations

  • Automatic environmental perception system for remotely piloted vehicle and work method for automatic environmental perception system

    CN102944224A

  • Moving target rapid positioning method and system based on video image coordinate

    CN110827355A

  • Vehicle-mounted camera angle calibration method, terminal and storage medium

    CN114067001A

  • Highway vehicle speed measurement method and device based on roadside monocular camera calibration

    CN115684637A