WO2022247299A1 - Indicator lamp state recognition - Google Patents

Indicator lamp state recognition Download PDF

Info

Publication number
WO2022247299A1
WO2022247299A1 PCT/CN2022/070699 CN2022070699W WO2022247299A1 WO 2022247299 A1 WO2022247299 A1 WO 2022247299A1 CN 2022070699 W CN2022070699 W CN 2022070699W WO 2022247299 A1 WO2022247299 A1 WO 2022247299A1
Authority
WO
WIPO (PCT)
Prior art keywords
traffic signal
tracking target
state
traffic
current moment
Prior art date
Application number
PCT/CN2022/070699
Other languages
French (fr)
Chinese (zh)
Inventor
黄超
陈熙
姚为龙
Original Assignee
上海仙途智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海仙途智能科技有限公司 filed Critical 上海仙途智能科技有限公司
Publication of WO2022247299A1 publication Critical patent/WO2022247299A1/en

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0137Measuring and analyzing of parameters relative to traffic conditions for specific applications
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/09Arrangements for giving variable traffic instructions
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/09Arrangements for giving variable traffic instructions
    • G08G1/095Traffic lights
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/09Arrangements for giving variable traffic instructions
    • G08G1/0962Arrangements for giving variable traffic instructions having an indicator mounted inside the vehicle, e.g. giving voice messages

