Traffic light identification method and device, equipment and storage medium
Through the collaborative use of point cloud data processing and image data, the area of traffic light recognition is reduced, the recognition accuracy and speed are improved, and the problems of large calculation amount and poor recognition effect in the existing technology are solved.
Patent Information
- Application Number
- CN202410510148.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-09-06
AI Technical Summary
The traffic light recognition based on the overall image data area in the existing technology requires a large amount of calculation and poor recognition effect, and is easily interfered by pixels outside the non-traffic light device.
Obtain image data and point cloud data through vehicle-mounted sensors, use point cloud data to obtain the frame of the rod, convert it to the coordinate system of the image data, reduce the recognition area, and use the pre-trained model to perform traffic light recognition.
It improves the accuracy and computing speed of traffic light recognition, reduces computational overhead, enhances the robustness of the recognition system, and avoids pixel interference outside of non-traffic light equipment.
Smart Images

Figure CN118609083A
Abstract
Description
Technical Field
[0001] The present application relates to vehicle driving technology, and in particular to a traffic light recognition method, device, equipment and storage medium. Background Art
[0002] With the continuous development of intelligent driving technology, how to detect the position and status of traffic lights on the current road during the movement of intelligent driving cars is an important technology in advanced assisted driving and unmanned driving.
[0003] In the prior art, the detection of traffic lights on the road is usually based on the overall image data to detect and identify the traffic lights therein, and the area is extracted based on the overall image data, and then the traffic lights are recognized. Since the area to be recognized has a wide field of view and many elements to be recognized, the amount of calculation required is large, and since there are pixels outside the traffic light equipment that interfere with the recognition, the recognition effect is poor.
[0004] Therefore, when the existing technology performs traffic light recognition based on the overall image data area, it is still lacking in terms of calculation amount and recognition effect. Summary of the invention
[0005] The present application provides a traffic light recognition method, device, equipment and storage medium to solve the problem that the prior art is still lacking in terms of calculation amount and recognition effect when performing traffic light recognition based on the overall image data area.
[0006] In a first aspect, the present application provides a traffic light recognition method, comprising:
[0007] Acquire detection data of the surrounding environment through various on-board sensors, wherein the detection data includes image data and point cloud data;
[0008] Acquire a point cloud rod-shaped object frame according to the point cloud data, and uniformly transform the point cloud rod-shaped object frame into a coordinate system where the image data is located to acquire a target rod-shaped object frame;
[0009] The image data indicated by the frame of the target rod-shaped object is recognized to obtain a traffic light recognition result.
[0010] In a possible design, obtaining a point cloud rod-shaped object bounding box according to the point cloud data includes:
[0011] Performing height filtering and feature filtering on the point cloud data to obtain a rod-shaped object point cloud;
[0012] Wherein, all points whose height from the ground is greater than a preset height are selected from the point cloud data, and other points are filtered out to obtain a point cloud after height filtering;
[0013] The rod-shaped object point cloud is obtained by filtering the point cloud according to the height.
[0014] In a possible design, obtaining the rod-shaped object point cloud according to the point cloud after filtering the height includes:
[0015] By using the laser radar single-line scanning point cloud characteristics, the points in the point cloud after the height filtering are arranged in sequence according to the scanning sequence, and then multiple point cloud segments are segmented according to the distance between points, and all point cloud segments with a length within a preset length are selected to obtain the point cloud after the characteristic filtering;
[0016] The point cloud after the feature filtering is clustered and segmented to obtain a plurality of rod-shaped object point clouds.
[0017] In a possible design, clustering and segmenting the point cloud after the feature filtering to obtain a plurality of rod-shaped object point clouds includes:
[0018] The feature-filtered point cloud is divided into a number of parts by using a PCL-based Euler clustering algorithm, and the several parts are used as corresponding multiple rod-shaped object point clouds, and a corresponding point cloud rod-shaped object border is generated according to each of the rod-shaped object point clouds, and the point cloud rod-shaped object border is used to indicate the data area corresponding to the rod-shaped object point cloud.
[0019] In a possible design, the step of uniformly converting the point cloud rod-shaped object bounding box into the coordinate system of the image data to obtain the target rod-shaped object bounding box includes:
[0020] By using the external parameter calibration relationship between the point cloud data and the image data, a plurality of the point cloud rod-shaped object frames are uniformly converted to the coordinate system where the image data is located, so as to obtain a plurality of corresponding target rod-shaped object frames;
[0021] The area image indicated by the border of the target rod is extracted and used as the target image. The target image is detected and recognized by a pre-trained target detection model to obtain a traffic light recognition result.
[0022] In a possible design, detecting and identifying the target image by using a pre-trained target detection model to obtain a traffic light recognition result includes: inputting the target image into the target detection model for detection, and if the rod-shaped object in the target image is detected to be a traffic light, marking the target image as a traffic light image, and obtaining the traffic light recognition result according to the traffic light image;
[0023] If it is detected that the rod-shaped object in the target image is not a traffic light, the area image indicated by the borders of other target rod-shaped objects is extracted as the target image. If none of the rod-shaped objects in other target images are traffic lights, the traffic light recognition result indicates that no traffic light is detected.
[0024] In one possible design, obtaining the traffic light recognition result based on the traffic light image includes: recognizing the traffic light image through optical character recognition technology to obtain traffic light information, and using it as the traffic light recognition result, wherein the traffic light information includes the current traffic light color and countdown information.
[0025] In a second aspect, the present application provides a traffic light recognition device, comprising:
[0026] An acquisition module, used to acquire detection data of the surrounding environment through various vehicle-mounted sensors, wherein the detection data includes image data and point cloud data;
[0027] A processing module, used for obtaining a point cloud rod-shaped object frame according to the point cloud data, and uniformly converting the point cloud rod-shaped object frame into a coordinate system where the image data is located, so as to obtain a target rod-shaped object frame;
[0028] The execution module is used to identify the image data indicated by the frame of the target rod-shaped object and obtain a traffic light recognition result.
[0029] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0030] The memory stores computer-executable instructions;
[0031] The processor executes the computer-executable instructions stored in the memory to implement a traffic light recognition method.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement a traffic light recognition method when executed by a processor.
[0033] The present application provides a traffic light recognition method, device, equipment and storage medium. After acquiring image data and point cloud data of the surrounding environment through various vehicle-mounted sensors, rod-shaped objects are recognized based on the point cloud data to obtain a point cloud rod-shaped object frame corresponding to the rod-shaped object, and the point cloud rod-shaped object frame is uniformly converted to the coordinate system where the image data is located to obtain the target rod-shaped object frame. After extracting the area image indicated by the target rod-shaped object frame, the extracted area image is recognized to obtain the traffic light recognition result, thereby reducing the area image that needs to be detected and recognized, improving the recognition accuracy of traffic lights, reducing the computational overhead of the recognition algorithm, avoiding pixel interference recognition outside non-traffic light equipment, and thus improving the operation rate, recognition effect and robustness of the recognition algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 Schematic diagram of the process of the traffic light recognition method provided in the embodiment of the present application Figure 1 ;
[0036] Figure 2 Schematic diagram of the process of the traffic light recognition method provided in the embodiment of the present application Figure 2 ;
[0037] Figure 3 A diagram of the traffic light recognition solution architecture provided in the embodiment of the present application;
[0038] Figure 4 A schematic diagram of a traffic light recognition scenario provided in an embodiment of the present application;
[0039] Figure 5 A schematic diagram of the structure of a traffic light recognition device provided in an embodiment of the present application;
[0040] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims, rather than all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0042] With the continuous development and progress of social economy and technology, intelligent self-driving vehicles have become an increasingly important means of transportation. Intelligent self-driving vehicles have improved the driving experience while ensuring people's travel safety. During the driving process of intelligent self-driving vehicles, how to automatically detect the position and status of the traffic lights ahead is an important part of advanced assisted driving and unmanned driving. Usually, due to complex traffic scenes, drastic changes in lighting, and camera resolution, it becomes difficult to detect the position and status of traffic lights.
[0043] In the prior art, the detection of traffic lights on the road is usually based on the overall image data to detect and identify the traffic lights. For example, the surrounding environment is collected by cameras and lidars, and the collected data is converted into unified point cloud data or image data through calibrated external parameters. Based on the unified point cloud data or image data, possible traffic lights are detected and identified. However, this solution requires a lot of regional data and elements to be identified, resulting in a large amount of calculation required. In addition, since there is pixel interference recognition outside the non-traffic light equipment, the recognition effect is poor. At the same time, traffic light recognition needs to be performed within the entire data, resulting in poor robustness of the recognition system.
[0044] The present application provides a traffic light recognition method, which obtains image data and point cloud data of the surrounding environment through various vehicle-mounted sensors, and then recognizes the rod-shaped object based on the point cloud data to obtain the point cloud rod-shaped object frame corresponding to the rod-shaped object, and uniformly converts the point cloud rod-shaped object frame to the coordinate system where the image data is located to obtain the target rod-shaped object frame, and after extracting the area image indicated by the target rod-shaped object frame, the extracted area image is recognized to obtain a recognition result indicating whether the rod-shaped object in the current area image is a traffic light. If it is a traffic light, the corresponding traffic light information is further obtained, thereby reducing the area image that needs to be detected and recognized, improving the recognition accuracy of the traffic light, reducing the computational overhead of the recognition algorithm, and avoiding pixel interference recognition outside the non-traffic light device, thereby improving the operation rate, recognition effect and robustness of the recognition algorithm.
[0045] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0046] Embodiment 1
[0047] Figure 1 Schematic diagram of the traffic light recognition method provided in the embodiment of the present application Figure 1 . Figure 3 This is a diagram of the traffic light recognition solution architecture provided in the embodiment of the present application. Figure 1 and Figure 3 As shown, the method includes:
[0048] S101, acquiring detection data of the surrounding environment through various vehicle-mounted sensors, wherein the detection data includes image data and point cloud data;
[0049] Specifically, if Figure 3 As shown, after acquiring point cloud data and image data of the surrounding environment respectively through the laser radar and the camera, the acquired point cloud data is stored in a point cloud data packet or a point cloud database, wherein, for the point cloud data in the point cloud data packet or the point cloud database, it is possible to parse the data in the point cloud data packet or the point cloud database based on a preset laser radar parsing table to obtain information indicating the rotation angle, distance value and reflection intensity of the laser beam, the image data acquired by the camera indicates corresponding two-dimensional data, and the coordinate system based on the image data is confirmed as the vehicle body coordinate system.
[0050] S102, obtaining a point cloud rod-shaped object bounding box according to the point cloud data, and uniformly converting the point cloud rod-shaped object bounding box into a coordinate system where the image data is located, so as to obtain a target rod-shaped object bounding box;
[0051] Specifically, after acquiring the image data and point cloud data, based on the information of the rotation angle, distance value and reflection intensity of each laser beam indicated by the point cloud data, the bounding box of the point cloud rod of the lidar, that is, the point cloud rod bounding box, is identified through the rod extraction algorithm. Then, based on the external parameter calibration relationship, the point cloud rod bounding box is mapped and annotated in the image, thereby obtaining the corresponding target rod bounding box.
[0052] S103: Recognize the image data indicated by the frame of the target rod-shaped object to obtain a traffic light recognition result.
[0053] Specifically, after obtaining the corresponding target rod-shaped object frame, the area of interest of the rod-shaped object image within the target rod-shaped object frame is extracted, and the extracted image area is identified by the traffic light recognition algorithm, so that the traffic light recognition result indicates whether the rod-shaped object in the extracted image area is a traffic light. If it is a traffic light, the corresponding status information is further obtained.
[0054] The present embodiment provides a traffic light recognition method, which obtains image data and point cloud data of the surrounding environment through various vehicle-mounted sensors, and then recognizes the rod-shaped object based on the point cloud data to obtain a point cloud rod-shaped object frame corresponding to the rod-shaped object, and uniformly converts the point cloud rod-shaped object frame to the coordinate system where the image data is located to obtain the target rod-shaped object frame, and after extracting the area image indicated by the target rod-shaped object frame, recognizes the extracted area image to obtain a recognition result indicating whether the rod-shaped object in the current area image is a traffic light. If it is a traffic light, the corresponding traffic light information is further obtained, thereby reducing the area image that needs to be detected and recognized, improving the recognition accuracy of the traffic light, reducing the computational overhead of the recognition algorithm, and avoiding pixel interference recognition outside the non-traffic light device, thereby improving the operation rate, recognition effect and robustness of the recognition algorithm.
[0055] The traffic light recognition method of the present application is described in detail using a specific embodiment below.
[0056] Embodiment 2
[0057] Figure 2 Schematic diagram of the traffic light recognition method provided in the embodiment of the present application Figure 2 . Figure 4 A schematic diagram of a traffic light recognition scenario provided in an embodiment of the present application. Figure 2 and Figure 4 As shown, the method includes:
[0058] S201, acquiring detection data of the surrounding environment through each vehicle-mounted sensor, wherein the detection data includes image data and point cloud data;
[0059] Specifically, the implementation of step S201 is similar to that of step S101, and is not described in detail in this embodiment.
[0060] S202, selecting all points whose height from the ground is greater than a preset height in the point cloud data, and filtering out other points to obtain a point cloud after height filtering;
[0061] Specifically, if Figure 4As shown, after acquiring the image data and point cloud data, the point cloud data is coarsely filtered to preliminarily reduce the recognition overhead of the rod-shaped object as a traffic light, wherein the point cloud data that is less than or equal to a preset height, such as 1.5 meters, is filtered, and the remaining point cloud after filtering is confirmed as the point cloud after height filtering.
[0062] S203, obtaining a characteristic filtered point cloud according to the highly filtered point cloud;
[0063] Specifically, after obtaining the highly filtered point cloud, the laser radar single-line scanning point cloud characteristics are used to arrange the points in the highly filtered point cloud in order of scanning, and then multiple point cloud segments are divided according to the distance between points. After selecting all point cloud segments with a preset length such as sixty centimeters, other point cloud segments are filtered out, and the filtered point cloud is used as the feature filtered point cloud.
[0064] S204, clustering and segmenting the point cloud after the characteristic filtering to obtain a plurality of rod-shaped object point clouds;
[0065] Specifically, after the point cloud data is coarsely filtered through height filtering and feature filtering, the point cloud after feature filtering is divided into several parts through a rod extraction algorithm such as the Euler clustering algorithm based on PCL (Point Cloud Library), and the several parts are used as corresponding multiple rod-shaped point clouds, and a corresponding point cloud rod-shaped object border is generated according to each rod-shaped object point cloud. The point cloud rod-shaped object border is used to indicate the data area corresponding to the rod-shaped object point cloud, thereby realizing the identification of rods in the point cloud data.
[0066] S205, uniformly converting the plurality of the point cloud rod-shaped object frames into the coordinate system of the image data through the external parameter calibration relationship between the point cloud data and the image data, and obtaining a plurality of corresponding target rod-shaped object frames;
[0067] Specifically, after obtaining the corresponding point cloud rod-shaped object bounding box, the laser radar coordinate system and the camera coordinate system are unified into the vehicle coordinate system through the relative transformation relationship between the laser radar measurement coordinate system and the camera coordinate system, thereby realizing the external parameter calibration between different types of vehicle-mounted sensors. Among them, the relative transformation relationship between the laser radar measurement coordinate system and the camera coordinate system includes a preset translation matrix and a preset rotation matrix. Based on the preset translation matrix and the preset rotation matrix, the obtained point cloud rod-shaped object bounding box is converted to the camera coordinate system, that is, the image coordinate system, thereby obtaining the corresponding target rod-shaped object bounding box in the image coordinate system.
[0068] S206, extracting the area image indicated by the border of the target rod-shaped object and using it as the target image, and inputting the target image into the target detection model for detection;
[0069] Specifically, if Figure 4 As shown, after the point cloud data and the point cloud rod-shaped object frame are converted and identified into the image through the external parameter calibration relationship, the corresponding target image data and the target rod-shaped object frame are obtained, that is, the image range of the rod-shaped object or the traffic light is marked, and the rod-shaped object image area within the target rod-shaped object frame is extracted as the target image, and the target image is recognized by a traffic light recognition algorithm such as YOLO V5. Of course, the traffic light recognition algorithm can also be other recognition algorithms such as YOLO V3 or Adaboost, as long as it can realize the recognition of traffic lights according to the target image. Among them, YOLO V5 is trained based on the pre-collected traffic light image data to obtain the target detection model.
[0070] S207, if it is detected that the rod-shaped object in the target image is a traffic light, marking the target image as a traffic light image;
[0071] Specifically, after the target image is extracted, the target image is input into a pre-acquired target detection model for recognition and detection. If the current target image is detected to be a traffic light, the current target image is marked as a traffic light image, and the area images indicated by the borders of other target rods are continuously extracted as corresponding target images. It is detected whether the other target images are traffic light images until the extraction and detection of the area images indicated by the borders of other target rods are completed, and then the status information corresponding to each traffic light image, that is, the traffic light information, is obtained.
[0072] S208, if it is detected that the rod-shaped object in the target image is not a traffic light, extracting the area image indicated by the frame of the other target rod-shaped object as the target image;
[0073] Specifically, after the target image is input into the target detection model for recognition and detection, if it is detected that the rod-shaped object in the current target image is not a traffic light, the area images indicated by the borders of other target rod-shaped objects are continuously extracted as the corresponding target images, and if the rod-shaped objects in other target images are not traffic lights, the traffic light recognition result indicates that no traffic light is detected.
[0074] S209, recognizing the traffic light image by optical character recognition technology to obtain traffic light information as the traffic light recognition result;
[0075] Specifically, after detecting that the current target image is a traffic light, or detecting and identifying the target image corresponding to the area image indicated by the border of other target rod-shaped objects as a traffic light, the traffic light information of each traffic light is obtained through optical character recognition technology, where the traffic light information includes the current traffic light color and countdown information, and the countdown information indicates the remaining time of the countdown light of the corresponding color.
[0076] The present embodiment provides a traffic light recognition method, which obtains image data and point cloud data of the surrounding environment through various vehicle-mounted sensors, and then recognizes the rod-shaped object based on the point cloud data to obtain a point cloud rod-shaped object frame corresponding to the rod-shaped object, and uniformly converts the point cloud rod-shaped object frame to the coordinate system where the image data is located to obtain the target rod-shaped object frame, and after extracting the area image indicated by the target rod-shaped object frame, recognizes the extracted area image to obtain a recognition result indicating whether the rod-shaped object in the current area image is a traffic light. If it is a traffic light, the corresponding traffic light information is further obtained, thereby reducing the area image that needs to be detected and recognized, improving the recognition accuracy of the traffic light, reducing the computational overhead of the recognition algorithm, and avoiding pixel interference recognition outside the non-traffic light device, thereby improving the operation rate, recognition effect and robustness of the recognition algorithm.
[0077] The embodiment of the present invention can divide the electronic device or the main control device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0078] Figure 5 This is a schematic diagram of the structure of the traffic light recognition device provided in the embodiment of the present application. Figure 5 As shown, the device 50 comprises:
[0079] An acquisition module 501 is used to acquire detection data of the surrounding environment through various vehicle-mounted sensors, wherein the detection data includes image data and point cloud data;
[0080] A processing module 502 is used to obtain a point cloud rod-shaped object frame according to the point cloud data, and uniformly convert the point cloud rod-shaped object frame into a coordinate system where the image data is located to obtain a target rod-shaped object frame;
[0081] The execution module 503 is used to identify the image data indicated by the frame of the target rod-shaped object to obtain a traffic light recognition result.
[0082] Furthermore, the processing module 502 is specifically used to perform height filtering and feature filtering on the point cloud data to obtain a rod-shaped object point cloud, wherein all points whose height from the ground is greater than a preset height are selected from the point cloud data, and other points are filtered out to obtain a point cloud after height filtering;
[0083] The rod-shaped object point cloud is obtained by filtering the point cloud according to the height.
[0084] Furthermore, the processing module 502 is specifically used to scan the point cloud characteristics by a laser radar single line, arrange the points in the point cloud after the height filtering in the order of scanning, and then divide a plurality of point cloud segments according to the distance between the points, and select all point cloud segments with a length within a preset length to obtain the point cloud after the characteristic filtering;
[0085] The point cloud after the feature filtering is clustered and segmented to obtain a plurality of rod-shaped object point clouds.
[0086] Furthermore, the processing module 502 is specifically used to divide the feature-filtered point cloud into several parts through the PCL-based Euler clustering algorithm, and use the several parts as corresponding multiple rod-shaped object point clouds, and generate corresponding point cloud rod-shaped object borders according to each rod-shaped object point cloud, and the point cloud rod-shaped object border is used to indicate the data area corresponding to the rod-shaped object point cloud.
[0087] Furthermore, the processing module 502 is specifically used to uniformly convert the plurality of the point cloud rod-shaped object frames into the coordinate system of the image data through the external parameter calibration relationship between the point cloud data and the image data, and obtain a plurality of corresponding target rod-shaped object frames;
[0088] The area image indicated by the border of the target rod is extracted and used as the target image. The target image is detected and recognized by a pre-trained target detection model to obtain a traffic light recognition result.
[0089] Furthermore, the execution module 503 is specifically configured to input the target image into the target detection model for detection, and if the rod-shaped object in the target image is detected to be a traffic light, mark the target image as a traffic light image, and obtain the traffic light recognition result according to the traffic light image;
[0090] If it is detected that the rod-shaped object in the target image is not a traffic light, the area image indicated by the borders of other target rod-shaped objects is extracted as the target image. If none of the rod-shaped objects in other target images are traffic lights, the traffic light recognition result indicates that no traffic light is detected.
[0091] Furthermore, the execution module 503 is specifically configured to recognize the traffic light image by optical character recognition technology to obtain traffic light information as the traffic light recognition result, wherein the traffic light information includes the current traffic light color and countdown information.
[0092] The traffic light recognition device provided in this embodiment can execute the traffic light recognition method of the above embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0093] In the specific implementation of the aforementioned traffic light recognition device, each module can be implemented as a processor, and the processor can execute computer-executable instructions stored in the memory, so that the processor executes the aforementioned traffic light recognition method.
[0094] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 60 includes: at least one processor 601 and a memory 602. The electronic device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.
[0095] In the specific implementation process, at least one processor 601 executes the computer-executable instructions stored in the memory 602, so that at least one processor 601 executes the traffic light recognition method executed by the electronic device side as above.
[0096] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0097] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0098] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0099] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0100] The above-mentioned functions implemented by the electronic device and the main control device introduce the scheme provided by the embodiment of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in the embodiment of the present invention, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present invention.
[0101] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above traffic light recognition method is implemented.
[0102] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0103] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.
[0104] The present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0105] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A traffic light recognition method, characterized in that: The method comprises: Acquire detection data of the surrounding environment through various on-board sensors, wherein the detection data includes image data and point cloud data; Acquire a point cloud rod-shaped object frame according to the point cloud data, and uniformly transform the point cloud rod-shaped object frame into a coordinate system where the image data is located to acquire a target rod-shaped object frame; The image data indicated by the frame of the target rod-shaped object is recognized to obtain a traffic light recognition result.
2. The method according to claim 1, characterized in that The step of obtaining a point cloud rod-shaped object frame according to the point cloud data includes: Performing height filtering and feature filtering on the point cloud data to obtain a rod-shaped object point cloud; Wherein, all points whose height from the ground is greater than a preset height are selected from the point cloud data, and other points are filtered out to obtain a point cloud after height filtering; The rod-shaped object point cloud is obtained by filtering the point cloud according to the height.
3. The method according to claim 2, characterized in that The step of obtaining the rod-shaped object point cloud by filtering the point cloud according to the height includes: By using the laser radar single-line scanning point cloud characteristics, the points in the point cloud after the height filtering are arranged in sequence according to the scanning sequence, and then multiple point cloud segments are segmented according to the distance between points, and all point cloud segments with a length within a preset length are selected to obtain the point cloud after the characteristic filtering; The point cloud after the feature filtering is clustered and segmented to obtain a plurality of rod-shaped object point clouds.
4. The method according to claim 3, characterized in that The step of clustering and segmenting the point cloud after the characteristic filtering to obtain a plurality of rod-shaped object point clouds includes: The feature-filtered point cloud is divided into a number of parts by using a PCL-based Euler clustering algorithm, and the several parts are used as corresponding multiple rod-shaped object point clouds, and a corresponding point cloud rod-shaped object border is generated according to each of the rod-shaped object point clouds, and the point cloud rod-shaped object border is used to indicate the data area corresponding to the rod-shaped object point cloud.
5. The method according to claim 1, characterized in that The step of uniformly converting the point cloud rod-shaped object bounding box into the coordinate system where the image data is located to obtain the target rod-shaped object bounding box includes: By using the external parameter calibration relationship between the point cloud data and the image data, a plurality of the point cloud rod-shaped object frames are uniformly converted to the coordinate system where the image data is located, so as to obtain a plurality of corresponding target rod-shaped object frames; The area image indicated by the border of the target rod is extracted and used as the target image. The target image is detected and recognized by a pre-trained target detection model to obtain a traffic light recognition result.
6. The method according to claim 5, characterized in that The detecting and identifying the target image by using the pre-trained target detection model to obtain a traffic light recognition result includes: Inputting the target image into the target detection model for detection, if the rod-shaped object in the target image is detected to be a traffic light, marking the target image as a traffic light image, and obtaining the traffic light recognition result according to the traffic light image; If it is detected that the rod-shaped object in the target image is not a traffic light, the area image indicated by the borders of other target rod-shaped objects is extracted as the target image. If none of the rod-shaped objects in other target images are traffic lights, the traffic light recognition result indicates that no traffic light is detected.
7. The method according to claim 6, characterized in that The obtaining the traffic light recognition result according to the traffic light image includes: The traffic light image is recognized by optical character recognition technology to obtain traffic light information as the traffic light recognition result, wherein the traffic light information includes the current traffic light color and countdown information.
8. A traffic light recognition device, characterized in that: include: An acquisition module, used to acquire detection data of the surrounding environment through various vehicle-mounted sensors, wherein the detection data includes image data and point cloud data; A processing module, used for obtaining a point cloud rod-shaped object frame according to the point cloud data, and uniformly converting the point cloud rod-shaped object frame into a coordinate system where the image data is located, so as to obtain a target rod-shaped object frame; The execution module is used to identify the image data indicated by the frame of the target rod-shaped object and obtain a traffic light recognition result.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