Definitions

  • the present invention relates to the field of traffic technology, in particular to a method, device, electronic equipment, computer-readable storage medium and computer program product for state identification of indicator lights.
  • the commonly used way to determine the state of traffic lights is to first obtain an image containing traffic lights through the vehicle-mounted camera, and then locate the traffic lights in the image on the electronic map according to the vehicle positioning device. area, and finally detect and identify the current state of traffic lights in the area of interest, and output the current recognition results.
  • the related art due to various uncertain factors such as the error of the vehicle positioning device, the deviation of the camera parameters of the vehicle-mounted camera, and the change of the size and position of the traffic signal light in the captured image during the driving of the vehicle, it is impossible to accurately identify the vehicle. The current state of the traffic lights that need attention when passing the current intersection.
  • the present invention provides a method, device, electronic equipment, computer-readable storage medium and computer program product for identifying the state of an indicator light, so as to at least solve the problem that the current intersection cannot be accurately identified when the vehicle passes the current intersection in the related art. Concerned about technical issues with the status of traffic lights.
  • a method for identifying the state of an indicator light comprising: obtaining the traffic signal image in front of the vehicle taken at the current moment, and the location information of the vehicle at the current moment; if obtained from the electronic map The location information of the traffic lights that the vehicle currently needs to pass through the intersection, then determine the ROI of the location information of the traffic lights that the vehicle currently needs to pass through the intersection on the traffic signal image according to the positioning information of the vehicle at the current moment ; detect and identify the traffic lights in the region of interest ROI to obtain the state of the traffic lights that need to pass through the intersection at the current moment; update the state of the historical tracking target at the current moment, wherein the historical tracking target is the current The detection and recognition results of traffic lights within a period of time before the moment; determine the first matching result between the state of the traffic lights that need to pass through the intersection at the current moment and the state of the historical tracking target at the current moment; if the first matching result is the The historical tracking target matches the state of the traffic lights
  • a device for identifying the status of an indicator light including: a first acquisition module, configured to acquire a traffic signal image in front of a vehicle at the current moment, and the location information of the vehicle at the current moment
  • the second acquisition module is used to acquire the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map;
  • the first determination module is used to acquire the current position of the vehicle in the electronic map by the second acquisition module.
  • the location information of the traffic lights passing through the intersection determines the position information of the traffic lights that the vehicle currently needs to pass through the intersection on the traffic signal image according to the positioning information of the vehicle at the current moment acquired by the first acquisition module Region of interest ROI;
  • Detection and identification module used to detect and identify the traffic lights in the region of interest ROI, to obtain the status of the traffic lights that need to pass through the intersection at the current moment;
  • Update module used to update the historical tracking target in the location The state at the current moment, wherein the historical tracking target is the detection and recognition result of the traffic signal lights in the previous period of time at the current moment;
  • the third acquisition module is used to match the historical tracking target with the traffic that needs to pass through the intersection at the current moment in the first matching result determined by the second determination module
  • the traffic signal is in the state of the traffic signal, obtain the historical display attribute information of the historical tracking target corresponding to the traffic signal matched at the current moment, wherein the matched traffic signal is the
  • the display attribute state includes the color state and shape state of the traffic signal light; an output module, configured to output the display attribute of the target traffic signal light acquired by the fifth acquisition module state.
  • an electronic device including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement The method for identifying the state of the indicator light as described above.
  • a computer-readable storage medium when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the above-mentioned How to recognize the state of the indicator light.
  • a computer program product including a computer program or an instruction, and when the computer program or instruction is executed by a processor, the method for identifying the status of an indicator light as described above is implemented.
  • the method for identifying the state of the indicator light provided by the embodiments of the present invention projects the position information including the target traffic light obtained from the electronic map at the current moment onto the vehicle In the captured image, the area of interest where the traffic signal light is located in the vehicle-mounted image is effectively located, and the traffic signal light in the area of interest is identified to accurately select the traffic signal light that needs to be paid attention to when passing the current intersection , and then fuse the detection results of the current frame with the output results of the previous frames of the traffic light to accurately identify and output the state of the traffic light, thereby improving the accuracy of traffic signal state recognition.
  • Fig. 1 is a flow chart of a method for identifying the state of an indicator light provided by an embodiment of the present invention.
  • Fig. 2 is a flow chart of an application example of a method for identifying the state of an indicator light provided by an embodiment of the present invention.
  • Fig. 3 is a block diagram of a device for identifying the state of an indicator light provided by an embodiment of the present invention.
  • Fig. 4 is a schematic structural diagram of a first determining module provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a projection module provided by an embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of a second determining module provided by an embodiment of the present invention.
  • Fig. 7 is a schematic structural diagram of a third determining module provided by an embodiment of the present invention.
  • Fig. 8 is another block diagram of a device for identifying the state of an indicator light provided by an embodiment of the present invention.
  • Fig. 9 is another block diagram of a device for identifying the state of an indicator light provided by an embodiment of the present invention.
  • Fig. 10 is a structural block diagram of an electronic device provided by an embodiment of the present invention.
  • Fig. 11 is a structural block diagram of a device with indicator light status recognition provided by an embodiment of the present invention.
  • Fig. 1 is a flow chart of a method for identifying the status of an indicator light according to an exemplary embodiment.
  • the method for identifying the status of an indicator light can be used in a terminal, and the terminal implementation device can be an electronic device such as a vehicle-mounted terminal, which is not limited here.
  • this embodiment may include the following steps: Step 101 , acquiring the traffic signal image in front of the vehicle at the current moment and the location information of the vehicle at the current moment.
  • the vehicle-mounted terminal when the vehicle-mounted terminal detects the shooting instruction, it starts the vehicle-mounted camera to take pictures.
  • the vehicle-mounted camera may be integrated on the recorder, or independently deployed on the vehicle, which is not limited in this embodiment.
  • the vehicle-mounted terminal can locate the positioning information of the current vehicle through the satellite navigation system, of course, it can also locate the positioning information of the current vehicle in other ways, wherein, the specific process of the vehicle-mounted terminal positioning through the satellite positioning and navigation system, It is a well-known technology for those skilled in the art, so it will not be repeated here.
  • Step 102 if the location information of the traffic lights that the vehicle needs to pass through the intersection is obtained in the electronic map, then determine the location information of the traffic lights that the vehicle needs to pass through the intersection according to the positioning information of the vehicle at the current moment. A region of interest ROI on a traffic signal image.
  • the vehicle-mounted terminal first judges whether the position information of the traffic signal lights that the vehicle currently needs to pass through the intersection in the electronic map has been obtained, and if it is obtained, first according to the positioning information of the vehicle at the current moment, the location information of the traffic lights that the vehicle currently needs to pass through the intersection.
  • the position information of the traffic signal lights is projected onto the traffic signal image to obtain the two-dimensional coordinate information of the traffic signal lights that need to pass through the intersection on the traffic signal image;
  • ROI in machine vision and image processing, outlines the area to be processed from the processed image in the form of a box, circle, ellipse, irregular polygon, etc., called the region of interest.
  • the position information of the traffic lights that the vehicle needs to pass through the intersection is projected onto the traffic signal image, and the traffic signal lights that need to pass the intersection are obtained in the traffic signal image.
  • the two-dimensional coordinate information on the above may include: the distance between the position information of the traffic lights that need to pass the intersection and the location information of the vehicle; according to the distance, map the traffic lights that need to pass the intersection to In the traffic signal light image, the two-dimensional coordinate information projected on the traffic signal light image by the traffic signal light that needs to pass through the intersection currently is obtained.
  • the position information ie, the three-dimensional image
  • Mapped to the traffic signal image recorded by the on-board camera the image is a two-dimensional image
  • the projection result is two-dimensional coordinate information. That is, in this embodiment, in order to realize the mapping of the position information of the traffic lights currently passing through the intersection on the traffic signal image, it is necessary to clarify the relative positional relationship between the traffic lights currently passing through the intersection and the current vehicle.
  • One method adopted in the embodiment of the present invention is to use the endpoint coordinate set of the traffic signal light to describe its spatial position: first obtain the relative positional relationship between each endpoint of the traffic signal light and the current vehicle, and combine the calibrated data obtained by the on-board camera For internal and external parameters, referring to the small hole imaging principle of the camera, the position of the traffic light can be projected from the three-dimensional space to the two-dimensional plane of the traffic signal image to obtain a set of projected coordinates.
  • the coordinates of the center of the projected point are the mean value of the corresponding coordinates of each element in the projected coordinate set.
  • Step 103 detecting and identifying the traffic lights in the region of interest ROI to obtain the status of the traffic lights that need to pass through the intersection at the current moment.
  • the vehicle-mounted camera can use image detection technology and image recognition technology to detect and identify the position and size of the traffic lights in the region of interest ROI, and obtain the status of the traffic lights that need to pass through the intersection at the current moment. Status, which can include the location and size of individual traffic lights.
  • the images of the region of interest may also be sequentially input to the corresponding detection model and recognition model to perform detection and recognition of traffic lights respectively.
  • the traffic signal detection model and recognition model can be trained according to traditional machine learning algorithms, or can be obtained according to deep learning algorithms.
  • the real-time example of the present invention does not limit the methods used in the training process of the series of models.
  • the traffic signal detection model can be trained using centernet's deep learning algorithm, and the traffic signal recognition model can be trained using the error backpropagation network.
  • the traffic signal light detection model obtains the position and size of the traffic signal light on the image of the traffic signal light in the region of interest.
  • Step 104 updating the state of the historical tracking target at the current moment, wherein the historical tracking target is the detection and recognition result of the traffic signal light in a period of time before the current moment.
  • the position and size of each historical tracking target in the historical tracking target set are updated so that its state matches the current moment.
  • the historical tracking target refers to the recognition result of the traffic signal light within a period of time before the current moment.
  • Step 105 determining a first matching result between the state of the traffic lights that need to pass through the intersection at the current moment and the state of the historical tracking target at the current moment.
  • this step first determine the first association matrix (ie association score) of the state of the traffic lights that need to pass through the crossing at the current moment and the state of the historical tracking target; The first corresponding relationship between the traffic lights passing through the intersection and the historical tracking target; and according to the first corresponding relationship, it is determined that the historical tracking target is associated with the state of the traffic lights that need to pass through the intersection at the current moment; and using the current moment The state of the historical tracking target needs to be updated with the state of the traffic lights passing through the intersection.
  • the first association matrix ie association score
  • the correlation matrix in this embodiment is the correlation score between the detection result of the traffic light and the historical tracking target. The higher the correlation score, the greater the possibility that the two are the same object. On the contrary, the correlation The lower the score, the more likely the two are different objects.
  • the calculation method of the correlation score includes but is not limited to the following: one way is to calculate the distance between the detection result of the traffic light and the historical tracking target, and then use the optimal matching algorithm, such as the Hungarian algorithm, to obtain The correlation matrix is matched, and the corresponding relationship (ie, the first corresponding relationship) between the detection result of the current traffic signal and the historical tracking target is output. It should be noted that due to various unfavorable factors such as the error of the vehicle positioning device, the deviation of the vehicle camera and camera parameters, and the change of the size and position of the traffic light in the captured image during the driving of the vehicle, there may be new traffic lights.
  • the matching results usually have three situations, that is, the current traffic signal detection result cannot be associated with the history Tracking target, the historical tracking target cannot be associated with the current traffic signal detection result, and the historical tracking target cannot be associated with the current traffic signal detection result.
  • this embodiment takes the history tracking target not being associated with the current traffic signal detection result as an example for illustration, and the other two cases are detailed in the following embodiments.
  • the number of correlation matrices constructed first is the same as that of the target tracking algorithm.
  • the target tracking algorithm used is divided into method A and method B. It is necessary to set different priorities for the target tracking algorithm used, that is, when the traffic signal detection results are first associated with the historical tracking target, the priority The tracking result obtained by a higher-level tracking algorithm is matched with the detection result of the traffic light. If it fails to match, continue to track the target, use the tracking result obtained by the tracking algorithm with lower priority, and then continue to compare the tracking result obtained by using the lower tracking algorithm with the light detection result of the traffic signal that has not yet been matched. match. And so on, until the tracking results using all tracking algorithms are matched.
  • Step 106 if the first matching result is that the historical tracking target matches the state of a traffic signal that needs to pass through the intersection at the current moment, then acquire the historical display attribute information of the historical tracking target corresponding to the traffic signal that is matched at the current moment , where the matched traffic signal is the target traffic signal.
  • the historical display attribute information includes the display attribute information of the traffic signal light detection results associated with the tracking target in the previous n frames. Constructing the sequence of display attribute information can be arranged according to time, smoothing it in time, and obtaining the most voting attributes through voting fusion as the output state result of the tracking target at the current moment.
  • the historical tracking target is associated (or matched) with the current traffic signal detection result, use the historical target tracking algorithm to update the corresponding historical tracking target's motion state and Display attribute information.
  • Step 107 If the electronic map includes the position information of the target traffic light, determine a second matching result between the projected position of the target traffic light on the traffic signal image and the historical tracking target.
  • the vehicle-mounted terminal first judges whether the electronic map includes the position information of the target traffic light, and if so, creates the projection position of the target traffic light on the traffic signal image at the current moment and the historical tracking target information.
  • the second association matrix i.e. the association score
  • the second association matrix is matched to obtain the second corresponding relationship between the current moment target traffic signal projection and the historical tracking target; finally, according to the second corresponding relationship to determine the Match the projection position of the signal light of the above-mentioned target to the corresponding historical tracking target.
  • the correlation matrix is the correlation score between the target traffic light projection and the historical tracking target.
  • the higher the correlation score the greater the possibility that the two are the same object. Conversely, the lower the correlation score, it means that the two are not The more likely it is the same object.
  • the calculation method of the association score includes but is not limited to calculating the distance between the target traffic signal projection and the historical tracking target. Then use an optimal matching algorithm, such as the Hungarian algorithm, to match the obtained correlation matrix, output the corresponding relationship (ie, the second corresponding relationship) between the target traffic signal projection and the historical tracking target, and determine the target according to the second corresponding relationship Match the projection position of the traffic signal light to the corresponding historical tracking target.
  • Step 108 obtain that the projected position of the target traffic signal is matched to the display property state of the corresponding historical tracking target, and the display property state includes the color state and shape state of the target traffic signal light.
  • the display attribute information may include the color information and shape information of the traffic lights, the color information includes one of the following: red, yellow, green, and no display, etc., and the shape information includes at least one of the following: circle, left-turn arrow , right-turning arrow, straight-going arrow, etc.
  • the display attribute information of the traffic signal light provided by the embodiment of the present invention is not limited thereto.
  • Step 109 outputting display attribute information of the target traffic signal light.
  • the selected target traffic signal light display attribute status is output as a basis for vehicle driving planning.
  • the indicator light state recognition method projects the location information including the target traffic signal light obtained from the electronic map at the current moment into the vehicle-mounted image, effectively locating the location of the traffic signal light in the vehicle-mounted image
  • the area of interest where the area of interest is located by identifying the traffic lights in the area of interest, accurately select the traffic lights that need to be paid attention to when passing the current intersection, and then compare the detection results of the current frame with the traffic lights in the previous period
  • the output results of the frame are fused to accurately identify and output the state of the traffic signal light, thereby improving the accuracy of the state recognition of the traffic signal light.
  • this embodiment may also include: if the position information of the traffic signal lights that the vehicle currently needs to pass through the intersection in the electronic map is not obtained, judging whether there is Historical traffic light tracking target; if it does not exist, then the default detection area is set as an area of interest; if it exists, then predict and update the state of the historical traffic light tracking target at the current moment; according to the vehicle's current state
  • the location information determines the region of interest (ROI) of the historical traffic signal light tracking target on the traffic signal image, wherein the historical traffic signal light tracking target is used as a traffic signal that needs to pass through the intersection currently.
  • ROI region of interest
  • the vehicle-mounted terminal does not obtain the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map, it needs to determine whether there is a historical traffic light tracking target. If it does not exist, set the default detection area as interested Area; if it exists, predict and update the position and size of the historical traffic light tracking target at the current moment according to the tracking algorithm, and then use the historical traffic signal tracking target on the captured traffic signal image (ie, the two-dimensional image taken by the vehicle) The center of the coordinates of is the center to obtain the region of interest. Specifically, the location information of the historical traffic signal light tracking target is projected onto the traffic signal image to obtain two-dimensional coordinate information, and then the corresponding region of interest is obtained centering on the projected point.
  • this embodiment may also include: the first case, if the first matching result is that the status of the traffic lights that need to pass the intersection at the current moment is not If the above-mentioned historical tracking target can be matched, a new tracking target is created, and the new tracking target is added to the set of historical tracking targets.
  • the current traffic light detection result fails to associate with the historical tracking target, it means that a new traffic light has entered the area of interest, and then a new tracking target entity is generated for the detection result and added to the historical tracking target set.
  • the first matching result is that the state of the traffic signal lights that need to pass through the intersection at the current moment fails to match the historical tracking target, a new tracking target is created to improve the recognition efficiency of the traffic signal light state .
  • the first matching result is that the historical tracking target fails to match the state of the traffic lights that need to pass through the intersection at the current moment, determine whether to remove the historical tracking target; if so, remove the historical tracking target Track the target; if not, update the state of the historical tracking target, and the state records information about whether the historical tracking target is detected in the current frame.
  • the historical tracking target cannot be associated with the current traffic light detection result, it means that the historical tracking target has failed to be detected and recognized at the current moment or the historical tracking target has left the area of interest.
  • the criteria for the determination may be based on the fact that the historical tracking target has not been detected in the previous m frames as an example. If the deletion criterion is met, the tracking target is deleted from the historical tracking target collection; otherwise, the status of the historical tracking target is updated, and the status includes information indicating whether the tracking target is detected in the current frame.
  • the unassociated historical tracking target is adaptively deleted, which not only saves storage space, but also increases the number of traceable results. Stability, thereby improving the recognition efficiency of the state of the traffic signal.
  • this embodiment may further include: if the position information of the target traffic light in the electronic map is not obtained, obtaining the vehicle The planned behavior at the current intersection; according to the planned behavior of the vehicle, the vehicle is matched to the historical tracking target of the corresponding state; the historical display attribute status of the historical tracking target at the current moment is acquired; the historical display of the historical tracking target is output property status.
  • the loaded electronic map does not contain the position information of the target traffic lights that need to be paid attention to at the current crossing
  • the planned behavior of the vehicle at the current crossing such as turning left, turning right or going straight, etc.
  • the shape information of the output state of the matching tracking target should be a left-turning arrow, and the matching rule is consistent with the traffic passing rule.
  • the loaded electronic map does not contain the position information of the target traffic light that needs attention at the current crossing
  • the output state of the tracking target is matched according to the planned behavior of the vehicle
  • Planning for the vehicle's driving planning behavior improves the stability and comfort of the vehicle.
  • FIG. 2 is an application flowchart of a method for identifying the state of an indicator light provided by an embodiment of the present invention.
  • this embodiment taking the detection and identification of the state of a traffic signal light as an example, this embodiment includes: Step 201, obtaining The traffic signal image captured by the vehicle-mounted camera at the current moment, the traffic signal image includes traffic signal lights.
  • the shooting of the vehicle-mounted camera can be started.
  • the vehicle-mounted camera can be integrated on the recorder, or independently deployed on the vehicle, which is not limited in this embodiment.
  • Step 202 acquiring the location information of the vehicle at the current moment.
  • the positioning information of the current vehicle can be located through the satellite navigation system, and the specific positioning process through the satellite positioning and navigation system is a well-known technology for those skilled in the art, and will not be repeated here.
  • step 201 and step 202 can be separated in no order, and can also be executed at the same time, which is not limited in this embodiment.
  • Step 203 judging whether the loaded electronic map includes the location information of traffic lights that need to pass through the intersection at present, if yes, execute step 204 , otherwise, execute step 206 .
  • Step 204 projecting the position information of the traffic signal light onto the traffic signal image to obtain two-dimensional coordinate information on the traffic signal image; and performing step 205 .
  • the embodiment of the present invention uses the endpoint coordinate set of the traffic signal light to describe its spatial position.
  • the traffic signal light After obtaining the relative positional relationship between each end point of the traffic signal light and the current vehicle, combined with the internal and external parameters that have been calibrated by the vehicle-mounted camera, and referring to the small hole imaging principle of the camera, the traffic signal light can be projected from the three-dimensional space to the two-dimensional plane of the image to get the set of projected coordinates.
  • the coordinates of the center of the projected point are the mean value of the corresponding coordinate sum of each element in the projected coordinate set.
  • Step 205 centering on the projected projection point, obtain the region of interest ROI on the traffic signal image of the traffic lights that currently need to pass through the intersection; after that, step 210 is executed.
  • Step 206 judging whether there is a historical traffic signal light tracking target on the electronic map, if yes, execute step 207 , if not, execute step 209 .
  • the historical tracking target refers to the recognition result of the traffic signal light in a period of time before the current moment.
  • Step 207 predicting and updating the two-dimensional coordinates and size of the historical traffic signal light tracking target at the current moment.
  • the prediction can be made according to the tracking algorithm.
  • the historical target tracking algorithm in step 207 includes but not limited to Kalman filter algorithm and kernel correlation filter algorithm.
  • the Kalman filter algorithm is to calculate the motion state of the tracking target.
  • the motion state includes but not limited to the size, size and change rate of the position coordinates.
  • the tracking target motion state is obtained , so as to predict the state of the historical tracking target at the current moment. It is worth noting that, for the sake of illustration, this implementation example uses a simple motion model at a constant speed. Therefore, the motion state includes the position and speed information of the tracking target as an example, but it is not limited to this in practical applications.
  • the kernel correlation filter algorithm is used to calculate the historical image features of the historical tracking target.
  • the historical image features include but not limited to: grayscale features, directional gradient features, histogram features, etc., search on the traffic signal image at the current moment, and get The area most similar to the features of the historical image is the predicted tracking result of the tracking target at the current moment.
  • the central coordinate of the coordinates of the historical traffic signal light tracking target on the two-dimensional image is the mean value of the corresponding coordinate sum of each element in the tracking result set.
  • Step 208 taking the coordinates of the historical traffic signal light tracking target on the traffic signal image as the center to obtain a region of interest ROI; after that, step 210 is executed.
  • Step 209 setting the default detection region as the region of interest.
  • the position of the set default detection area can be set according to empirical parameters, that is, the position of the default detection area can be obtained by hypothetical projection based on the estimation of the relative position of the vehicle camera and the traffic signal light, and the internal and external parameters of the vehicle camera.
  • Step 210 detect the traffic lights in the image of the region of interest ROI, and obtain the detection results of the traffic lights that need to pass through the intersection on the traffic signal image; after that, execute step 212.
  • the detection result may include position and size and display attribute information.
  • the step 210 uses the image of the region of interest as an input to detect and recognize traffic lights.
  • the traffic signal light detection model and recognition model can be trained according to traditional machine learning algorithms, and can also be obtained according to deep learning algorithms.
  • the present invention does not limit the methods used in the training process of the series of models.
  • the traffic signal detection model can be trained using centernet's deep learning algorithm, and the traffic signal recognition model can be trained using the error backpropagation network.
  • the traffic signal light detection model obtains the position and size of the traffic signal light on the image of the region of interest.
  • the traffic signal recognition model obtains the display attribute information of the traffic signal according to the display image of the traffic signal on the region of interest.
  • the display attribute information may include the color information and shape information of traffic lights, where the color information may include red, yellow, green, and no display, etc., and the shape information may include circle, left-turn arrow, and right-turn arrow and straight arrows etc.
  • the present invention does not limit the content contained in the display attribute information of the traffic signal light.
  • Step 211 updating the position and size of the historical tracking target at the current moment, so that the position and size of the historical tracking target match the detection results of the traffic lights that need to pass through the intersection currently on the traffic signal light image.
  • Step 212 constructing a correlation matrix between the detection results of the traffic lights that currently need to pass through the intersection on the traffic signal image and the position and size of the historical tracking target at the current moment.
  • association matrix may also be referred to as a first management matrix.
  • the correlation matrix is the correlation score between the traffic light detection result and the historical tracking target.
  • the higher the correlation score the greater the possibility that the two are the same object. On the contrary, it represents the possibility that the two are the same object. smaller.
  • the calculation method of the association score includes but not limited to the method of calculating the distance between the detection result of the traffic light and the historical tracking target.
  • Step 213 correlating the corresponding relationship between the position and size of the current signal light and the position and size of the historical tracking target according to the constructed correlation matrix, if the correlation fails, perform step 214, and if the correlation is successful, perform step 220; this step
  • the optimal matching algorithm is used to determine the one-to-one correspondence between the two.
  • the optimal matching algorithm such as the Hungarian algorithm, matches the obtained correlation matrix, and outputs the corresponding relationship between the current traffic signal detection result and the historical tracking target.
  • the matching result of the optimal matching algorithm in step 213 may appear in two situations, one is successful association, and the other is Association failed.
  • the number of association matrices constructed in step 213 is the same as the number of target tracking algorithms. If there are two target tracking algorithms used and recorded as method A and method B respectively, it is necessary to set different priorities for the target tracking algorithms used first, that is, when associating the detection results of traffic lights with historical tracking targets, first use The tracking result obtained by the tracking algorithm with a higher priority matches the detection result of the traffic signal light. If it fails to match, the tracking algorithm with a higher priority is used (the tracking algorithm has a lower priority than the tracking algorithm with a higher priority above). ) is matched with the unmatched traffic signal detection results. And so on, until the tracking results of all tracking algorithms are used.
  • Step 214 Judging whether the association of the current signal lamp or the historical tracking target fails, if the association of the current signal lamp fails, perform step 215, and if the association of the historical tracking target fails, perform step 217.
  • Step 215 creating a new tracking target entity.
  • the current traffic light detection result fails to associate with the historical tracking target, it means that a new traffic light has entered the image of the region of interest, and a new tracking target entity is generated for the detection result.
  • Step 216 adding the new tracking target to the historical tracking target set, and then performing step 221 .
  • Step 217 determine whether to delete the historical tracking target, if not, execute step 219, if yes, execute step 218.
  • the historical tracking target fails to be associated with the current traffic light detection result, it means that the historical tracking target has not been successfully detected and recognized at the current moment or the historical tracking target has left the image of the region of interest.
  • the judgment standard can be based on the proportion of the tracking target that was not detected in the previous m frames as an example, but in actual application, it is not limited to this. If the criterion for deletion is met, execute step 218; otherwise, execute step 219; step 218, delete the historical tracking target, and end the current process.
  • Step 219 update the state of the historical tracking target, and then execute step 221.
  • the updated state may include information marking whether the tracking target is observed in the current frame.
  • Step 220 updating the motion state and display attribute information of the corresponding historical tracking target.
  • the motion state and display attribute information of the corresponding historical tracking target is updated according to the historical target tracking algorithm in the above step using the traffic signal detection result matched at the current moment.
  • Step 221 acquire the state of the existing historical tracking target, including its historical display attribute, that is, the display attribute information of the traffic signal detection results associated with the tracking target in the previous n frames.
  • the display attributes can be constructed according to the sequence arranged before and after time, time smoothed, and the most voted attributes can be obtained through voting fusion as the output state result of the tracking target at the current moment.
  • Step 222 judging whether the loaded map contains the location information of the target traffic lights that need to be paid attention to at the current crossing; if so, go to step 223 ; otherwise, go to step 228 .
  • Step 223 constructing a correlation matrix between the projected position of the target traffic light on the vehicle camera image and the existing historical tracking target.
  • Step 224 Use the optimal matching algorithm to correlate the correspondence between the two according to the correlation matrix. If the correlation is successful, go to step 225; if the correlation fails, go to step 227.
  • the optimal matching algorithm is used to correlate the one-to-one correspondence between the two. If successful (that is, the association is successful), the corresponding relationship between the target traffic light projection and the historical tracking target is output. If the association between the target traffic signal light projection and the existing tracking target fails, step 227 is executed.
  • Step 225 acquiring the display attribute status of the target traffic signal light projection matched to the corresponding historical tracking target.
  • the display attribute state may include the color state and shape state of the target traffic signal light.
  • Step 226 outputting the display attribute status of the target traffic signal light, and ending the current process.
  • Step 227 there is no traffic signal output at the current moment, and the current process ends.
  • Step 228, acquire the planned behavior of the vehicle at the current intersection.
  • planned behaviors such as turning left, turning right, or going straight.
  • Step 229 matching the historical tracking target of the corresponding output state according to the planned behavior of the vehicle, and obtaining the historical display attribute status of the historical tracking target at the current moment.
  • the shape information of the output state of the matched historical tracking target should be a left-turn arrow. Matched rules match the traffic rules.
  • Step 230 outputting the acquired historical reality attribute status of the historical tracking target, and ending the current process.
  • the historical reality attribute state of the historical tracking target can be used as the basis for vehicle driving planning.
  • the loaded electronic map does not contain the position information of the target traffic light that needs attention at the current crossing
  • the output state of the tracking target is matched according to the planned behavior of the vehicle
  • Planning for the vehicle's driving planning behavior improves the stability and comfort of the vehicle.
  • Fig. 3 is a block diagram of a device for identifying the state of an indicator light according to an exemplary embodiment.
  • the device comprises a first acquisition module 301, a second acquisition module 302, a first determination module 303, a detection identification module 304, an update module 305, a second determination module 306, a third acquisition module 307, and a fourth acquisition module 308 , the third determination module 309 , the fifth acquisition module 310 and the output module 311 .
  • the first obtaining module 301 is used to obtain the traffic signal image taken in front of the vehicle at the current moment, and the location information of the vehicle at the current moment;
  • the second obtaining module 302 is used to obtain the information described in the electronic map.
  • the position information of the traffic lights that the vehicle currently needs to pass through the intersection is used to determine the position information of the traffic lights that the vehicle currently needs to pass through the intersection when the second acquisition module 302 obtains the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map.
  • the location information of the vehicle at the current moment acquired by the first acquisition module 301 determines the ROI of the location information of the traffic lights that the vehicle needs to pass through the intersection on the traffic signal image; the detection and identification module 304, It is used to detect and identify the traffic lights in the region of interest ROI to obtain the state of the traffic lights that need to pass through the intersection at the current moment; the update module 305 is used to update the state of the historical tracking target at the current moment, wherein , the historical tracking target is the detection and recognition result of traffic lights in a period of time before the current moment; the second determination module 306 is used to determine the state of the traffic lights that need to pass through the intersection at the current moment and the historical tracking target at the current moment The first matching result of the state; the third obtaining module 307 is used to determine the first matching result determined by the second determining module 306 as the historical tracking target matching the traffic lights that need to pass through the intersection at the current moment state, obtain the historical display attribute information of the historical tracking target corresponding to the traffic signal light matched at the current moment, where
  • the first determination module 303 includes: a projection module 401 and an area acquisition module 402, the structural diagram of which is shown in FIG. 4 , wherein , the projection module 401 is configured to project the position information of the traffic lights that the vehicle needs to pass through the intersection to the traffic signal image according to the positioning information of the vehicle at the current moment, and obtain the position information of the traffic lights that need to pass the intersection currently.
  • the two-dimensional coordinate information on the traffic signal image; the region acquisition module 402 is configured to obtain the region of interest ROI on the traffic signal image of the traffic signal lights that currently need to pass through the intersection centering on the projected projection point.
  • the projection module 401 includes: a calculation module 501 and a mapping module 502, the structure diagram of which is shown in FIG. 5 , wherein the calculation The module 501 is used to calculate the distance between the position information of the traffic lights that need to pass the intersection and the location information of the vehicle; the mapping module 502 is used to map the traffic lights that need to pass the intersection according to the distance.
  • the position information of the traffic signal is mapped to the traffic signal image, and the two-dimensional coordinate information projected on the traffic signal image by the position information of the traffic signal that needs to pass through the intersection is obtained.
  • the second determining module 306 includes: a first correlation matrix determining module 601, a first matching module 602, and a first judging module 603
  • this first association matrix determination module 601 is used for determining the first association matrix of the state of the traffic signal light that needs to pass through the intersection at the current moment and the state of the historical tracking target
  • the first matching module 602 is used to match the first correlation matrix to obtain the first correspondence between the traffic lights that need to pass through the intersection at the current moment and the historical tracking target
  • the first judgment module 603 is used to According to the first correspondence, it is judged whether the historical tracking target is associated with the state of the traffic lights that need to pass through the intersection at the current moment;
  • the state of the corresponding historical tracking target is updated by using the state of the traffic signal light matched at the current moment.
  • the third determining module 309 includes: a second correlation matrix determining module 701, a second matching module 702, and a second judging module 703 and tracking target determination module 704, its structural diagram is as shown in Figure 7, wherein, the second correlation matrix determination module 701 is used to determine the projection position and historical tracking of the target traffic light on the traffic signal image at the current moment The second correlation matrix of the target; the second matching module 702 is used to match the second correlation matrix to obtain the second corresponding relationship between the target traffic signal light projection at the current moment and the historical tracking target; the second judgment module 703, It is used to determine whether the projected position of the target traffic signal lamp matches the corresponding historical tracking target according to the second correspondence relationship; The projected position of the target traffic light is matched to the corresponding historical tracking target.
  • the device further includes: a third judging module 801, a setting module 802, a prediction updating module 803 and a fourth determining module 804, which A schematic diagram of the structure is shown in FIG. 8 , wherein the third judging module 801 is used to judge whether there is a traffic signal light at an intersection when the first determining module 303 determines that the position information of the traffic signal light that the vehicle currently needs to pass through the intersection in the electronic map has not been obtained.
  • Historical traffic signal light tracking target used for the judgment module to determine that there is no historical traffic signal light tracking target, the default detection area is set to the region of interest;
  • the prediction update module 803 is used for When the third determination module 801 determines that there is a historical traffic signal light tracking target, predict and update the state of the historical traffic signal light tracking target at the current moment;
  • the fourth determination module 804 is used to Determining a region of interest (ROI) of the historical traffic signal light tracking target on the traffic signal image, wherein the historical traffic signal light tracking target is used as a traffic signal that currently needs to pass through an intersection.
  • ROI region of interest
  • the device may further include: a creation module, and/or a fourth judgment module, a removal module and a second status update module , wherein, the creating module is used to create a new tracking when the first matching result determined by the second determining module is that the state of the traffic lights that need to pass through the intersection at the current moment fails to match the historical tracking target target, and add the new tracking target to the set of historical tracking targets; the fourth judging module is used to determine that the first matching result determined by the second determining module is that the historical tracking target fails to match When checking the state of the traffic lights that need to pass through the intersection at the current moment, judge whether to remove the historical tracking target; the removal module is used to remove the historical tracking target when the fourth judging module History tracking target; the second state update module is used to update the state of the history tracking target when the fourth judging module determines not to remove the history tracking target, and the state records the history in the current frame Tracks information about whether the target is detected or not.
  • the creating module is used to create a new tracking when the first matching result determined
  • the device may further include: a behavior acquisition module 901, a matching module 902 and a state acquisition module 903, the schematic diagram of which is shown in Figure 9 shown, wherein the behavior acquiring module 901 is configured to acquire the location information of the target traffic light in the electronic map when the second matching result determined by the third determining module 309 is not acquired.
  • the planned behavior of the current intersection the matching module 902 is used to match the vehicle to the historical tracking target of the corresponding state according to the planned behavior of the vehicle;
  • the state acquisition module 903 is used to obtain the historical tracking target at the current moment Historical display attribute status;
  • the output module 311 is also configured to output the historical display attribute status of the historical tracking target acquired by the status acquisition module 903 .
  • An embodiment of the present invention also provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the above-mentioned instructions Light state identification method.
  • An embodiment of the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk and optical data storage devices, etc.
  • An embodiment of the present invention also provides a computer program product, including a computer program or an instruction.
  • a computer program product including a computer program or an instruction.
  • an embodiment of the present invention also provides an electronic device, as shown in FIG.
  • the mutual communication is completed through the communication bus 1004, wherein the memory 1003 is used to store computer programs; the processor 1001 is used to realize the above-mentioned status recognition of the indicator lights when executing the programs stored in the memory 1003 method.
  • the communication bus mentioned in the terminal above may be a Peripheral Component Interconnect (PCI for short) bus or an Extended Industry Standard Architecture (EISA for short) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the terminal and other devices.
  • the memory may include a random access memory (Random Access Memory, RAM for short), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • non-volatile memory such as at least one disk memory.
  • the memory may also be at least one storage device located far away from the aforementioned processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; it can also be a digital signal processor (Digital Signal Processing, referred to as DSP) , Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • Fig. 11 is a block diagram of an apparatus 1100 for identifying an indicator light state according to an exemplary embodiment.
  • apparatus 1100 may be provided as a terminal.
  • apparatus 1100 includes processing component 1122 , which further includes one or more processors, and a memory resource represented by memory 1132 for storing instructions executable by processing component 1122 , such as application programs.
  • the application program stored in memory 1132 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1122 is configured to execute instructions to perform the above method.
  • Device 1100 may also include a power component 1126 configured to perform power management of device 1100 , a wired or wireless network interface 1150 configured to connect device 1100 to a network, and an input-output (I/O) interface 1158 .
  • the device 1100 can operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Chemical & Material Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

An indicator lamp state recognition method and apparatus, and an electronic device, a storage medium and a product. The method comprises: projecting location information, which is acquired from an electronic map at the current moment and comprises a target traffic signal lamp, into an on-board captured image, and effectively positioning a region of interest, where a traffic signal lamp is located, in the on-board captured image; recognizing traffic signal lamps in the region of interest, and precisely selecting a traffic signal lamp that needs to be focused on when passing through the current intersection; and then fusing a testing result of the traffic signal lamp that needs to be focused on at the current intersection with an output result of each frame of the traffic signal lamp within a time period before, and recognizing accurately and outputting a display attribute state of the traffic signal lamp, and thereby improving the accuracy of recognizing the state of the traffic signal lamp.

Description

指示灯状态识别Indicator status identification 技术领域technical field
本发明涉及交通技术领域,尤其涉及用于指示灯状态识别的方法、装置、电子设备、计算机可读存储介质及计算机程序产品。The present invention relates to the field of traffic technology, in particular to a method, device, electronic equipment, computer-readable storage medium and computer program product for state identification of indicator lights.
背景技术Background technique
随着道路复杂度的不断提升,以及车辆的日益增多,行车安全成为人们当前广泛关注的一个话题,比如,如何确定道路上某个十字路口或邻近十字路交通信号灯的指示状态,来保证行车的安全性等。With the continuous improvement of road complexity and the increasing number of vehicles, driving safety has become a topic of widespread concern. For example, how to determine the indication status of a certain crossroad or adjacent crossroad traffic lights on the road to ensure driving safety. sex etc.
相关技术中,交通信号灯状态常用的确定方式,是先通过车辆上的车载摄像头来获取包含交通信号灯的图像,然后,再根据车辆定位装置定位该图像中的交通信号灯出现在电子地图上的感兴趣区域,最后在感兴趣区域中检测并识别交通信号灯的当前状态,并输出当前的识别结果。但是,相关技术中,由于车辆定位装置的误差、车载摄像头相机参数的偏差以及在车辆行驶过程中交通信号灯在拍摄图像中的大小与位置的变化等各种不确定因素,无法准确的识别出车辆通过当前路口时所需关注的交通信号灯的当前状态。In related technologies, the commonly used way to determine the state of traffic lights is to first obtain an image containing traffic lights through the vehicle-mounted camera, and then locate the traffic lights in the image on the electronic map according to the vehicle positioning device. area, and finally detect and identify the current state of traffic lights in the area of interest, and output the current recognition results. However, in the related art, due to various uncertain factors such as the error of the vehicle positioning device, the deviation of the camera parameters of the vehicle-mounted camera, and the change of the size and position of the traffic signal light in the captured image during the driving of the vehicle, it is impossible to accurately identify the vehicle. The current state of the traffic lights that need attention when passing the current intersection.
因此,如何准确的识别出车辆通过当前路口时所需关注的交通信号灯的状态,是目前有待解决的技术问题。Therefore, how to accurately identify the state of the traffic signal lights that the vehicle needs to pay attention to when passing the current intersection is a technical problem to be solved at present.
发明内容Contents of the invention
本发明提供一种用于指示灯状态识别的方法、装置、电子设备、计算机可读存储介质及计算机程序产品,以至少解决相关技术中在车辆通过当前路口时不能准确的识别出当前路口所需关注的交通信号灯的状态的技术问题。The present invention provides a method, device, electronic equipment, computer-readable storage medium and computer program product for identifying the state of an indicator light, so as to at least solve the problem that the current intersection cannot be accurately identified when the vehicle passes the current intersection in the related art. Concerned about technical issues with the status of traffic lights.
本发明的技术方案如下:Technical scheme of the present invention is as follows:
根据本发明实施例的第一方面,提供一种指示灯状态识别方法,包括:获取当前时刻拍摄车辆前方的交通信号图像,以及所述当前时刻所述车辆的定位信息;若获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,则根据所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交通信号图像上的感兴趣区域ROI;对所述感兴趣区域ROI中的交通信号灯进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态;更新历史跟踪目标的在所述当前时刻的状态,其中,所述历史跟踪目标为当前时刻的前一段时间内交通信号灯的检测识别结果;确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果;若所述第一匹配结果为所述历史跟踪目标匹配上当前时刻需要经过路口的交通信号灯的状态,则获取当前时刻匹配上的交通信号灯对应的所述历史跟踪目标的历史显示属性信息,其中,匹配上的交通信号灯为目标交通信号灯;若获取到所述电子地图中当前时刻包括所述目标交通信号灯的位置信息,则确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标的第二匹配结果;根据所述第二匹配结果获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性状态,所述显示属性状态包括目标交通信号灯的颜色状态和形状状态;输出所述目标交通信号灯的显示属性状态。According to the first aspect of the embodiments of the present invention, there is provided a method for identifying the state of an indicator light, comprising: obtaining the traffic signal image in front of the vehicle taken at the current moment, and the location information of the vehicle at the current moment; if obtained from the electronic map The location information of the traffic lights that the vehicle currently needs to pass through the intersection, then determine the ROI of the location information of the traffic lights that the vehicle currently needs to pass through the intersection on the traffic signal image according to the positioning information of the vehicle at the current moment ; detect and identify the traffic lights in the region of interest ROI to obtain the state of the traffic lights that need to pass through the intersection at the current moment; update the state of the historical tracking target at the current moment, wherein the historical tracking target is the current The detection and recognition results of traffic lights within a period of time before the moment; determine the first matching result between the state of the traffic lights that need to pass through the intersection at the current moment and the state of the historical tracking target at the current moment; if the first matching result is the The historical tracking target matches the state of the traffic lights that need to pass through the intersection at the current moment, then obtain the historical display attribute information of the historical tracking target corresponding to the traffic lights matched at the current moment, wherein the matched traffic lights are the target traffic lights If the position information of the target traffic signal light is included in the electronic map at the current moment, then determine the second matching result between the projected position of the target traffic signal light on the traffic signal light image and the historical tracking target; According to the second matching result, the projected position of the target traffic signal light is matched to the display attribute state of the corresponding historical tracking target, the display attribute state includes the color state and shape state of the target traffic signal light; output the target The display property state of the traffic light.
根据本发明实施例的第二方面,提供一种指示灯状态识别装置,包括:第一获取模块,用于获取当前时刻拍摄车辆前方的交通信号图像,以及所述当前时刻所述车辆的定位信息;第二获取模块,用于获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息;第一确定模块,用于在所述第二获取模块获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息时,根据所述第一获取模块获取的所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交 通信号图像上的感兴趣区域ROI;检测识别模块,用于对所述感兴趣区域ROI中的交通信号灯进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态;更新模块,用于更新历史跟踪目标的在所述当前时刻的状态,其中,所述历史跟踪目标为当前时刻的前一段时间内交通信号灯的检测识别结果;第二确定模块,用于确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果;第三获取模块,用于在所述第二确定模块确定的所述第一匹配结果为所述历史跟踪目标匹配上当前时刻需要经过路口的交通信号灯的状态时,获取所述当前时刻匹配上的交通信号灯对应的所述历史跟踪目标的历史显示属性信息,其中,匹配上的交通信号灯为目标交通信号灯;第四获取模块,用于获取所述电子地图中包括当前时刻包括所述目标交通信号灯的位置信息;第三确定模块,用于在所述第四获取模块获取到所述电子地图中包括所述目标交通信号灯的位置信息时,确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标的第二匹配结果;第五获取模块,用于根据所述第二匹配结果获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性状态,所述显示属性状态包括交通信号灯的颜色状态和形状状态;输出模块,用于输出所述第五获取模块获取的所述目标交通信号灯的显示属性状态。According to the second aspect of the embodiments of the present invention, there is provided a device for identifying the status of an indicator light, including: a first acquisition module, configured to acquire a traffic signal image in front of a vehicle at the current moment, and the location information of the vehicle at the current moment The second acquisition module is used to acquire the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map; the first determination module is used to acquire the current position of the vehicle in the electronic map by the second acquisition module. When the location information of the traffic lights passing through the intersection is needed, determine the position information of the traffic lights that the vehicle currently needs to pass through the intersection on the traffic signal image according to the positioning information of the vehicle at the current moment acquired by the first acquisition module Region of interest ROI; Detection and identification module, used to detect and identify the traffic lights in the region of interest ROI, to obtain the status of the traffic lights that need to pass through the intersection at the current moment; Update module, used to update the historical tracking target in the location The state at the current moment, wherein the historical tracking target is the detection and recognition result of the traffic signal lights in the previous period of time at the current moment; The first matching result of the state of the tracking target at the current moment; the third acquisition module is used to match the historical tracking target with the traffic that needs to pass through the intersection at the current moment in the first matching result determined by the second determination module When the traffic signal is in the state of the traffic signal, obtain the historical display attribute information of the historical tracking target corresponding to the traffic signal matched at the current moment, wherein the matched traffic signal is the target traffic signal; the fourth acquisition module is used to obtain the The electronic map includes the position information of the target traffic light at the current moment; the third determination module is configured to determine the position information of the target traffic light in the electronic map when the fourth acquisition module acquires the position information of the target traffic light in the electronic map. The second matching result of the projection position of the target traffic signal light on the traffic signal light image and the historical tracking target; the fifth acquisition module is used to obtain the matching of the projection position of the target traffic signal light according to the second matching result To the display attribute state of the corresponding historical tracking target, the display attribute state includes the color state and shape state of the traffic signal light; an output module, configured to output the display attribute of the target traffic signal light acquired by the fifth acquisition module state.
根据本发明实施例的第三方面,提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现如上所述的指示灯状态识别方法。According to a third aspect of the embodiments of the present invention, there is provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement The method for identifying the state of the indicator light as described above.
根据本发明实施例的第四方面,提供一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如上所述的指示灯状态识别方法。According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the above-mentioned How to recognize the state of the indicator light.
根据本发明实施例的第五方面,提供一种计算机程序产品,包括计算机程序或指令,所述计算机程序或指令被处理器执行时实现如上所述的指示灯状态识别方法。According to a fifth aspect of the embodiments of the present invention, there is provided a computer program product, including a computer program or an instruction, and when the computer program or instruction is executed by a processor, the method for identifying the status of an indicator light as described above is implemented.
本发明的实施例提供的技术方案至少可以包括以下有益效果:本发明实施例提供的指示灯状态识别方法,将从电子地图中当前时刻获取到的包括所述目标交通信号灯的位置信息投影到车载拍摄图像中,有效定位交通信号灯在车载拍摄图像中所处的感兴趣区域所处的感兴趣区域,通过对该感兴趣区域的交通信号灯进行识别,精确选定通过当前路口所需关注的交通信号灯,再将当前帧的检测结果与该交通信号灯之前一段时间各帧的输出结果相融合,准确识别并输出交通信号灯的状态,从而提高交通信号灯状态识别的准确率。The technical solution provided by the embodiments of the present invention may at least include the following beneficial effects: the method for identifying the state of the indicator light provided by the embodiments of the present invention projects the position information including the target traffic light obtained from the electronic map at the current moment onto the vehicle In the captured image, the area of interest where the traffic signal light is located in the vehicle-mounted image is effectively located, and the traffic signal light in the area of interest is identified to accurately select the traffic signal light that needs to be paid attention to when passing the current intersection , and then fuse the detection results of the current frame with the output results of the previous frames of the traffic light to accurately identify and output the state of the traffic light, thereby improving the accuracy of traffic signal state recognition.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理,并不构成对本发明的不当限定。The accompanying drawings here are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention, and used together with the specification to explain the principle of the present invention, and do not constitute an improper limitation of the present invention.
图1是本发明实施例提供的一种指示灯状态识别方法的流程图。Fig. 1 is a flow chart of a method for identifying the state of an indicator light provided by an embodiment of the present invention.
图2是本发明实施例提供的一种指示灯状态识别方法的应用实例的流程图。Fig. 2 is a flow chart of an application example of a method for identifying the state of an indicator light provided by an embodiment of the present invention.
图3是本发明实施例提供的一种指示灯状态识别装置的框图。Fig. 3 is a block diagram of a device for identifying the state of an indicator light provided by an embodiment of the present invention.
图4是本发明实施例提供的第一确定模块的结构示意图。Fig. 4 is a schematic structural diagram of a first determining module provided by an embodiment of the present invention.
图5是本发明实施例提供的投影模块的结构示意图。FIG. 5 is a schematic structural diagram of a projection module provided by an embodiment of the present invention.
图6是本发明实施例提供的第二确定模块的结构示意图。Fig. 6 is a schematic structural diagram of a second determining module provided by an embodiment of the present invention.
图7是本发明实施例提供的第三确定模块的结构示意图。Fig. 7 is a schematic structural diagram of a third determining module provided by an embodiment of the present invention.
图8是本发明实施例提供的一种指示灯状态识别装置的另一框图。Fig. 8 is another block diagram of a device for identifying the state of an indicator light provided by an embodiment of the present invention.
图9是本发明实施例提供的一种指示灯状态识别装置的又一框图。Fig. 9 is another block diagram of a device for identifying the state of an indicator light provided by an embodiment of the present invention.
图10是本发明实施例提供的一种电子设备的结构框图。Fig. 10 is a structural block diagram of an electronic device provided by an embodiment of the present invention.
图11是本发明实施例提供的一种具有指示灯状态识别的装置的结构框图。Fig. 11 is a structural block diagram of a device with indicator light status recognition provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本发明的技术方案,下面将结合附图,对本发明实施例中的技术方案进行清楚、完整地描述。In order to enable ordinary persons in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。It should be noted that the terms "first" and "second" in the description and claims of the present invention and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.
图1是根据一示例性实施例示出的一种指示灯状态识别方法的流程图,该指示灯状态识别方法可以用于终端中,终端实施设备可以是车载终端等电子设备,在此不作限制,如图1所示,该实施例可以包括以下步骤:步骤101,获取当前时刻拍摄车辆前方的交通信号图像,以及所述当前时刻所述车辆的定位信息。Fig. 1 is a flow chart of a method for identifying the status of an indicator light according to an exemplary embodiment. The method for identifying the status of an indicator light can be used in a terminal, and the terminal implementation device can be an electronic device such as a vehicle-mounted terminal, which is not limited here. As shown in FIG. 1 , this embodiment may include the following steps: Step 101 , acquiring the traffic signal image in front of the vehicle at the current moment and the location information of the vehicle at the current moment.
其中,该实施例中,车载终端在检测到拍摄指令时,启动车载相机进行拍摄,该车载相机该可以是集成在记录仪上,也可以独立部署在车机上,本实施例不做限制。Wherein, in this embodiment, when the vehicle-mounted terminal detects the shooting instruction, it starts the vehicle-mounted camera to take pictures. The vehicle-mounted camera may be integrated on the recorder, or independently deployed on the vehicle, which is not limited in this embodiment.
该步骤中,可以车载终端可以通过卫星导航系统定位到当前车辆的定位信息,当然,也可以通过其他方式定位到当前车辆的定位信息,其中,车载终端通过卫星定位导航系统进行定位的具体过程,对于本领域技术人员来说,已是熟知技术,在此不再赘述。In this step, the vehicle-mounted terminal can locate the positioning information of the current vehicle through the satellite navigation system, of course, it can also locate the positioning information of the current vehicle in other ways, wherein, the specific process of the vehicle-mounted terminal positioning through the satellite positioning and navigation system, It is a well-known technology for those skilled in the art, so it will not be repeated here.
步骤102,若获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,则根据所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交通信号图像上的感兴趣区域ROI。 Step 102, if the location information of the traffic lights that the vehicle needs to pass through the intersection is obtained in the electronic map, then determine the location information of the traffic lights that the vehicle needs to pass through the intersection according to the positioning information of the vehicle at the current moment. A region of interest ROI on a traffic signal image.
该步骤中,车载终端先判断是否获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,如果获取到,先根据所述当前时刻车辆的定位信息将所述车辆当前需要经过路口的交通信号灯的位置信息投影到所述交通信号图像上,获得当前需要经过路口的交通信号灯在所述交通信号图像上的二维坐标信息;然后,以所述投影的投影点为中心获取当前需要经过路口的交通信号灯在所述交通信号图像上的感兴趣区域(ROI,region of interest)。其中以所述投影的投影点为中心获取当前需要经过路口的交通信号灯在所述交通信号图像上的感兴趣区域的过程,已是熟知技术,在此不再赘述。其中,ROI,为在机器视觉、图像处理中,从被处理的图像以方框、圆、椭圆、不规则多边形等方式勾勒出需要处理的区域,称为感兴趣区域。In this step, the vehicle-mounted terminal first judges whether the position information of the traffic signal lights that the vehicle currently needs to pass through the intersection in the electronic map has been obtained, and if it is obtained, first according to the positioning information of the vehicle at the current moment, the location information of the traffic lights that the vehicle currently needs to pass through the intersection The position information of the traffic signal lights is projected onto the traffic signal image to obtain the two-dimensional coordinate information of the traffic signal lights that need to pass through the intersection on the traffic signal image; A region of interest (ROI, region of interest) on the traffic signal image of the traffic lights passing through the intersection. The process of obtaining the region of interest on the traffic signal image of the traffic signal light that needs to pass through the intersection with the projected projection point as the center is a well-known technology and will not be repeated here. Among them, ROI, in machine vision and image processing, outlines the area to be processed from the processed image in the form of a box, circle, ellipse, irregular polygon, etc., called the region of interest.
其中,所述根据所述当前时刻车辆的定位信息将所述车辆当前需要经过路口的交通信号灯的位置信息投影到所述交通信号图像上,获得当前需要经过路口的交通信号灯在所述交通信号图像上的二维坐标信息,可以包括:当前需要经过路口的交通信号灯的位置信息与所述车辆的定位信息所在位置之间的距离;在根据所述距离,将当前需要经过路口的交通信号灯映射到所述交通信号灯图像中,获得当前需要经过路口的交通信号灯在交通信号灯图像上投影的二维坐标信息。Wherein, according to the positioning information of the vehicle at the current moment, the position information of the traffic lights that the vehicle needs to pass through the intersection is projected onto the traffic signal image, and the traffic signal lights that need to pass the intersection are obtained in the traffic signal image. The two-dimensional coordinate information on the above may include: the distance between the position information of the traffic lights that need to pass the intersection and the location information of the vehicle; according to the distance, map the traffic lights that need to pass the intersection to In the traffic signal light image, the two-dimensional coordinate information projected on the traffic signal light image by the traffic signal light that needs to pass through the intersection currently is obtained.
也就是说,该实施例中,需要先获得当前需要经过路口的交通信号灯的位置与当前所述车辆所在位置之间的距离,在将当前需要经过路口的交通信号灯的位置信息(即三维图像)映射至车载相机录制的交通信号灯图像(该图像为二维图像)中,从而获得了当前需要经过路口的交通信号灯在该交通信号灯图像上的投影结果,其中,投影结果为二维坐标信息。即本实施例中,为实现当前需要经过路口的交通信号灯的位置信息在交通信号灯图像上的映射,需要先明确交当前需要经过路口的交通信号灯与当前车辆的相对位置关系。本发明实施例采用的一种方式是,采用该交通信号灯的端点坐标集合描述其空间位置:先获取该交通信号灯的各端点与当前车辆之间的相对位置关系后,结合车载相机已标定得到的内外参数,参照相机的小孔成像原理,可将该交通信号灯的位置从三维空间投影至交通信号灯图像的二维平面上,以获取投影坐标集合。该投影点中心的 坐标即为投影坐标集合中各元素对应坐标和的均值。That is to say, in this embodiment, it is necessary to first obtain the distance between the position of the traffic signal light that needs to pass through the intersection and the current position of the vehicle, and then obtain the position information (ie, the three-dimensional image) of the traffic signal light that needs to pass the intersection. Mapped to the traffic signal image recorded by the on-board camera (the image is a two-dimensional image), thereby obtaining the projection result of the traffic signal light that needs to pass through the intersection on the traffic signal image, wherein the projection result is two-dimensional coordinate information. That is, in this embodiment, in order to realize the mapping of the position information of the traffic lights currently passing through the intersection on the traffic signal image, it is necessary to clarify the relative positional relationship between the traffic lights currently passing through the intersection and the current vehicle. One method adopted in the embodiment of the present invention is to use the endpoint coordinate set of the traffic signal light to describe its spatial position: first obtain the relative positional relationship between each endpoint of the traffic signal light and the current vehicle, and combine the calibrated data obtained by the on-board camera For internal and external parameters, referring to the small hole imaging principle of the camera, the position of the traffic light can be projected from the three-dimensional space to the two-dimensional plane of the traffic signal image to obtain a set of projected coordinates. The coordinates of the center of the projected point are the mean value of the corresponding coordinates of each element in the projected coordinate set.
步骤103,对所述感兴趣区域ROI中的交通信号灯进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态。 Step 103 , detecting and identifying the traffic lights in the region of interest ROI to obtain the status of the traffic lights that need to pass through the intersection at the current moment.
该步骤中,车载相机可以利用图像检测技术和图像识别技术,对该所述感兴趣区域ROI中的交通信号灯的位置和大小进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态,所述状态,可以包括各个交通信号灯的位置和大小。In this step, the vehicle-mounted camera can use image detection technology and image recognition technology to detect and identify the position and size of the traffic lights in the region of interest ROI, and obtain the status of the traffic lights that need to pass through the intersection at the current moment. Status, which can include the location and size of individual traffic lights.
当然,本实施例中,也可以将感兴趣区域的图像依次输入到对应的检测模型和识别模型,分别进行交通信号灯的检测与识别。其中,该交通信号灯检测模型与识别模型可以是根据传统的机器学习算法训练得到模型,也可以根据深度学习算法得到模型,本发明实时例对于该系列模型的训练过程所使用的方法不做限制。在具体的事例中,交通信号灯检测模型可以采用centernet的深度学习算法训练得到,交通信号灯识别模型可以采用误差反向传播网络训练得到。其中,交通信号灯检测模型在感兴趣区域的交通信号灯图像上获得交通信号灯在所述图像上的位置以及尺寸。Of course, in this embodiment, the images of the region of interest may also be sequentially input to the corresponding detection model and recognition model to perform detection and recognition of traffic lights respectively. Wherein, the traffic signal detection model and recognition model can be trained according to traditional machine learning algorithms, or can be obtained according to deep learning algorithms. The real-time example of the present invention does not limit the methods used in the training process of the series of models. In a specific example, the traffic signal detection model can be trained using centernet's deep learning algorithm, and the traffic signal recognition model can be trained using the error backpropagation network. Wherein, the traffic signal light detection model obtains the position and size of the traffic signal light on the image of the traffic signal light in the region of interest.
步骤104,更新历史跟踪目标的在所述当前时刻的状态,其中,所述历史跟踪目标为当前时刻的前一段时间内交通信号灯的检测识别结果。Step 104, updating the state of the historical tracking target at the current moment, wherein the historical tracking target is the detection and recognition result of the traffic signal light in a period of time before the current moment.
该步骤中,更新历史跟踪目标集合中每个历史跟踪目标的位置与尺寸,使其状态与当前时刻相匹配。其中,历史跟踪目标是指向当前时刻前的一段时间内的交通信号灯识别结果。In this step, the position and size of each historical tracking target in the historical tracking target set are updated so that its state matches the current moment. Among them, the historical tracking target refers to the recognition result of the traffic signal light within a period of time before the current moment.
步骤105,确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果。 Step 105, determining a first matching result between the state of the traffic lights that need to pass through the intersection at the current moment and the state of the historical tracking target at the current moment.
其中,该步骤中,先确定当前时刻需要经过路口的交通信号灯的状态与历史跟踪目标的状态的第一关联矩阵(即关联分数);在对所述第一关联矩阵进行匹配,得到当前时刻需要经过路口的交通信号灯与历史跟踪目标之间的第一对应关系;并根据所述第一对应关系判定所述历史跟踪目标关联上当前时刻需要经过路口的交通信号灯的状态;以及利用所述当前时刻需要经过路口的交通信号灯的状态更新所述历史跟踪目标的状态。Wherein, in this step, first determine the first association matrix (ie association score) of the state of the traffic lights that need to pass through the crossing at the current moment and the state of the historical tracking target; The first corresponding relationship between the traffic lights passing through the intersection and the historical tracking target; and according to the first corresponding relationship, it is determined that the historical tracking target is associated with the state of the traffic lights that need to pass through the intersection at the current moment; and using the current moment The state of the historical tracking target needs to be updated with the state of the traffic lights passing through the intersection.
也就是说,本发明实施例中,首先构建当前时刻需要经过路口的交通信号灯的状态(即检测结果)和历史跟踪目标之间的关联矩阵,然后,采用最优匹配原则决定二者之间一一对应关系(本文称为第一对应关系)。具体地,该实施例中的关联矩阵是交通信号灯的检测结果和历史跟踪目标之间相互关联的关联分数,关联分数越高,表示二者是同一个物体的可能性越大,相反的,关联分数越低,表示二者是不同的物体的可能性较大。That is to say, in the embodiment of the present invention, first construct the correlation matrix between the state of the traffic signal light (that is, the detection result) that needs to pass through the intersection at the current moment and the historical tracking target, and then use the optimal matching principle to determine the relationship matrix between the two. One-to-one correspondence (herein referred to as the first correspondence). Specifically, the correlation matrix in this embodiment is the correlation score between the detection result of the traffic light and the historical tracking target. The higher the correlation score, the greater the possibility that the two are the same object. On the contrary, the correlation The lower the score, the more likely the two are different objects.
其中,关联分数的计算方式包括但不限于下述:一种方式是通过计算交通信号灯的检测结果和历史跟踪目标之间的距离远近,然后利用最优匹配算法,比如,匈牙利算法等,对得到的关联矩阵进行匹配,输出当前交通信号灯的检测结果和历史跟踪目标的对应关系(即第一对应关系)。需要说明的是,由于车辆定位装置的误差、车载摄像头和相机参数的偏差以及在车辆行驶过程中交通信号灯在拍摄图像中的大小与位置的变化等各种不利因素,可能会有新的交通信号灯进入感兴趣区域图像,或者历史跟踪目标在当前时刻未能成功检测识别或历史跟踪目标离开感兴趣区域图像等情况出现,其匹配结果通常有三种情况,即当前交通信号灯检测结果未能关联上历史跟踪目标,历史跟踪目标未能与当前交通信号灯检测结果关联上,历史跟踪目标未能与当前交通信号灯检测结果关联上。为了便于描述,本实施例以历史跟踪目标未能与当前交通信号灯检测结果关联上为例来说明,其余两种情况详见下述实施例。Among them, the calculation method of the correlation score includes but is not limited to the following: one way is to calculate the distance between the detection result of the traffic light and the historical tracking target, and then use the optimal matching algorithm, such as the Hungarian algorithm, to obtain The correlation matrix is matched, and the corresponding relationship (ie, the first corresponding relationship) between the detection result of the current traffic signal and the historical tracking target is output. It should be noted that due to various unfavorable factors such as the error of the vehicle positioning device, the deviation of the vehicle camera and camera parameters, and the change of the size and position of the traffic light in the captured image during the driving of the vehicle, there may be new traffic lights. When entering the image of the region of interest, or the historical tracking target fails to be detected and recognized at the current moment, or the historical tracking target leaves the image of the region of interest, etc., the matching results usually have three situations, that is, the current traffic signal detection result cannot be associated with the history Tracking target, the historical tracking target cannot be associated with the current traffic signal detection result, and the historical tracking target cannot be associated with the current traffic signal detection result. For ease of description, this embodiment takes the history tracking target not being associated with the current traffic signal detection result as an example for illustration, and the other two cases are detailed in the following embodiments.
该步骤中,先构建的关联矩阵的数量与采用目标跟踪算法的数量相同。本实施例以采用的目标跟踪算法分为方法A与方法B,需先对采用的目标跟踪算法设定不同的优先级,即先对交通信号灯检测结果和历史跟踪目标进行关联时,在采用优先级更高的跟踪算法得到的跟踪结果,将该跟踪结果与交通信号灯的检测结果相匹配。如果未能匹配上, 则继续跟踪目标,采用优先级更低的跟踪算法得到的跟踪结果,再将利用更低的跟踪算法得到的跟踪结果与还未匹配上的交通信号的灯检测结果继续相匹配。以此类推,直至利用所有跟踪算法的跟踪结果都被匹配上。In this step, the number of correlation matrices constructed first is the same as that of the target tracking algorithm. In this embodiment, the target tracking algorithm used is divided into method A and method B. It is necessary to set different priorities for the target tracking algorithm used, that is, when the traffic signal detection results are first associated with the historical tracking target, the priority The tracking result obtained by a higher-level tracking algorithm is matched with the detection result of the traffic light. If it fails to match, continue to track the target, use the tracking result obtained by the tracking algorithm with lower priority, and then continue to compare the tracking result obtained by using the lower tracking algorithm with the light detection result of the traffic signal that has not yet been matched. match. And so on, until the tracking results using all tracking algorithms are matched.
步骤106,若所述第一匹配结果为所述历史跟踪目标匹配上当前时刻需要经过路口的交通信号灯的状态,则获取当前时刻匹配上的交通信号灯对应的所述历史跟踪目标的历史显示属性信息,其中,匹配上的交通信号灯为目标交通信号灯。 Step 106, if the first matching result is that the historical tracking target matches the state of a traffic signal that needs to pass through the intersection at the current moment, then acquire the historical display attribute information of the historical tracking target corresponding to the traffic signal that is matched at the current moment , where the matched traffic signal is the target traffic signal.
其中,历史显示属性信息包括前n帧与该跟踪目标关联上的交通信号灯检测结果的显示属性信息。构建显示属性信息可以按照时间前后排列的序列,对其做时间平滑,并通过投票融合获取最多投票属性作为该跟踪目标当前时刻的输出状态结果。Wherein, the historical display attribute information includes the display attribute information of the traffic signal light detection results associated with the tracking target in the previous n frames. Constructing the sequence of display attribute information can be arranged according to time, smoothing it in time, and obtaining the most voting attributes through voting fusion as the output state result of the tracking target at the current moment.
也即是说,如果历史跟踪目标与当前交通信号灯检测结果关联上(或匹配上等),利用历史目标跟踪算法对当前时刻匹配上的交通信号灯的检测结果更新对应的历史跟踪目标的运动状态与显示属性信息。That is to say, if the historical tracking target is associated (or matched) with the current traffic signal detection result, use the historical target tracking algorithm to update the corresponding historical tracking target's motion state and Display attribute information.
步骤107,若获取到所述电子地图中包括所述目标交通信号灯的位置信息,则确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标的第二匹配结果。Step 107: If the electronic map includes the position information of the target traffic light, determine a second matching result between the projected position of the target traffic light on the traffic signal image and the historical tracking target.
该步骤中,车载终端先判断该电子地图中是否包括所述目标交通信号灯的位置信息,如果包括,则创建当前时刻所述目标交通信号灯在所述交通信号灯图像上的投影位置与历史跟踪目标的第二关联矩阵(即关联分数),之后,对所述第二关联矩阵进行匹配,得到当前时刻目标交通信号灯投影与历史跟踪目标的第二对应关系;最后,根据所述第二对应关系判定所述目标通信号灯投影位置匹配到对应的历史跟踪目标。In this step, the vehicle-mounted terminal first judges whether the electronic map includes the position information of the target traffic light, and if so, creates the projection position of the target traffic light on the traffic signal image at the current moment and the historical tracking target information. The second association matrix (i.e. the association score), afterward, the second association matrix is matched to obtain the second corresponding relationship between the current moment target traffic signal projection and the historical tracking target; finally, according to the second corresponding relationship to determine the Match the projection position of the signal light of the above-mentioned target to the corresponding historical tracking target.
具体地,关联矩阵是目标交通信号灯投影和历史跟踪目标之间的关联分数,关联分数越高,代表二者是同一个物体的可能性越大,反之,关联分数越低,代表二者是不是同一个物体的可能性越大。关联分数的计算方式包括但不限于计算目标交通信号灯投影和历史跟踪目标之间的距离远近。然后使用最优匹配算法,比如匈牙利算法,对得到的关联矩阵进行匹配,输出目标交通信号灯投影和历史跟踪目标的对应关系(即第二对应关系),根据所述第二对应关系判定所述目标通信号灯投影位置匹配到对应的历史跟踪目标。Specifically, the correlation matrix is the correlation score between the target traffic light projection and the historical tracking target. The higher the correlation score, the greater the possibility that the two are the same object. Conversely, the lower the correlation score, it means that the two are not The more likely it is the same object. The calculation method of the association score includes but is not limited to calculating the distance between the target traffic signal projection and the historical tracking target. Then use an optimal matching algorithm, such as the Hungarian algorithm, to match the obtained correlation matrix, output the corresponding relationship (ie, the second corresponding relationship) between the target traffic signal projection and the historical tracking target, and determine the target according to the second corresponding relationship Match the projection position of the traffic signal light to the corresponding historical tracking target.
步骤108,根据所述第二匹配结果获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性状态,所述显示属性状态包括目标交通信号灯的颜色状态和形状状态。 Step 108 , according to the second matching result, obtain that the projected position of the target traffic signal is matched to the display property state of the corresponding historical tracking target, and the display property state includes the color state and shape state of the target traffic signal light.
该步骤中,如果第二匹配结果为所述目标通信号灯投影位置匹配到对应的历史跟踪目标,则获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性信息,其中,所述显示属性信息可以包括交通信号灯的颜色信息和形状信息,颜色信息包括下述一种:红、黄、绿以及无显示等,形状信息至少包括下述之一:圆形、左转箭头、右转箭头以及直行箭头等。但在具体实现时,本发明实施例提供交通信号灯的显示属性信息并不限于此。In this step, if the second matching result is that the projection position of the target traffic signal matches the corresponding historical tracking target, then acquire the display attribute information that the projection position of the target traffic signal matches the corresponding historical tracking target, wherein , the display attribute information may include the color information and shape information of the traffic lights, the color information includes one of the following: red, yellow, green, and no display, etc., and the shape information includes at least one of the following: circle, left-turn arrow , right-turning arrow, straight-going arrow, etc. However, during specific implementation, the display attribute information of the traffic signal light provided by the embodiment of the present invention is not limited thereto.
步骤109,输出所述目标交通信号灯的显示属性信息。 Step 109, outputting display attribute information of the target traffic signal light.
其中,该步骤中,输出选定的目标交通信号灯显示属性状态,作为车辆驾驶规划的依据。Wherein, in this step, the selected target traffic signal light display attribute status is output as a basis for vehicle driving planning.
本发明实施例提供的指示灯状态识别方法,将从电子地图中当前时刻获取到的包括所述目标交通信号灯的位置信息投影到车载拍摄图像中,有效定位交通信号灯在车载拍摄图像中所处的感兴趣区域所处的感兴趣区域,通过对该感兴趣区域的交通信号灯进行识别,精确选定通过当前路口所需关注的交通信号灯,再将当前帧的检测结果与该交通信号灯之前一段时间各帧的输出结果相融合,准确识别并输出交通信号灯的状态,从而提高交通信号灯状态识别的准确率。The indicator light state recognition method provided by the embodiment of the present invention projects the location information including the target traffic signal light obtained from the electronic map at the current moment into the vehicle-mounted image, effectively locating the location of the traffic signal light in the vehicle-mounted image The area of interest where the area of interest is located, by identifying the traffic lights in the area of interest, accurately select the traffic lights that need to be paid attention to when passing the current intersection, and then compare the detection results of the current frame with the traffic lights in the previous period The output results of the frame are fused to accurately identify and output the state of the traffic signal light, thereby improving the accuracy of the state recognition of the traffic signal light.
可选的,在另一实施例中,该实施例在上述实施例的基础上,还可以包括:若没有 获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,判断是否存在历史交通信号灯跟踪目标;如果不存在,则将所述默认检测区域设置为感兴趣区域;如果存在,则预测并更新所述历史交通信号灯跟踪目标在当前时刻的状态;根据所述当前时刻车辆的定位信息确定所述历史交通信号灯跟踪目标在所述交通信号图像上的感兴趣区域ROI,其中,将所述历史交通信号灯跟踪目标作为当前需要经过路口的交通信号灯。Optionally, in another embodiment, on the basis of the above embodiment, this embodiment may also include: if the position information of the traffic signal lights that the vehicle currently needs to pass through the intersection in the electronic map is not obtained, judging whether there is Historical traffic light tracking target; if it does not exist, then the default detection area is set as an area of interest; if it exists, then predict and update the state of the historical traffic light tracking target at the current moment; according to the vehicle's current state The location information determines the region of interest (ROI) of the historical traffic signal light tracking target on the traffic signal image, wherein the historical traffic signal light tracking target is used as a traffic signal that needs to pass through the intersection currently.
本实施例中,若车载终端没有获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,则需要判断是否存在历史交通信号灯跟踪目标,如果不存在,设置默认检测区域为感兴趣区域;如果存在,依据跟踪算法预测并更新历史交通信号灯跟踪目标在该当前时刻的位置与大小,之后,再以历史交通信号灯跟踪目标在拍摄的交通信号图像(即车载拍摄的二维图像)上的坐标的中心为中心获取感兴趣区域。具体为:将历史交通信号灯跟踪目标的位置信息投影该交通信号图像上,以获取二维坐标信息,之后,再以投影点为中心获取对应的感兴趣区域。In this embodiment, if the vehicle-mounted terminal does not obtain the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map, it needs to determine whether there is a historical traffic light tracking target. If it does not exist, set the default detection area as interested Area; if it exists, predict and update the position and size of the historical traffic light tracking target at the current moment according to the tracking algorithm, and then use the historical traffic signal tracking target on the captured traffic signal image (ie, the two-dimensional image taken by the vehicle) The center of the coordinates of is the center to obtain the region of interest. Specifically, the location information of the historical traffic signal light tracking target is projected onto the traffic signal image to obtain two-dimensional coordinate information, and then the corresponding region of interest is obtained centering on the projected point.
可选的,在另一实施例中,该实施例在上述实施例的基础上,还可以包括:第一种情况,若所述第一匹配结果为当前时刻需要经过路口的交通信号灯的状态未能匹配上所述历史跟踪目标,则创建新的跟踪目标,并将新的所述跟踪目标添加到历史跟踪目标集合中。Optionally, in another embodiment, on the basis of the above embodiment, this embodiment may also include: the first case, if the first matching result is that the status of the traffic lights that need to pass the intersection at the current moment is not If the above-mentioned historical tracking target can be matched, a new tracking target is created, and the new tracking target is added to the set of historical tracking targets.
也就是说,如果当前交通信号灯检测结果未能关联上历史跟踪目标,说明有新的交通信号灯进入感兴趣区域,进而为该检测结果生成一个新的跟踪目标实体,并将其加入到历史跟踪目标集合中。That is to say, if the current traffic light detection result fails to associate with the historical tracking target, it means that a new traffic light has entered the area of interest, and then a new tracking target entity is generated for the detection result and added to the historical tracking target set.
本发明实施例中,若所述第一匹配结果为当前时刻需要经过路口的交通信号灯的状态未能匹配上所述历史跟踪目标,则通过创建新的跟踪目标,来提高交通信号灯状态的识别效率。In the embodiment of the present invention, if the first matching result is that the state of the traffic signal lights that need to pass through the intersection at the current moment fails to match the historical tracking target, a new tracking target is created to improve the recognition efficiency of the traffic signal light state .
第二种,若所述第一匹配结果为所述历史跟踪目标未能匹配上当前时刻需要经过路口的交通信号灯的状态,判断是否移除所述历史跟踪目标;如果是,移除所述历史跟踪目标;如果否,更新所述历史跟踪目标的状态,所述状态记录当前帧中所述历史跟踪目标是否被检测到的信息。Second, if the first matching result is that the historical tracking target fails to match the state of the traffic lights that need to pass through the intersection at the current moment, determine whether to remove the historical tracking target; if so, remove the historical tracking target Track the target; if not, update the state of the historical tracking target, and the state records information about whether the historical tracking target is detected in the current frame.
也就是说,如果历史跟踪目标未能与当前交通信号灯检测结果关联上,说明历史跟踪目标在当前时刻未能成功检测识别或历史跟踪目标离开感兴趣区域等情况出现,为保证跟踪结果的稳定性,需要进一步判定是否删除该跟踪目标,其判定的标准,比如可以根据前m帧中未检测到该历史跟踪目标为例。若符合删除的标准,则将该跟踪目标从历史跟踪目标集合中删除;否则,更新该历史跟踪目标的状态,该状态包括标记在当前帧中该跟踪目标是否被检测到的信息。That is to say, if the historical tracking target cannot be associated with the current traffic light detection result, it means that the historical tracking target has failed to be detected and recognized at the current moment or the historical tracking target has left the area of interest. In order to ensure the stability of the tracking result , it is necessary to further determine whether to delete the tracking target, and the criteria for the determination may be based on the fact that the historical tracking target has not been detected in the previous m frames as an example. If the deletion criterion is met, the tracking target is deleted from the historical tracking target collection; otherwise, the status of the historical tracking target is updated, and the status includes information indicating whether the tracking target is detected in the current frame.
本发明实施例中,如果历史跟踪目标未能与当前交通信号灯检测结果关联上,则根据判断标准,适应性删除未关联上的历史跟踪目标,不但节省了存储空间,而且还增加可跟踪结果的稳定性,从而提高了交通信号的状态的识别效率。In the embodiment of the present invention, if the historical tracking target cannot be associated with the current traffic signal detection result, then according to the judgment standard, the unassociated historical tracking target is adaptively deleted, which not only saves storage space, but also increases the number of traceable results. Stability, thereby improving the recognition efficiency of the state of the traffic signal.
可选的,在另一实施例中,该实施例在上述实施例的基础上,还可以包括:若没有获取到所述电子地图中包括所述目标交通信号灯的位置信息,则获取所述车辆在当前路口的计划行为;根据所述车辆的计划行为所述车辆匹配到相应状态的历史跟踪目标;获取所述历史跟踪目标在当前时刻的历史显示属性状态;输出所述历史跟踪目标的历史显示属性状态。Optionally, in another embodiment, on the basis of the above embodiment, this embodiment may further include: if the position information of the target traffic light in the electronic map is not obtained, obtaining the vehicle The planned behavior at the current intersection; according to the planned behavior of the vehicle, the vehicle is matched to the historical tracking target of the corresponding state; the historical display attribute status of the historical tracking target at the current moment is acquired; the historical display of the historical tracking target is output property status.
该实施例中,若已加载的电子地图中不包含当前所通过路口所需关注的目标交通信号灯的位置信息,则获取车辆在当前路口的计划行为,如左转、右转或直行等,之后,依据车辆计划行为匹配相应输出状态的跟踪目标,并获取跟踪目标在当前时刻的输出状态结果。在具体事例中,若车辆在该路口将左转,匹配的跟踪目标的输出状态应的形状信息应是左转箭头,其匹配的规则与交通通行规则相符合。In this embodiment, if the loaded electronic map does not contain the position information of the target traffic lights that need to be paid attention to at the current crossing, the planned behavior of the vehicle at the current crossing, such as turning left, turning right or going straight, etc., is obtained, and then , match the tracking target of the corresponding output state according to the planned behavior of the vehicle, and obtain the output state result of the tracking target at the current moment. In a specific example, if the vehicle is going to turn left at the intersection, the shape information of the output state of the matching tracking target should be a left-turning arrow, and the matching rule is consistent with the traffic passing rule.
本发明实施例中,在已加载的电子地图中不包含当前所通过路口所需关注的目标交通信号灯的位置信息时,通过获取该车辆的计划行为,根据车辆计划行为匹配跟踪目标的输出状态,为车辆的行驶计划行为进行规划,提高了车辆行驶的稳定度和舒适度。In the embodiment of the present invention, when the loaded electronic map does not contain the position information of the target traffic light that needs attention at the current crossing, by acquiring the planned behavior of the vehicle, the output state of the tracking target is matched according to the planned behavior of the vehicle, Planning for the vehicle's driving planning behavior improves the stability and comfort of the vehicle.
还请参阅图2,为本发明实施例提供的一种指示灯状态识别方法的应用流程图,该实施例中,以交通信号灯状态的检测与识别为例,该实施例包括:步骤201,获取当前时刻车载相机所拍摄的交通信号图像,该交通信号图像中包括交通信号灯。Please also refer to FIG. 2 , which is an application flowchart of a method for identifying the state of an indicator light provided by an embodiment of the present invention. In this embodiment, taking the detection and identification of the state of a traffic signal light as an example, this embodiment includes: Step 201, obtaining The traffic signal image captured by the vehicle-mounted camera at the current moment, the traffic signal image includes traffic signal lights.
该步骤中,可以检测到拍摄指令时,启动车载相机的拍摄,该车载相机可以是集成在记录仪上,也可以独立部署在车机上,本实施例不做限制。In this step, when a shooting instruction is detected, the shooting of the vehicle-mounted camera can be started. The vehicle-mounted camera can be integrated on the recorder, or independently deployed on the vehicle, which is not limited in this embodiment.
步骤202,获取当前时刻所述车辆的定位信息。 Step 202, acquiring the location information of the vehicle at the current moment.
该步骤中,可以通过卫星导航系统定位到当前车辆的定位信息,其通过卫星定位导航系统的具体定位过程,对于本领域技术人员来说,已是熟知技术,在此不再赘述。In this step, the positioning information of the current vehicle can be located through the satellite navigation system, and the specific positioning process through the satellite positioning and navigation system is a well-known technology for those skilled in the art, and will not be repeated here.
需要说明的是,再具体实施例时,步骤201和步骤202没有先后顺序可分,也可以同时执行,本实施例不做限制。It should be noted that, in a specific embodiment, step 201 and step 202 can be separated in no order, and can also be executed at the same time, which is not limited in this embodiment.
步骤203,判断已加载的电子地图中是否包括当前需要经过路口的交通信号灯的位置信息,如果是,执行步骤204,否则,执行步骤206。 Step 203 , judging whether the loaded electronic map includes the location information of traffic lights that need to pass through the intersection at present, if yes, execute step 204 , otherwise, execute step 206 .
步骤204,将交通信号灯的位置信息投影到所述交通信号图像上,获得在所述交通信号图像上的二维坐标信息;执行步骤205。 Step 204 , projecting the position information of the traffic signal light onto the traffic signal image to obtain two-dimensional coordinate information on the traffic signal image; and performing step 205 .
该步骤中,需要获得当前时刻交通信号灯的位置与车辆所在位置之间的距离,将交通信号灯的位置映射至图像中,从而获得交通信号灯在图像上的投影结果。为实现交通信号灯在交通信号图像上的映射,首先需要明确交通信号灯与当前车辆的相对位置关系。本发明实施例采用交通信号灯的端点坐标集合描述其空间位置。获取交通信号灯的各端点与当前车辆之间的相对位置关系后,结合车载相机已标定得到的内外参数,参照相机的小孔成像原理,可将交通信号灯从三维空间投影至图像的二维平面上以获取投影坐标集合。投影点中心的坐标即为投影坐标集合中各元素对应坐标和的均值。In this step, it is necessary to obtain the distance between the position of the traffic light at the current moment and the position of the vehicle, and map the position of the traffic light to the image, so as to obtain the projection result of the traffic light on the image. In order to realize the mapping of traffic lights on the traffic signal image, it is first necessary to clarify the relative positional relationship between the traffic lights and the current vehicle. The embodiment of the present invention uses the endpoint coordinate set of the traffic signal light to describe its spatial position. After obtaining the relative positional relationship between each end point of the traffic signal light and the current vehicle, combined with the internal and external parameters that have been calibrated by the vehicle-mounted camera, and referring to the small hole imaging principle of the camera, the traffic signal light can be projected from the three-dimensional space to the two-dimensional plane of the image to get the set of projected coordinates. The coordinates of the center of the projected point are the mean value of the corresponding coordinate sum of each element in the projected coordinate set.
步骤205,以所述投影的投影点为中心获取当前需要经过路口的交通信号灯在所述交通信号图像上的感兴趣区域ROI;之后,执行步骤210。 Step 205 , centering on the projected projection point, obtain the region of interest ROI on the traffic signal image of the traffic lights that currently need to pass through the intersection; after that, step 210 is executed.
步骤206,判断所述电子地图上是否存在历史交通信号灯跟踪目标,如果是,执行步骤207,如果否,执行步骤209。Step 206 , judging whether there is a historical traffic signal light tracking target on the electronic map, if yes, execute step 207 , if not, execute step 209 .
其中,历史跟踪目标是指当前时刻之前的一段时间内的交通信号灯识别结果。Wherein, the historical tracking target refers to the recognition result of the traffic signal light in a period of time before the current moment.
步骤207,预测并更新历史交通信号灯跟踪目标在当前时刻的二维坐标与大小。 Step 207, predicting and updating the two-dimensional coordinates and size of the historical traffic signal light tracking target at the current moment.
该步骤中,可以依据跟踪算法进行预测,比如,从运行速度和跟踪精度考虑,步骤207中的历史目标跟踪算法包括但不限于卡尔曼滤波器算法与核相关滤波算法等。卡尔曼滤波器算法是计算跟踪目标的运动状态,该运动状态包括但不限于大小,尺寸与位置坐标的变化速率,依据当前时刻与历史跟踪目标所处状态时刻的差值,得到跟踪目标运动状态的变化值,从而预测得到历史跟踪目标在当前时刻的状态。值得注意的是,为便于阐述,本实施实例使用了简单的常速运动模型,因此,运动状态以包括跟踪目标的位置和速度信息为例,但在实际应用中,并不限于此。需要说明的是,本发明还可使用其它运动状态信息,比如加速度、角速度等,从而适用于其它更复杂的运动模型。核相关滤波算法是用来计算历史跟踪目标的历史图像特征,该历史图像特征包括但不限于:灰度特征、方向梯度特征、直方图特征等,在当前时刻的交通信号图像上进行搜索,得到与历史图像特征最为相似的区域即为该跟踪目标当前时刻的预测跟踪结果。历史交通信号灯跟踪目标在二维图像上的坐标的中心坐标即为跟踪结果集合中各元素对应坐标和的均值。In this step, the prediction can be made according to the tracking algorithm. For example, considering the running speed and tracking accuracy, the historical target tracking algorithm in step 207 includes but not limited to Kalman filter algorithm and kernel correlation filter algorithm. The Kalman filter algorithm is to calculate the motion state of the tracking target. The motion state includes but not limited to the size, size and change rate of the position coordinates. According to the difference between the current moment and the state of the historical tracking target, the tracking target motion state is obtained , so as to predict the state of the historical tracking target at the current moment. It is worth noting that, for the sake of illustration, this implementation example uses a simple motion model at a constant speed. Therefore, the motion state includes the position and speed information of the tracking target as an example, but it is not limited to this in practical applications. It should be noted that the present invention can also use other motion state information, such as acceleration, angular velocity, etc., so as to be applicable to other more complex motion models. The kernel correlation filter algorithm is used to calculate the historical image features of the historical tracking target. The historical image features include but not limited to: grayscale features, directional gradient features, histogram features, etc., search on the traffic signal image at the current moment, and get The area most similar to the features of the historical image is the predicted tracking result of the tracking target at the current moment. The central coordinate of the coordinates of the historical traffic signal light tracking target on the two-dimensional image is the mean value of the corresponding coordinate sum of each element in the tracking result set.
步骤208,以所述历史交通信号灯跟踪目标在所述交通信号图像上的坐标为中心获取感兴趣区域ROI;之后,执行步骤210。 Step 208 , taking the coordinates of the historical traffic signal light tracking target on the traffic signal image as the center to obtain a region of interest ROI; after that, step 210 is executed.
步骤209,设置默认检测区域为感兴趣区域。 Step 209, setting the default detection region as the region of interest.
设置的默认检测区域的位置可依据经验参数设置,即依据车载相机与交通信号灯相对位置的估计,和车载相机的内外参数进行假设投影得到默认检测区域的位置。The position of the set default detection area can be set according to empirical parameters, that is, the position of the default detection area can be obtained by hypothetical projection based on the estimation of the relative position of the vehicle camera and the traffic signal light, and the internal and external parameters of the vehicle camera.
步骤210,对所述感兴趣区域ROI的图像中的交通信号灯进行检测,得到当前需要经过路口的交通信号灯在所述交通信号灯图像上的检测结果;之后,执行步骤212。 Step 210, detect the traffic lights in the image of the region of interest ROI, and obtain the detection results of the traffic lights that need to pass through the intersection on the traffic signal image; after that, execute step 212.
其中,检测结果可以包括位置和尺寸和显示属性信息。Wherein, the detection result may include position and size and display attribute information.
其中,该步骤210以感兴趣区域的图像为输入进行交通信号灯的检测与识别。交通信号灯检测模型与识别模型可以根据传统的机器学习算法训练得到,也可以根据深度学习算法得到,本发明对于该系列模型的训练过程所使用的方法不做限制。在具体的事例中,交通信号灯检测模型可以采用centernet的深度学习算法训练得到,交通信号灯识别模型可以采用误差反向传播网络训练得到。交通信号灯检测模型在感兴趣区域的图像上获得交通信号灯在所述图像上的位置以及尺寸。交通信号灯识别模型根据交通信号灯在感兴趣区域上的显示图像获得交通信号灯的显示属性信息。在具体的事例中,显示属性信息可以包括交通信号灯的颜色信息和形状信息,其中,颜色信息可以包括红、黄、绿以及无显示等,形状信息可以包括圆形、左转箭头、右转箭头以及直行箭头等。本发明不对交通信号灯的显示属性信息所包含的内容做限制。Wherein, the step 210 uses the image of the region of interest as an input to detect and recognize traffic lights. The traffic signal light detection model and recognition model can be trained according to traditional machine learning algorithms, and can also be obtained according to deep learning algorithms. The present invention does not limit the methods used in the training process of the series of models. In a specific example, the traffic signal detection model can be trained using centernet's deep learning algorithm, and the traffic signal recognition model can be trained using the error backpropagation network. The traffic signal light detection model obtains the position and size of the traffic signal light on the image of the region of interest. The traffic signal recognition model obtains the display attribute information of the traffic signal according to the display image of the traffic signal on the region of interest. In a specific example, the display attribute information may include the color information and shape information of traffic lights, where the color information may include red, yellow, green, and no display, etc., and the shape information may include circle, left-turn arrow, and right-turn arrow and straight arrows etc. The present invention does not limit the content contained in the display attribute information of the traffic signal light.
步骤211,更新历史跟踪目标在当前时刻的位置和尺寸,使所述历史跟踪目标的位置和尺寸与当前需要经过路口的交通信号灯在所述交通信号灯图像上的检测结果相匹配。 Step 211 , updating the position and size of the historical tracking target at the current moment, so that the position and size of the historical tracking target match the detection results of the traffic lights that need to pass through the intersection currently on the traffic signal light image.
步骤212,构建当前需要经过路口的交通信号灯在所述交通信号灯图像上的检测结果与历史跟踪目标在当前时刻的位置与尺寸的关联矩阵。 Step 212 , constructing a correlation matrix between the detection results of the traffic lights that currently need to pass through the intersection on the traffic signal image and the position and size of the historical tracking target at the current moment.
其中,该关联矩阵也可称为第一管理矩阵。Wherein, the association matrix may also be referred to as a first management matrix.
在步骤中,首先构建当前交通信号灯检测结果和历史跟踪目标之间的关联矩阵。其中,关联矩阵就是交通信号灯检测结果和历史跟踪目标之间的关联分数,关联的分数越高,代表二者是同一个物体的可能性越大,相反,代表二者是同一个物体的可能性越小。关联分数的计算方式包括但不限于计算交通信号灯的检测结果和历史跟踪目标之间的距离远近这种方式。In the step, first construct the correlation matrix between the current traffic light detection results and the historical tracking targets. Among them, the correlation matrix is the correlation score between the traffic light detection result and the historical tracking target. The higher the correlation score, the greater the possibility that the two are the same object. On the contrary, it represents the possibility that the two are the same object. smaller. The calculation method of the association score includes but not limited to the method of calculating the distance between the detection result of the traffic light and the historical tracking target.
步骤213,根据构建的所述关联矩阵关联当前信号灯的所述位置与尺寸与历史跟踪目标位置与尺寸之间的对应关系,如果关联失败,执行步骤214,如果关联成功,执行步骤220;该步骤中,采用最优匹配算法来确定二者之间一一对应的关系。其中,最优匹配算法,比如匈牙利算法,对得到的关联矩阵进行匹配,输出当前交通信号灯检测结果和历史跟踪目标的对应关系。由于车辆定位装置的误差、车载摄像头相机参数的偏差以及在车辆行驶过程中交通信号灯在拍摄图像中的大小与位置的变化等各种不利因素,可能会有新的交通信号灯进入感兴趣区域图像、历史跟踪目标在当前时刻未能成功检测识别或历史跟踪目标离开感兴趣区域图像等情况出现,步骤213中采用最优匹配算法的匹配结果可能出现两种情况,一种是关联成功,一种是关联失败。 Step 213, correlating the corresponding relationship between the position and size of the current signal light and the position and size of the historical tracking target according to the constructed correlation matrix, if the correlation fails, perform step 214, and if the correlation is successful, perform step 220; this step In , the optimal matching algorithm is used to determine the one-to-one correspondence between the two. Among them, the optimal matching algorithm, such as the Hungarian algorithm, matches the obtained correlation matrix, and outputs the corresponding relationship between the current traffic signal detection result and the historical tracking target. Due to various unfavorable factors such as the error of the vehicle positioning device, the deviation of the camera parameters of the on-board camera, and the change of the size and position of the traffic light in the captured image during the driving of the vehicle, there may be new traffic lights entering the image of the region of interest, If the historical tracking target fails to be detected and recognized at the current moment or the historical tracking target leaves the image of the region of interest, etc., the matching result of the optimal matching algorithm in step 213 may appear in two situations, one is successful association, and the other is Association failed.
在具体示例中,步骤213构建的关联矩阵数量与采用目标跟踪算法的数量相同。若采用的目标跟踪算法有两种并分别记为方法A与方法B,需要先对采用的目标跟踪算法设定不同的优先级,即对交通信号灯检测结果和历史跟踪目标进行关联时,先采用优先级更高的跟踪算法得到的跟踪结果与交通信号灯检测结果相匹配,若未能匹配上,再采用优先级高的跟踪算法(该跟踪算法的优先级比上述优先级更高的跟踪算法低)得到的跟踪结果与还未匹配上的交通信号灯检测结果相匹配。以此类推,直至所有跟踪算法的跟踪结果都被使用上。In a specific example, the number of association matrices constructed in step 213 is the same as the number of target tracking algorithms. If there are two target tracking algorithms used and recorded as method A and method B respectively, it is necessary to set different priorities for the target tracking algorithms used first, that is, when associating the detection results of traffic lights with historical tracking targets, first use The tracking result obtained by the tracking algorithm with a higher priority matches the detection result of the traffic signal light. If it fails to match, the tracking algorithm with a higher priority is used (the tracking algorithm has a lower priority than the tracking algorithm with a higher priority above). ) is matched with the unmatched traffic signal detection results. And so on, until the tracking results of all tracking algorithms are used.
步骤214:判断是当前信号灯关联失败还是历史跟踪目标关联失败,如果是当前信号灯关联失败,则执行步骤215,如果是历史跟踪目标关联失败,执行步骤217。Step 214: Judging whether the association of the current signal lamp or the historical tracking target fails, if the association of the current signal lamp fails, perform step 215, and if the association of the historical tracking target fails, perform step 217.
步骤215,创建新的跟踪目标实体。 Step 215, creating a new tracking target entity.
该步骤中,若当前交通信号灯检测结果未能关联上历史跟踪目标,则说明有新的交 通信号灯进入感兴趣区域图像,为该检测结果生成一个新的跟踪目标实体。In this step, if the current traffic light detection result fails to associate with the historical tracking target, it means that a new traffic light has entered the image of the region of interest, and a new tracking target entity is generated for the detection result.
步骤216,将新的跟踪目标加入到历史跟踪目标集合中,之后执行步骤221。 Step 216 , adding the new tracking target to the historical tracking target set, and then performing step 221 .
步骤217,判定是否删除该历史跟踪目标,如果否,执行步骤219,如果是,执行步骤218。Step 217, determine whether to delete the historical tracking target, if not, execute step 219, if yes, execute step 218.
该步骤中,如果历史跟踪目标未能与当前交通信号灯检测结果关联上,则说明历史跟踪目标在当前时刻未能成功检测识别或历史跟踪目标离开感兴趣区域图像等情况出现,为保证跟踪结果的稳定性,需要按照判断标准判定是否删除该跟踪目标,其判定标准可以是根据前m帧中未检测到的跟踪目标的比例为例但在实际应应用中,并不限于此。若符合删除的判断标准,执行步骤218;否则,执行步骤219;步骤218,删除该历史跟踪目标,结束当前流程。In this step, if the historical tracking target fails to be associated with the current traffic light detection result, it means that the historical tracking target has not been successfully detected and recognized at the current moment or the historical tracking target has left the image of the region of interest. In order to ensure the accuracy of the tracking result For stability, it is necessary to determine whether to delete the tracking target according to the judgment standard. The judgment standard can be based on the proportion of the tracking target that was not detected in the previous m frames as an example, but in actual application, it is not limited to this. If the criterion for deletion is met, execute step 218; otherwise, execute step 219; step 218, delete the historical tracking target, and end the current process.
步骤219,更新该历史跟踪目标的状态,之后执行步骤221。 Step 219, update the state of the historical tracking target, and then execute step 221.
其中,该更新后的状态可以包括标记在当前帧中该跟踪目标是否被观测到的信息。Wherein, the updated state may include information marking whether the tracking target is observed in the current frame.
步骤220,更新对应的历史跟踪目标的运动状态与显示属性信息。 Step 220, updating the motion state and display attribute information of the corresponding historical tracking target.
该步骤中,当二者关联上时,利用当前时刻匹配上的交通信号灯检测结果依据上述步骤中的历史目标跟踪算法更新对应的历史跟踪目标的运动状态与显示属性信息。In this step, when the two are associated, the motion state and display attribute information of the corresponding historical tracking target is updated according to the historical target tracking algorithm in the above step using the traffic signal detection result matched at the current moment.
步骤221,获取现有存在的历史跟踪目标的状态,包括其历史显示属性即前n帧与该跟踪目标关联上的交通信号灯检测结果的显示属性信息。 Step 221, acquire the state of the existing historical tracking target, including its historical display attribute, that is, the display attribute information of the traffic signal detection results associated with the tracking target in the previous n frames.
其中,该步骤中,可以按照时间前后排列的序列构建显示属性,对其做时间平滑,并通过投票融合获取最多投票属性作为该跟踪目标当前时刻的输出状态结果。Among them, in this step, the display attributes can be constructed according to the sequence arranged before and after time, time smoothed, and the most voted attributes can be obtained through voting fusion as the output state result of the tracking target at the current moment.
步骤222,判断已加载地图中是否包含当前所通过路口所需关注的目标交通信号灯的位置信息;若是,则执行步骤223;否则,执行步骤228。 Step 222 , judging whether the loaded map contains the location information of the target traffic lights that need to be paid attention to at the current crossing; if so, go to step 223 ; otherwise, go to step 228 .
步骤223,构建该目标红绿灯在车载相机图像上的投影位置与现存历史跟踪目标之间的关联矩阵。 Step 223, constructing a correlation matrix between the projected position of the target traffic light on the vehicle camera image and the existing historical tracking target.
步骤224:根据关联矩阵采用最优匹配算法关联二者的对应关系,如果关联成功,执行步骤225,如果关联失败,执行步骤227。Step 224: Use the optimal matching algorithm to correlate the correspondence between the two according to the correlation matrix. If the correlation is successful, go to step 225; if the correlation fails, go to step 227.
具体地,根据关联矩阵采用最优匹配算法关联二者之间一一对应关系具体实现过程与上述过程类似,其中,最优匹配算法,可以是匈牙利算法,对得到的关联矩阵进行匹配,若匹配成功(即关联成功),输出目标交通信号灯投影和历史跟踪目标的对应关系。若目标交通信号灯投影与现存跟踪目标关联失败,即执行步骤227。Specifically, according to the correlation matrix, the optimal matching algorithm is used to correlate the one-to-one correspondence between the two. If successful (that is, the association is successful), the corresponding relationship between the target traffic light projection and the historical tracking target is output. If the association between the target traffic signal light projection and the existing tracking target fails, step 227 is executed.
步骤225,获取目标交通信号灯投影匹配到对应的所述历史跟踪目标的显示属性状态。 Step 225, acquiring the display attribute status of the target traffic signal light projection matched to the corresponding historical tracking target.
其中,所述显示属性状态可以包括目标交通信号灯的颜色状态和形状状态。Wherein, the display attribute state may include the color state and shape state of the target traffic signal light.
步骤226,输出所述目标交通信号灯的显示属性状态,结束当前流程。 Step 226 , outputting the display attribute status of the target traffic signal light, and ending the current process.
步骤227,当前时刻无交通信号灯输出,结束当前流程。 Step 227, there is no traffic signal output at the current moment, and the current process ends.
步骤228,获取车辆在当前路口的计划行为。 Step 228, acquire the planned behavior of the vehicle at the current intersection.
其中,计划行为,比如左转、右转或直行等。Among them, planned behaviors, such as turning left, turning right, or going straight.
步骤229,依据车辆计划行为匹配相应输出状态的历史跟踪目标,并获取该历史跟踪目标当前时刻的历史显示属性状态。Step 229 , matching the historical tracking target of the corresponding output state according to the planned behavior of the vehicle, and obtaining the historical display attribute status of the historical tracking target at the current moment.
在具体示例中,若车辆在该路口将左转,匹配的历史跟踪目标的输出状态应的形状信息应是左转箭头。匹配的规则与交通通行规则相符合。In a specific example, if the vehicle is about to turn left at the intersection, the shape information of the output state of the matched historical tracking target should be a left-turn arrow. Matched rules match the traffic rules.
步骤230,输出获取的所述历史跟踪目标的历史现实属性状态,结束当前流程。 Step 230, outputting the acquired historical reality attribute status of the historical tracking target, and ending the current process.
该步骤中可以将历史跟踪目标的历史现实属性状态作为车辆驾驶规划的依据。In this step, the historical reality attribute state of the historical tracking target can be used as the basis for vehicle driving planning.
本发明实施例中,在已加载的电子地图中不包含当前所通过路口所需关注的目标交通信号灯的位置信息时,通过获取该车辆的计划行为,根据车辆计划行为匹配跟踪目标的输出状态,为车辆的行驶计划行为进行规划,提高了车辆行驶的稳定度和舒适度。In the embodiment of the present invention, when the loaded electronic map does not contain the position information of the target traffic light that needs attention at the current crossing, by acquiring the planned behavior of the vehicle, the output state of the tracking target is matched according to the planned behavior of the vehicle, Planning for the vehicle's driving planning behavior improves the stability and comfort of the vehicle.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作 组合,但是本领域技术人员应该知悉,本实施公开并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明所必须的。It should be noted that, for the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that this implementation disclosure is not limited by the described action sequence, because according to In the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the present invention.
图3是根据一示例性实施例示出的一种指示灯状态识别装置框图。参照图3,该装置包括第一获取模块301,第二获取模块302,第一确定模块303,检测识别模块304,更新模块305,第二确定模块306,第三获取模块307,第四获取模块308,第三确定模块309,第五获取模块310和输出模块311。其中,该第一获取模块301,用于获取当前时刻拍摄车辆前方的交通信号图像,以及所述当前时刻所述车辆的定位信息;该第二获取模块302,用于获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息;该第一确定模块303,用于在所述第二获取模块302获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息时,根据所述第一获取模块301获取的所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交通信号图像上的感兴趣区域ROI;该检测识别模块304,用于对所述感兴趣区域ROI中的交通信号灯进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态;该更新模块305,用于更新历史跟踪目标的在所述当前时刻的状态,其中,所述历史跟踪目标为当前时刻的前一段时间内交通信号灯的检测识别结果;该第二确定模块306,用于确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果;该第三获取模块307,用于在所述第二确定模块306确定的所述第一匹配结果为所述历史跟踪目标匹配上当前时刻需要经过路口的交通信号灯的状态时,获取所述当前时刻匹配上的交通信号灯对应的所述历史跟踪目标的历史显示属性信息,其中,匹配上的交通信号灯为目标交通信号灯;该第四获取模块308,用于获取所述电子地图中包括当前时刻包括所述目标交通信号灯的位置信息;该第三确定模块309,用于在所述第四获取模块308获取到所述电子地图中包括所述目标交通信号灯的位置信息时,确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标的第二匹配结果;该第五获取模块310,用于根据所述第二匹配结果获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性状态,所述显示属性状态包括交通信号灯的颜色状态和形状状态;该输出模块311,用于输出所述目标交通信号灯的显示属性状态。Fig. 3 is a block diagram of a device for identifying the state of an indicator light according to an exemplary embodiment. Referring to Fig. 3, the device comprises a first acquisition module 301, a second acquisition module 302, a first determination module 303, a detection identification module 304, an update module 305, a second determination module 306, a third acquisition module 307, and a fourth acquisition module 308 , the third determination module 309 , the fifth acquisition module 310 and the output module 311 . Wherein, the first obtaining module 301 is used to obtain the traffic signal image taken in front of the vehicle at the current moment, and the location information of the vehicle at the current moment; the second obtaining module 302 is used to obtain the information described in the electronic map. The position information of the traffic lights that the vehicle currently needs to pass through the intersection; the first determining module 303 is used to determine the position information of the traffic lights that the vehicle currently needs to pass through the intersection when the second acquisition module 302 obtains the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map. The location information of the vehicle at the current moment acquired by the first acquisition module 301 determines the ROI of the location information of the traffic lights that the vehicle needs to pass through the intersection on the traffic signal image; the detection and identification module 304, It is used to detect and identify the traffic lights in the region of interest ROI to obtain the state of the traffic lights that need to pass through the intersection at the current moment; the update module 305 is used to update the state of the historical tracking target at the current moment, wherein , the historical tracking target is the detection and recognition result of traffic lights in a period of time before the current moment; the second determination module 306 is used to determine the state of the traffic lights that need to pass through the intersection at the current moment and the historical tracking target at the current moment The first matching result of the state; the third obtaining module 307 is used to determine the first matching result determined by the second determining module 306 as the historical tracking target matching the traffic lights that need to pass through the intersection at the current moment state, obtain the historical display attribute information of the historical tracking target corresponding to the traffic signal light matched at the current moment, wherein the traffic signal light matched is the target traffic signal light; the fourth obtaining module 308 is used to obtain the The electronic map includes the position information of the target traffic light at the current moment; the third determining module 309 is configured to obtain the position information of the target traffic light in the electronic map when the fourth obtaining module 308 acquires , determine the second matching result between the projected position of the target traffic signal light on the traffic signal light image and the historical tracking target; the fifth obtaining module 310 is configured to obtain the target traffic light according to the second matching result The projection position of the signal light is matched to the display attribute state of the corresponding historical tracking target, and the display attribute state includes the color state and shape state of the traffic signal light; the output module 311 is used to output the display attribute state of the target traffic signal light .
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述第一确定模块303包括:投影模块401和区域获取模块402,其结构示意图如图4所示,其中,该投影模块401,用于根据所述当前时刻车辆的定位信息将所述车辆当前需要经过路口的交通信号灯的位置信息投影到所述交通信号图像上,获得当前需要经过路口的交通信号灯在所述交通信号图像上的二维坐标信息;该区域获取模块402,用于以所述投影的投影点为中心获取当前需要经过路口的交通信号灯在所述交通信号图像上的感兴趣区域ROI。Optionally, in another embodiment, on the basis of the above embodiment, the first determination module 303 includes: a projection module 401 and an area acquisition module 402, the structural diagram of which is shown in FIG. 4 , wherein , the projection module 401 is configured to project the position information of the traffic lights that the vehicle needs to pass through the intersection to the traffic signal image according to the positioning information of the vehicle at the current moment, and obtain the position information of the traffic lights that need to pass the intersection currently. The two-dimensional coordinate information on the traffic signal image; the region acquisition module 402 is configured to obtain the region of interest ROI on the traffic signal image of the traffic signal lights that currently need to pass through the intersection centering on the projected projection point.
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述投影模块401包括:计算模块501和映射模块502,其结构示意图如图5所示,其中,该计算模块501,用于计算当前需要经过路口的交通信号灯的位置信息与所述车辆的定位信息所在位置之间的距离;该映射模块502,用于根据所述距离,将当前需要经过路口的交通信号灯的位置信息映射到所述交通信号灯图像中,获得当前需要经过路口的交通信号灯的位置信息在交通信号灯图像上投影的二维坐标信息。Optionally, in another embodiment, which is based on the above-mentioned embodiment, the projection module 401 includes: a calculation module 501 and a mapping module 502, the structure diagram of which is shown in FIG. 5 , wherein the calculation The module 501 is used to calculate the distance between the position information of the traffic lights that need to pass the intersection and the location information of the vehicle; the mapping module 502 is used to map the traffic lights that need to pass the intersection according to the distance. The position information of the traffic signal is mapped to the traffic signal image, and the two-dimensional coordinate information projected on the traffic signal image by the position information of the traffic signal that needs to pass through the intersection is obtained.
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述第二确定模块306包括:第一关联矩阵确定模块601,第一匹配模块602,第一判断模块603和第一状态更新模块604,其结构示意图如图6所示,该第一关联矩阵确定模块601,用于确定当前时刻需要经过路口的交通信号灯的状态与历史跟踪目标的状态的第一关联矩阵;该 第一匹配模块602,用于对所述第一关联矩阵进行匹配,得到当前时刻需要经过路口的交通信号灯与历史跟踪目标之间的第一对应关系;该第一判断模块603,用于根据所述第一对应关系判断所述历史跟踪目标是否关联上当前时刻需要经过路口的交通信号灯的状态;该第一状态更新模块604,用于在所述判断模块判定所述历史跟踪目标关联上当前时刻需要经过路口的交通信号灯的状态时,利用所述当前时刻匹配上的交通信号灯的状态更新对应的所述历史跟踪目标的状态。Optionally, in another embodiment, on the basis of the above embodiment, the second determining module 306 includes: a first correlation matrix determining module 601, a first matching module 602, and a first judging module 603 And the first state update module 604, its structure schematic diagram is as shown in Figure 6, this first association matrix determination module 601, is used for determining the first association matrix of the state of the traffic signal light that needs to pass through the intersection at the current moment and the state of the historical tracking target The first matching module 602 is used to match the first correlation matrix to obtain the first correspondence between the traffic lights that need to pass through the intersection at the current moment and the historical tracking target; the first judgment module 603 is used to According to the first correspondence, it is judged whether the historical tracking target is associated with the state of the traffic lights that need to pass through the intersection at the current moment; When the state of the traffic signal light passing through the intersection needs to be passed at the current moment, the state of the corresponding historical tracking target is updated by using the state of the traffic signal light matched at the current moment.
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述第三确定模块309包括:第二关联矩阵确定模块701,第二匹配模块702,第二判断模块703和跟踪目标确定模块704,其结构示意图如图7所示,其中,该第二关联矩阵确定模块701,用于确定当前时刻所述目标交通信号灯在所述交通信号灯图像上的投影位置与历史跟踪目标的第二关联矩阵;该第二匹配模块702,用于对所述第二关联矩阵进行匹配,得到当前时刻目标交通信号灯投影与历史跟踪目标的第二对应关系;该第二判断模块703,用于根据所述第二对应关系判定所述目标通信号灯投影位置是否匹配到对应的历史跟踪目标;该跟踪目标确定模块704,用于在所述第二判断模块根据所述第二对应关系判定所述目标通信号灯投影位置匹配到对应的历史跟踪目标。Optionally, in another embodiment, on the basis of the above embodiment, the third determining module 309 includes: a second correlation matrix determining module 701, a second matching module 702, and a second judging module 703 and tracking target determination module 704, its structural diagram is as shown in Figure 7, wherein, the second correlation matrix determination module 701 is used to determine the projection position and historical tracking of the target traffic light on the traffic signal image at the current moment The second correlation matrix of the target; the second matching module 702 is used to match the second correlation matrix to obtain the second corresponding relationship between the target traffic signal light projection at the current moment and the historical tracking target; the second judgment module 703, It is used to determine whether the projected position of the target traffic signal lamp matches the corresponding historical tracking target according to the second correspondence relationship; The projected position of the target traffic light is matched to the corresponding historical tracking target.
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述装置还包括:第三判断模块801,设置模块802,预测更新模块803和第四确定模块804,其结构示意图如图8所示,其中,该第三判断模块801,用于在第一确定模块303确定没有获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息时,判断是否存在历史交通信号灯跟踪目标;该设置模块802,用于所述判断模块判定不存历史在历史交通信号灯跟踪目标时,将所述默认检测区域设置为感兴趣区域;该预测更新模块803,用于在所述第三判断模块801判定存在历史交通信号灯跟踪目标时,预测并更新所述历史交通信号灯跟踪目标在当前时刻的状态;该第四确定模块804,用于根据所述当前时刻车辆的定位信息确定所述历史交通信号灯跟踪目标在所述交通信号图像上的感兴趣区域ROI,其中,将所述历史交通信号灯跟踪目标作为当前需要经过路口的交通信号灯。Optionally, in another embodiment, on the basis of the above embodiment, the device further includes: a third judging module 801, a setting module 802, a prediction updating module 803 and a fourth determining module 804, which A schematic diagram of the structure is shown in FIG. 8 , wherein the third judging module 801 is used to judge whether there is a traffic signal light at an intersection when the first determining module 303 determines that the position information of the traffic signal light that the vehicle currently needs to pass through the intersection in the electronic map has not been obtained. Historical traffic signal light tracking target; the setting module 802, used for the judgment module to determine that there is no historical traffic signal light tracking target, the default detection area is set to the region of interest; the prediction update module 803 is used for When the third determination module 801 determines that there is a historical traffic signal light tracking target, predict and update the state of the historical traffic signal light tracking target at the current moment; the fourth determination module 804 is used to Determining a region of interest (ROI) of the historical traffic signal light tracking target on the traffic signal image, wherein the historical traffic signal light tracking target is used as a traffic signal that currently needs to pass through an intersection.
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述装置还可以包括:创建模块,和/或,第四判断模块,移除模块和第二状态更新模块,其中,该创建模块,用于在所述第二确定模块确定的所述第一匹配结果为当前时刻需要经过路口的交通信号灯的状态未能匹配上所述历史跟踪目标时,创建新的跟踪目标,并将新的所述跟踪目标添加到历史跟踪目标集合中;该第四判断模块,用于在所述第二确定模块确定的所述第一匹配结果为所述历史跟踪目标未能匹配上当前时刻需要经过路口的交通信号灯的状态时,判断是否移除所述历史跟踪目标;该移除模块,用于在所述第四判断模块判定移除所述历史跟踪目标,移除所述历史跟踪目标;该第二状态更新模块,用于在所述第四判断模块判定不移除所述历史跟踪目标时,更新所述历史跟踪目标的状态,所述状态记录当前帧中所述历史跟踪目标是否被检测到的信息。Optionally, in another embodiment, on the basis of the above embodiments, the device may further include: a creation module, and/or a fourth judgment module, a removal module and a second status update module , wherein, the creating module is used to create a new tracking when the first matching result determined by the second determining module is that the state of the traffic lights that need to pass through the intersection at the current moment fails to match the historical tracking target target, and add the new tracking target to the set of historical tracking targets; the fourth judging module is used to determine that the first matching result determined by the second determining module is that the historical tracking target fails to match When checking the state of the traffic lights that need to pass through the intersection at the current moment, judge whether to remove the historical tracking target; the removal module is used to remove the historical tracking target when the fourth judging module History tracking target; the second state update module is used to update the state of the history tracking target when the fourth judging module determines not to remove the history tracking target, and the state records the history in the current frame Tracks information about whether the target is detected or not.
可选的,在另一实施例中,该实施例在上述实施例的基础上,所述装置还可以包括:行为获取模块901,匹配模块902和状态获取模块903,其结构示意图如图9所示,其中,该行为获取模块901,用于在所述第三确定模块309确定的第二匹配结果没有获取到所述电子地图中包括所述目标交通信号灯的位置信息时,获取所述车辆在当前路口的计划行为;该匹配模块902,用于根据所述车辆的计划行为所述车辆匹配到相应状态的历史跟踪目标;该状态获取模块903,用于获取所述历史跟踪目标在当前时刻的历史显示属性状态;该输出模块311,还用于输出所述状态获取模块903获取的所述历史跟踪目标的历史显示属性状态。Optionally, in another embodiment, on the basis of the above embodiments, the device may further include: a behavior acquisition module 901, a matching module 902 and a state acquisition module 903, the schematic diagram of which is shown in Figure 9 shown, wherein the behavior acquiring module 901 is configured to acquire the location information of the target traffic light in the electronic map when the second matching result determined by the third determining module 309 is not acquired. The planned behavior of the current intersection; the matching module 902 is used to match the vehicle to the historical tracking target of the corresponding state according to the planned behavior of the vehicle; the state acquisition module 903 is used to obtain the historical tracking target at the current moment Historical display attribute status; the output module 311 is also configured to output the historical display attribute status of the historical tracking target acquired by the status acquisition module 903 .
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,相关之处参见方法实施例的部分说明即可,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific way in which each module executes the operation has been described in detail in the embodiment of the method. For relevant parts, please refer to the part of the description of the method embodiment, and will not be elaborated here. illustrate.
本发明实施例还提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现如上所述的指示灯状态识别方法。An embodiment of the present invention also provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the above-mentioned instructions Light state identification method.
本发明实施例还提供一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如上所述的指示灯状态识别方法。可选地,计算机可读存储介质可以是非临时性计算机可读存储介质,例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。An embodiment of the present invention also provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the above-mentioned method for identifying the state of the indicator light. . Alternatively, the computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk and optical data storage devices, etc.
本发明实施例还提供一种计算机程序产品,包括计算机程序或指令,所述计算机程序或指令被处理器执行时实现如上所述的指示灯状态识别方法。An embodiment of the present invention also provides a computer program product, including a computer program or an instruction. When the computer program or instruction is executed by a processor, the above-mentioned method for identifying the state of the indicator light is implemented.
可选的,本发明实施例还提供了一种电子设备,如图10所示,包括处理器1001、通信接口1002、存储器1003和通信总线1004,其中,处理器1001,通信接口1002,存储器1003通过通信总线1004完成相互间的通信,其中,所述存储器1003,用于存放计算机程序;所述处理器1001,用于执行存储器1003上所存放的程序时,实现如上所述的指示灯状态识别方法。Optionally, an embodiment of the present invention also provides an electronic device, as shown in FIG. The mutual communication is completed through the communication bus 1004, wherein the memory 1003 is used to store computer programs; the processor 1001 is used to realize the above-mentioned status recognition of the indicator lights when executing the programs stored in the memory 1003 method.
上述终端提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the terminal above may be a Peripheral Component Interconnect (PCI for short) bus or an Extended Industry Standard Architecture (EISA for short) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
通信接口用于上述终端与其他设备之间的通信。The communication interface is used for communication between the terminal and other devices.
存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include a random access memory (Random Access Memory, RAM for short), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; it can also be a digital signal processor (Digital Signal Processing, referred to as DSP) , Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
图11是根据一示例性实施例示出的一种用于指示灯状态识别的装置1100的框图。例如,装置1100可以被提供为一终端。参照图11,装置1100包括处理组件1122,其进一步包括一个或多个处理器,以及由存储器1132所代表的存储器资源,用于存储可由处理组件1122的执行的指令,例如应用程序。存储器1132中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1122被配置为执行指令,以执行上述方法。Fig. 11 is a block diagram of an apparatus 1100 for identifying an indicator light state according to an exemplary embodiment. For example, apparatus 1100 may be provided as a terminal. Referring to FIG. 11 , apparatus 1100 includes processing component 1122 , which further includes one or more processors, and a memory resource represented by memory 1132 for storing instructions executable by processing component 1122 , such as application programs. The application program stored in memory 1132 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1122 is configured to execute instructions to perform the above method.
装置1100还可以包括一个电源组件1126被配置为执行装置1100的电源管理,一个有线或无线网络接口1150被配置为将装置1100连接到网络,和一个输入输出(I/O)接口1158。装置1100可以操作基于存储在存储器932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。 Device 1100 may also include a power component 1126 configured to perform power management of device 1100 , a wired or wireless network interface 1150 configured to connect device 1100 to a network, and an input-output (I/O) interface 1158 . The device 1100 can operate based on an operating system stored in the memory 932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Other embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present invention, these modifications, uses or adaptations follow the general principles of the present invention and include common knowledge or conventional technical means in the technical field not disclosed in the present invention . The specification and examples are to be considered exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise constructions which have been described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (12)

  1. 一种指示灯状态识别方法,其特征在于,包括:A method for identifying the state of an indicator light, characterized in that it comprises:
    获取当前时刻拍摄车辆前方的交通信号图像,以及所述当前时刻所述车辆的定位信息;Obtaining the traffic signal image in front of the vehicle captured at the current moment, and the positioning information of the vehicle at the current moment;
    若获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,则根据所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交通信号图像上的感兴趣区域ROI;If the position information of the traffic signal lights that the vehicle currently needs to pass through the intersection in the electronic map is obtained, then determine the position information of the traffic signal lights that the vehicle currently needs to pass through the intersection according to the positioning information of the vehicle at the current moment in the traffic signal image ROI on ROI;
    对所述感兴趣区域ROI中的交通信号灯进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态;Detecting and identifying the traffic lights in the region of interest ROI to obtain the status of the traffic lights that need to pass through the intersection at the current moment;
    更新历史跟踪目标的在所述当前时刻的状态,其中,所述历史跟踪目标为当前时刻的前一段时间内交通信号灯的检测识别结果;Updating the state of the historical tracking target at the current moment, wherein the historical tracking target is the detection and recognition result of the traffic signal light within a period of time before the current moment;
    确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果;Determining the first matching result between the state of the traffic lights that need to pass through the intersection at the current moment and the state of the historical tracking target at the current moment;
    若所述第一匹配结果为所述历史跟踪目标匹配上当前时刻需要经过路口的交通信号灯的状态,则获取当前时刻匹配上的交通信号灯对应的所述历史跟踪目标的历史显示属性信息,其中,匹配上的交通信号灯为目标交通信号灯;If the first matching result is that the historical tracking target matches the state of a traffic signal that needs to pass through the intersection at the current moment, then acquire the historical display attribute information of the historical tracking target corresponding to the traffic signal that is matched at the current moment, wherein, The matched traffic light is the target traffic light;
    若获取到所述电子地图中当前时刻包括所述目标交通信号灯的位置信息,则确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标的第二匹配结果;If the position information of the target traffic light in the electronic map is acquired at the current moment, then determine a second matching result between the projected position of the target traffic light on the traffic signal image and the historical tracking target;
    根据所述第二匹配结果获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性状态,所述显示属性状态包括目标交通信号灯的颜色状态和形状状态;According to the second matching result, the projected position of the target traffic signal light is matched to the display attribute state of the corresponding historical tracking target, and the display attribute state includes the color state and shape state of the target traffic signal light;
    输出所述目标交通信号灯的显示属性状态。Outputting the display property state of the target traffic signal light.
  2. 根据权利要求1所述的指示灯状态识别方法,其特征在于,所述根据所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交通信号图像上的感兴趣区域ROI,包括:The method for identifying the state of an indicator lamp according to claim 1, wherein the position information of the traffic signal lights that the vehicle needs to pass through the intersection is determined according to the vehicle positioning information at the current moment on the traffic signal image Region of interest ROI, including:
    根据所述当前时刻车辆的定位信息将所述车辆当前需要经过路口的交通信号灯的位置信息投影到所述交通信号图像上,获得当前需要经过路口的交通信号灯在所述交通信号图像上的二维坐标信息;Projecting the position information of the traffic lights that the vehicle needs to pass through the intersection to the traffic signal image according to the positioning information of the vehicle at the current moment, and obtaining the two-dimensional image of the traffic lights that need to pass the intersection currently on the traffic signal image coordinate information;
    以所述投影的投影点为中心获取当前需要经过路口的交通信号灯在所述交通信号图像上的感兴趣区域ROI。A region of interest (ROI) on the traffic signal image of a traffic signal light that currently needs to pass through the intersection is obtained centering on the projected projection point.
  3. 根据权利要求2所述的指示灯状态识别方法,其特征在于,所述根据所述当前时刻车辆的定位信息将所述车辆当前需要经过路口的交通信号灯的位置信息投影到所述交通信号图像上,获得当前需要经过路口的交通信号灯在所述交通信号图像上的二维坐标信息,包括:The method for identifying the state of an indicator light according to claim 2, wherein the location information of the traffic signal lights that the vehicle needs to pass through the intersection at present is projected onto the traffic signal image according to the location information of the vehicle at the current moment , to obtain the two-dimensional coordinate information of the traffic lights that currently need to pass through the intersection on the traffic signal image, including:
    计算当前需要经过路口的交通信号灯的位置信息与所述车辆的定位信息所在位置之间的距离;Calculating the distance between the current position information of the traffic lights that need to pass through the intersection and the location information of the vehicle;
    根据所述距离,将当前需要经过路口的交通信号灯的位置信息映射到所述交通信号灯图像中,获得当前需要经过路口的交通信号灯的位置信息在交通信号灯图像上投影的二维坐标信息。According to the distance, map the position information of the traffic signal lights that need to pass the intersection to the traffic signal light image, and obtain the two-dimensional coordinate information projected on the traffic signal light image by the position information of the traffic lights that need to pass the intersection currently.
  4. 根据权利要求1所述的指示灯状态识别方法,其特征在于,所述确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果包括:The method for identifying the state of an indicator lamp according to claim 1, wherein the first matching result of determining the state of the traffic signal light that needs to pass through the intersection at the current moment and the state of the historical tracking target at the current moment comprises:
    确定当前时刻需要经过路口的交通信号灯的状态与历史跟踪目标的状态的第一关联矩阵;Determine the first correlation matrix between the state of the traffic lights that need to pass through the intersection and the state of the historical tracking target at the current moment;
    对所述第一关联矩阵进行匹配,得到当前时刻需要经过路口的交通信号灯与历史跟 踪目标之间的第一对应关系;The first association matrix is matched to obtain the first correspondence between the traffic lights that need to pass through the crossing at the current moment and the historical tracking target;
    根据所述第一对应关系判定所述历史跟踪目标关联上当前时刻需要经过路口的交通信号灯的状态;According to the first correspondence, it is determined that the historical tracking target is associated with the state of the traffic lights that need to pass through the intersection at the current moment;
    利用所述当前时刻匹配上的交通信号灯的状态更新对应的所述历史跟踪目标的状态。The state of the corresponding historical tracking target is updated by using the state of the traffic signal light matched at the current moment.
  5. 根据权利要求1所述的指示灯状态识别方法,其特征在于,所述确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标之间的第二匹配结果,包括:The method for identifying the state of an indicator lamp according to claim 1, wherein said determining the second matching result between the projected position of the target traffic signal light on the traffic signal light image and the historical tracking target comprises :
    确定当前时刻所述目标交通信号灯在所述交通信号灯图像上的投影位置与历史跟踪目标的第二关联矩阵;Determining the second correlation matrix between the projected position of the target traffic signal light on the traffic signal light image at the current moment and the historical tracking target;
    对所述第二关联矩阵进行匹配,得到当前时刻目标交通信号灯投影与历史跟踪目标的第二对应关系;Matching the second correlation matrix to obtain the second corresponding relationship between the target traffic signal light projection at the current moment and the historical tracking target;
    根据所述第二对应关系判定所述目标通信号灯投影位置匹配到对应的历史跟踪目标。According to the second correspondence, it is determined that the projection position of the target traffic light matches the corresponding historical tracking target.
  6. 根据权利要求1至5任一项所述的指示灯状态识别方法,其特征在于,所述方法还包括:The method for identifying the status of an indicator light according to any one of claims 1 to 5, wherein the method further comprises:
    若没有获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息,判断是否存在历史交通信号灯跟踪目标;If the position information of the traffic lights that the vehicle currently needs to pass through the intersection is not obtained in the electronic map, it is judged whether there is a historical traffic lights tracking target;
    如果不存在,则将所述默认检测区域设置为感兴趣区域;If it does not exist, setting the default detection area as the area of interest;
    如果存在,则预测并更新所述历史交通信号灯跟踪目标在当前时刻的状态;If it exists, predict and update the state of the historical traffic light tracking target at the current moment;
    根据所述当前时刻车辆的定位信息确定所述历史交通信号灯跟踪目标在所述交通信号图像上的感兴趣区域ROI,其中,将所述历史交通信号灯跟踪目标作为当前需要经过路口的交通信号灯。The region of interest ROI of the historical traffic signal light tracking target on the traffic signal image is determined according to the positioning information of the vehicle at the current moment, wherein the historical traffic signal light tracking target is used as a traffic signal that needs to pass through an intersection currently.
  7. 根据权利要求1至5任一项所述的指示灯状态识别方法,其特征在于,所述方法还包括:The method for identifying the status of an indicator light according to any one of claims 1 to 5, wherein the method further comprises:
    若所述第一匹配结果为当前时刻需要经过路口的交通信号灯的状态未能匹配上所述历史跟踪目标,则创建新的跟踪目标,并将新的所述跟踪目标添加到历史跟踪目标集合中;If the first matching result is that the state of the traffic lights that need to pass through the intersection at the current moment fails to match the historical tracking target, then create a new tracking target, and add the new tracking target to the historical tracking target set ;
    若所述第一匹配结果为所述历史跟踪目标未能匹配上当前时刻需要经过路口的交通信号灯的状态,判断是否移除所述历史跟踪目标;If the first matching result is that the historical tracking target fails to match the state of the traffic lights that need to pass through the intersection at the current moment, determine whether to remove the historical tracking target;
    如果是,移除所述历史跟踪目标;If so, remove the historical tracking target;
    如果否,更新所述历史跟踪目标的状态,所述状态记录当前帧中所述历史跟踪目标是否被检测到的信息。If not, update the state of the historical tracking target, where the state records information about whether the historical tracking target is detected in the current frame.
  8. 根据权利要求1至5任一项所述的指示灯状态识别方法,其特征在于,所述方法还包括:The method for identifying the status of an indicator light according to any one of claims 1 to 5, wherein the method further comprises:
    若没有获取到所述电子地图中包括所述目标交通信号灯的位置信息,则获取所述车辆在当前路口的计划行为;If the position information including the target traffic light in the electronic map is not obtained, then obtain the planned behavior of the vehicle at the current intersection;
    根据所述车辆的计划行为所述车辆匹配到相应状态的历史跟踪目标;matching the vehicle to a historical tracking target of a corresponding state according to the planned behavior of the vehicle;
    获取所述历史跟踪目标在当前时刻的历史显示属性状态;Obtain the historical display attribute status of the historical tracking target at the current moment;
    输出所述历史跟踪目标的历史显示属性状态。Output the historical display attribute status of the historical tracking target.
  9. 一种指示灯状态识别装置,其特征在于,包括:A device for identifying the state of an indicator light, characterized in that it comprises:
    第一获取模块,用于获取当前时刻拍摄车辆前方的交通信号图像,以及所述当前时刻所述车辆的定位信息;The first acquisition module is used to acquire the traffic signal image taken in front of the vehicle at the current moment, and the positioning information of the vehicle at the current moment;
    第二获取模块,用于获取到电子地图中所述车辆当前需要经过路口的交通信号灯的位置信息;The second acquisition module is used to acquire the position information of the traffic lights that the vehicle currently needs to pass through the intersection in the electronic map;
    第一确定模块,用于在所述第二获取模块获取到电子地图中所述车辆当前需要经过 路口的交通信号灯的位置信息时,根据所述第一获取模块获取的所述当前时刻车辆的定位信息确定所述车辆当前需要经过路口的交通信号灯的位置信息在所述交通信号图像上的感兴趣区域ROI;The first determination module is configured to, when the second acquisition module acquires the location information of the traffic lights at the intersections that the vehicle currently needs to pass through in the electronic map, according to the position of the vehicle at the current moment acquired by the first acquisition module The information determines the ROI of the position information of the traffic lights that the vehicle currently needs to pass through the intersection on the traffic signal image;
    检测识别模块,用于对所述感兴趣区域ROI中的交通信号灯进行检测识别,得到当前时刻需要经过路口的交通信号灯的状态;The detection and identification module is used to detect and identify the traffic lights in the region of interest ROI to obtain the status of the traffic lights that need to pass through the intersection at the current moment;
    更新模块,用于更新历史跟踪目标的在所述当前时刻的状态,其中,所述历史跟踪目标为当前时刻的前一段时间内交通信号灯的检测识别结果;An update module, configured to update the state of the historical tracking target at the current moment, wherein the historical tracking target is the detection and recognition result of the traffic signal light in a period of time before the current moment;
    第二确定模块,用于确定当前时刻需要经过路口的交通信号灯的状态与所述历史跟踪目标在当前时刻的状态的第一匹配结果;The second determination module is used to determine the first matching result between the state of the traffic lights that need to pass through the intersection at the current moment and the state of the historical tracking target at the current moment;
    第三获取模块,用于在所述第二确定模块确定的所述第一匹配结果为所述历史跟踪目标匹配上当前时刻需要经过路口的交通信号灯的状态时,获取所述当前时刻匹配上的交通信号灯对应的所述历史跟踪目标的历史显示属性信息,其中,匹配上的交通信号灯为目标交通信号灯;The third acquiring module is configured to acquire the matching traffic signal at the current moment when the first matching result determined by the second determining module is that the historical tracking target matches the state of the traffic signal light that needs to pass through the intersection at the current moment. The historical display attribute information of the historical tracking target corresponding to the traffic signal light, wherein the matched traffic signal light is the target traffic signal light;
    第四获取模块,用于获取所述电子地图中包括当前时刻包括所述目标交通信号灯的位置信息;A fourth acquiring module, configured to acquire the position information including the target traffic light at the current moment in the electronic map;
    第三确定模块,用于在所述第四获取模块获取到所述电子地图中包括所述目标交通信号灯的位置信息时,确定所述目标交通信号灯在所述交通信号灯图像上的投影位置与所述历史跟踪目标的第二匹配结果;The third determining module is configured to determine the projected position of the target traffic signal on the image of the traffic signal and the location information of the target traffic signal when the fourth obtaining module obtains the position information of the target traffic signal in the electronic map. The second matching result of the above-mentioned historical tracking target;
    第五获取模块,用于根据所述第二匹配结果获取所述目标交通信号灯的投影位置匹配到对应的所述历史跟踪目标的显示属性状态,所述显示属性状态包括交通信号灯的颜色状态和形状状态;The fifth acquisition module is used to acquire the display attribute state of matching the projection position of the target traffic signal light to the corresponding historical tracking target according to the second matching result, and the display attribute state includes the color state and shape of the traffic signal light state;
    输出模块,用于输出所述第五获取模块获取的所述目标交通信号灯的显示属性状态。An output module, configured to output the display attribute state of the target traffic signal light acquired by the fifth acquisition module.
  10. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求1至8中任一项所述的指示灯状态识别方法。Wherein, the processor is configured to execute the instructions, so as to realize the method for identifying the state of the indicator light according to any one of claims 1-8.
  11. 一种计算机可读存储介质,其特征在于,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如权利要求1至8中任一项所述的指示灯状态识别方法。A computer-readable storage medium, characterized in that, when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the The method for identifying the status of the indicator light described above.
  12. 一种计算机程序产品,包括计算机程序或指令,其特征在于,所述计算机程序或指令被处理器执行时实现权利要求1至8中任一项所述的指示灯状态识别方法。A computer program product, including computer programs or instructions, characterized in that, when the computer programs or instructions are executed by a processor, the method for identifying the status of an indicator light according to any one of claims 1 to 8 is implemented.
PCT/CN2022/070699 2021-05-27 2022-01-07 Indicator lamp state recognition WO2022247299A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110587049.1A CN115249407B (en) 2021-05-27 2021-05-27 Indicator light state identification method and device, electronic equipment, storage medium and product
CN202110587049.1 2021-05-27

Publications (1)

Publication Number Publication Date
WO2022247299A1 true WO2022247299A1 (en) 2022-12-01

Family

ID=83696258

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/070699 WO2022247299A1 (en) 2021-05-27 2022-01-07 Indicator lamp state recognition

Country Status (2)

Country Link
CN (1) CN115249407B (en)
WO (1) WO2022247299A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116468868A (en) * 2023-04-27 2023-07-21 广州小鹏自动驾驶科技有限公司 Traffic signal lamp graph building method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000242889A (en) * 1999-02-22 2000-09-08 Sanko Kk Signal
CN105160924A (en) * 2015-08-25 2015-12-16 公安部第三研究所 Video processing-based intelligent signal lamp state detection method and detection system
CN108305475A (en) * 2017-03-06 2018-07-20 腾讯科技(深圳)有限公司 A kind of traffic lights recognition methods and device
CN110688992A (en) * 2019-12-09 2020-01-14 中智行科技有限公司 Traffic signal identification method and device, vehicle navigation equipment and unmanned vehicle
CN111292531A (en) * 2020-02-06 2020-06-16 北京百度网讯科技有限公司 Tracking method, device and equipment of traffic signal lamp and storage medium
CN111582189A (en) * 2020-05-11 2020-08-25 腾讯科技(深圳)有限公司 Traffic signal lamp identification method and device, vehicle-mounted control terminal and motor vehicle
DE102019211102A1 (en) * 2019-07-25 2021-01-28 Volkswagen Aktiengesellschaft Method, device and computer program for evaluating traffic light information about a traffic light system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109949593A (en) * 2019-03-13 2019-06-28 北京联合大学 A kind of traffic lights recognition methods and system based on crossing priori knowledge

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000242889A (en) * 1999-02-22 2000-09-08 Sanko Kk Signal
CN105160924A (en) * 2015-08-25 2015-12-16 公安部第三研究所 Video processing-based intelligent signal lamp state detection method and detection system
CN108305475A (en) * 2017-03-06 2018-07-20 腾讯科技(深圳)有限公司 A kind of traffic lights recognition methods and device
DE102019211102A1 (en) * 2019-07-25 2021-01-28 Volkswagen Aktiengesellschaft Method, device and computer program for evaluating traffic light information about a traffic light system
CN110688992A (en) * 2019-12-09 2020-01-14 中智行科技有限公司 Traffic signal identification method and device, vehicle navigation equipment and unmanned vehicle
CN111292531A (en) * 2020-02-06 2020-06-16 北京百度网讯科技有限公司 Tracking method, device and equipment of traffic signal lamp and storage medium
CN111582189A (en) * 2020-05-11 2020-08-25 腾讯科技(深圳)有限公司 Traffic signal lamp identification method and device, vehicle-mounted control terminal and motor vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116468868A (en) * 2023-04-27 2023-07-21 广州小鹏自动驾驶科技有限公司 Traffic signal lamp graph building method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115249407B (en) 2023-09-26
CN115249407A (en) 2022-10-28

Similar Documents

Publication Publication Date Title
US11094198B2 (en) Lane determination method, device and storage medium
CN110146097B (en) Method and system for generating automatic driving navigation map, vehicle-mounted terminal and server
WO2021017212A1 (en) Multi-scene high-precision vehicle positioning method and apparatus, and vehicle-mounted terminal
CN110785719A (en) Method and system for instant object tagging via cross temporal verification in autonomous vehicles
CN110869559A (en) Method and system for integrated global and distributed learning in autonomous vehicles
CN110753953A (en) Method and system for object-centric stereo vision in autonomous vehicles via cross-modality verification
CN111582189B (en) Traffic signal lamp identification method and device, vehicle-mounted control terminal and motor vehicle
WO2020043081A1 (en) Positioning technique
CN111310708B (en) Traffic signal lamp state identification method, device, equipment and storage medium
CN112753038B (en) Method and device for identifying lane change trend of vehicle
US11776277B2 (en) Apparatus, method, and computer program for identifying state of object, and controller
US12012102B2 (en) Method for determining a lane change indication of a vehicle
CN112507852A (en) Lane line identification method, device, equipment and storage medium
JP2022542082A (en) Pose identification method, pose identification device, computer readable storage medium, computer equipment and computer program
WO2022247299A1 (en) Indicator lamp state recognition
KR20200013156A (en) Method and system for improving signage detection performance
CN113971795A (en) Violation inspection system and method based on self-driving visual sensing
CN109800684A (en) The determination method and device of object in a kind of video
US20210407114A1 (en) Systems and methods for transferring map data between different maps
CN115792945A (en) Floating obstacle detection method and device, electronic equipment and storage medium
CN111857113B (en) Positioning method and positioning device for movable equipment
CN113048988B (en) Method and device for detecting change elements of scene corresponding to navigation map
CN110807397A (en) Method and device for predicting motion state of target object
JP7358593B1 (en) In-vehicle device, operation method of in-vehicle device, and program
US20220270371A1 (en) Determining Distance of Objects

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22810038

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22810038

Country of ref document: EP

Kind code of ref document: A1