Foggy day identification method and device, electronic equipment and storage medium
By rastering and arc detection of lidar point cloud data, the integrity of the arc group is used to judge foggy days scenes, the problem of high error detection rate for foggy days recognition in autonomous driving is solved, and the rapid and accurate fog is achieved Day identification.
Patent Information
- Application Number
- CN202411095391.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-01
AI Technical Summary
In autonomous driving, the performance of lidar under foggy weather conditions is affected, resulting in an increase in environmental noise and affecting the precise perception and safety of the system. It is difficult for the existing technology to effectively identify foggy weather scenarios, resulting in a high false detection rate.
By obtaining the point cloud data of the lidar, performing rasterization processing, detecting the arc group with the center of the lidar as the center, and determining whether it is in a foggy scene based on the integrity of the arc group, and using the arc in the target arc group The total arc length and maximum arc angle of the circle formed are used to determine the foggy day scene.
It realizes the rapid and accurate identification of foggy scenes in autonomous driving, reduces the false recognition rate, improves the recognition speed and accuracy, and effectively reduces the false recognition situation caused by outliers.
Smart Images

Figure CN118884471A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of autonomous driving technology, and in particular to a foggy weather recognition method, device, electronic device and storage medium. Background Art
[0002] Laser radar (LiDAR) is generally used as an environmental perception tool in autonomous driving, providing strong support for the vehicle's autonomous navigation.
[0003] However, the performance of LiDAR faces severe challenges under certain meteorological conditions, especially in foggy weather. The light scattering caused by fog not only greatly weakens the signal strength of the returning LiDAR, but also introduces a large amount of environmental noise, which directly affects the system's accurate perception and judgment of the surrounding environment, and poses a challenge to the smooth operation and safety of autonomous driving.
[0004] Therefore, in the LiDAR-assisted autonomous driving framework, real-time identification of foggy scenes is crucial. Summary of the invention
[0005] The embodiments of the present disclosure provide a foggy weather recognition method, device, electronic device and storage medium, which are used to solve the problem of high false positive rate in foggy weather detection in related technologies, and can accurately recognize foggy weather scenes in real time during autonomous driving.
[0006] In a first aspect, an embodiment of the present disclosure provides a foggy weather identification method, the method comprising:
[0007] Get the point cloud data of the current frame of the laser radar;
[0008] Perform rasterization processing on the point cloud data to obtain the current frame raster map;
[0009] Detect arcs with the center of the laser radar as the center and a radius less than the distance threshold in the current frame grid image, and obtain a target arc group. The radius of the arcs in the target arc group is the same, and the total arc length of the target arc group is the longest among any arc groups with a radius less than the distance threshold detected;
[0010] According to the integrity of the circle formed by the arcs in the target arc group, it is judged whether the current scene is foggy.
[0011] In one embodiment of the present disclosure, judging whether the current scene is foggy based on the integrity of the circle formed by the arcs in the target arc group includes:
[0012] Determine whether the total arc length of the arcs in the target arc group is greater than the arc length threshold;
[0013] Determine whether the maximum arc angle of the arcs in the target arc group is greater than the angle threshold;
[0014] If the total arc length of the arcs in the target arc group is greater than the arc length threshold, and the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, it is determined that the current scene is foggy.
[0015] In a second aspect, an embodiment of the present disclosure further provides a foggy weather identification device, the device comprising:
[0016] Point cloud acquisition module, used to obtain the point cloud data of the current frame of the laser radar;
[0017] The rasterization module is used to perform rasterization processing on the point cloud data to obtain the current frame raster map;
[0018] The arc detection module is used to detect an arc with the center of the laser radar as the center and a radius less than the distance threshold in the current frame raster image, and obtain a target arc group. The radius of the arcs in the target arc group is the same, and the total arc length of the target arc group is the longest among any arc groups with a radius less than the distance threshold detected;
[0019] The fog judgment module is used to judge whether the current scene is foggy according to the integrity of the circle formed by the arcs in the target arc group.
[0020] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the fog recognition method as described above.
[0021] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the foggy weather identification method as described above.
[0022] The embodiments of the present disclosure provide a foggy weather recognition method, device, electronic device and storage medium. Each recognition only needs to use the point cloud data of the current frame. The amount of data required for a single recognition is small, and the recognition speed is fast. The arcs in the target arc group are composed of a large number of laser points. The foggy weather scene is recognized based on the integrity of the circle composed of the arcs in the target arc group. A large number of laser points are used to recognize the foggy weather scene. This solution can effectively reduce the misrecognition caused by outliers and improve the recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0024] Figure 1is a flow chart of a foggy weather identification method in an embodiment of the present disclosure;
[0025] Figure 2a is a point cloud image including fog points in an embodiment of the present disclosure;
[0026] Figure 2b is another point cloud image containing fog points in the embodiment of the present disclosure;
[0027] Figure 3 is a schematic diagram of a target arc group in an embodiment of the present disclosure;
[0028] Figure 4 is a schematic diagram of a current frame grid diagram in an embodiment of the present disclosure;
[0029] Figure 5 is another schematic diagram of a current frame grid diagram in an embodiment of the present disclosure;
[0030] Figure 6 is another schematic diagram of a current frame grid diagram in an embodiment of the present disclosure;
[0031] Figure 7 This is a flow chart for determining fog level in an embodiment of the present disclosure;
[0032] Figure 8 A schematic diagram of another current frame grid diagram in an embodiment of the present disclosure;
[0033] Fig. 9 Schematic diagram of the structure of a foggy weather recognition device in an embodiment of the present disclosure;
[0034] Fig.10 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0037] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0038] As mentioned in the background technology section, real-time recognition of foggy scenes is crucial in the LiDAR-assisted autonomous driving framework. LiDAR is very prone to noise in foggy conditions, and if these noises are not processed, they will often have a great impact on the ride comfort of the autonomous driving car.
[0039] At present, the denoising of foggy lidar mainly includes the following categories:
[0040] The first is a method based on distance thresholds. This method determines whether it is a noise point based on the distance between each point in the point cloud and the surrounding points. In foggy weather, laser noise points are often less dense than the reflection points of conventional obstacles. Outliers, i.e. fog points, are judged by setting distance and density-related thresholds between laser points. Among them, the distance and density-related thresholds can be determined by empirical values, statistical methods, or machine learning algorithms. This filtering method relies on the judgment conditions of outliers. In actual scenarios, many conventional obstacles (such as vegetation) also have the characteristics of sparse point cloud density, which is prone to false detection.
[0041] The second method is based on reflection intensity. The laser beam emitted by the lidar will be scattered by water droplets in the fog, resulting in a decrease in reflection intensity. The reflection intensity of laser points reflected in foggy weather is often relatively low compared to conventional obstacles. By setting the reflection intensity threshold, most of the noise points in foggy weather can be filtered. However, the reflection intensity is mainly related to the distance of the reflector and the distance between the reflector and the sensor. There are cases where the reflection intensity of the laser point cloud on some conventional obstacles is relatively low, which is also prone to false detection.
[0042] The third method is to input the original point cloud into a deep neural network for training, and use the trained neural network to infer the regular obstacles near the self-driving car, and then reversely deduce that the laser points that are not regular obstacles are foggy noise points. This method requires a large amount of labeled data to train the neural network model. It is difficult to obtain data for foggy scenes, and the cost of data labeling is relatively high. In addition, once the method based only on deep learning misses obstacles, the safety of the self-driving car will be greatly reduced.
[0043] In response to the above problems, the embodiments of the present disclosure provide a foggy weather recognition method, device, electronic device and storage medium, which can at least improve the foggy weather scene recognition speed while ensuring the real-time detection accuracy.
[0044] Figure 1is a flow chart of a foggy weather recognition method in an embodiment of the present disclosure. The method can be executed by a foggy weather recognition device, which can be implemented in software and / or hardware, and can be configured in an electronic device. Figure 1 As shown, the method may include steps S110-S140.
[0045] In S110, the point cloud data of the current frame of the laser radar is obtained.
[0046] In some embodiments, the laser radar here can be a mechanical laser radar, such as a rotating laser radar.
[0047] Rotating LiDAR is a common type of LiDAR, which mechanically rotates the laser transmitting and receiving devices to achieve a 360-degree scan of the surrounding environment. This type of radar usually contains a rotating platform on which components such as lasers, scanning mirrors, and optical receivers are installed. As the platform rotates, the laser beam irradiates the surroundings in a predetermined pattern (such as linear scanning or a specific pattern), collects and analyzes the reflected light, and thus constructs a three-dimensional point cloud map of the surrounding environment.
[0048] In S120, the point cloud data is rasterized to obtain a current frame raster image.
[0049] In some embodiments, the point cloud data may be converted into point cloud data under a bird's-eye view (BirdEye View, BEV) before rasterization processing, and then the point cloud data under the bird's-eye view may be rasterized to obtain a current frame raster map.
[0050] The point cloud data from a bird's-eye view can correspond to a plane, which can be called a reference plane. The point cloud data from a bird's-eye view can be rasterized by dividing the reference plane into multiple grids and determining the points corresponding to each grid, where the points corresponding to the grid can be the points where the bird's-eye view projection is located on the grid. Then, the value of the grid can be determined according to the number of points in the grid, for example, the value of an empty grid with no points is 0, and the value of a non-empty grid is 1. Finally, the current frame grid map is obtained according to the values of each grid.
[0051] In some embodiments, the point cloud data may be pre-processed before rasterization. As an example, a foggy noise filtering range may be set, and then laser points within the specified range may be pre-screened based on conditions such as height, reflectivity, and whether it is a vehicle body point, and points that meet the conditions may be retained as candidate points.
[0052] The inventors analyzed the actual fog point cloud data and found the following characteristics:
[0053] 1) The projection of the fog point on the xy plane in the laser radar coordinate system is close to an incomplete ring centered on the position of the laser radar sensor to which it belongs, such as Figure 2a and Figure 2b shown.
[0054] 2) The fog point cloud remains roughly stationary relative to the lidar.
[0055] 3) The fog point cloud is vertically distributed within a certain height range, and the mean, median and standard deviation are more stable than conventional obstacle statistics.
[0056] 4) Since the laser beam emitted by the lidar will be scattered by water droplets in the fog, resulting in a decrease in reflection intensity, the reflection intensity of the fog point is low.
[0057] Based on the above analysis, during preprocessing, the range of noise point filtering, height threshold, reflection intensity threshold, and whether it is a body point can be set based on the data statistics of the fog point cloud to pre-screen the fog point cloud, and only the laser points within the noise point filtering range, with a height greater than a certain threshold, a reflection intensity lower than a certain threshold, and outside the range of the vehicle body are retained as candidate points. Specifically, taking the Velodyne 16-line laser radar as an example, the filtering range can be selected in the x∈[-3m,3m] and y∈[3m,3m] area with the laser radar position as the coordinate origin, the height threshold can be 0.2m, and the reflection intensity threshold can be 5.
[0058] In S130, an arc with the center of the laser radar as the center and a radius less than the distance threshold is detected in the current frame raster image to obtain a target arc group. The radius of the arcs in the target arc group is the same, and the total arc length of the target arc group is the longest among any arc groups detected with a radius less than the distance threshold.
[0059] It is understandable that multiple arc groups can be detected in S130, each arc group includes multiple arcs with the center of the laser radar as the center and the same radius, that is, the radius of the arcs in different arc groups is different. When determining the above-mentioned target arc group, the arc groups with a radius less than the distance threshold can be filtered out from the above-mentioned multiple arc groups, and then the total arc length of each arc group in the remaining arc groups is calculated, and the arc group with the longest total arc length is determined as the target arc group.
[0060] Figure 3 A target arc group in a current frame grid image is shown, wherein the target arc group includes three arcs, namely arc 301, arc 302 and arc 303, and the radius of the three arcs is r1. It should be noted that the actual current frame grid image should also include multiple arcs with different radii. Figure 3 Not shown.
[0061] In S140, whether the current scene is foggy is determined based on the integrity of the circle formed by the arcs in the target arc group. If the integrity meets a preset condition, it is determined that the current scene is foggy.
[0062] It should be noted that the integrity of the circle can be determined based on the total arc length of the arcs in the target arc group, and / or the sum of the arc angles in the target arc group. As an example, the greater the ratio of the total arc length to the circumference of the circle, the more complete the circle. As another example, the greater the sum of the arc angles, the more complete the circle.
[0063] It can be understood that the radius of the circle in S140 is the radius of the arc in the target arc group.
[0064] It should also be noted that the noise points of autonomous driving vehicles equipped with mechanical laser radars in foggy scenes are mostly distributed in a ring shape. The above embodiment identifies foggy scenes based on the integrity of the circle formed by the arcs in the target arc group. This is a summary made by the inventor after observing a large number of point cloud raster images. Compared with the prior art solutions introduced above, this solution has faster recognition efficiency and higher recognition accuracy for foggy scenes, and can perform real-time recognition in autonomous driving vehicles.
[0065] In addition, it can be understood that when the vehicle is in motion, the point cloud data used for identifying foggy weather may be point cloud data that has been processed by motion compensation.
[0066] In some embodiments, the foggy weather recognition method may further include: repeatedly executing the foggy weather recognition method, and determining whether the current scene is a foggy weather scene based on the recognition results of multiple frames.
[0067] In the disclosed embodiment, determining whether the current scene is foggy based on the recognition results of multiple frames can further improve the recognition accuracy and effectively reduce the probability of misrecognition.
[0068] In some embodiments, the above method can be applied to a vehicle model with a multi-rotating laser radar hybrid. By processing each laser radar point cloud separately, it can be determined whether the current scene is foggy.
[0069] In some embodiments, judging whether the current scene is foggy based on the integrity of the circle formed by the arcs in the target arc group may include: judging whether the total arc length of the arcs in the target arc group is greater than an arc length threshold; judging whether the maximum arc angle of the arcs in the target arc group is greater than an angle threshold; if the total arc length of the arcs in the target arc group is greater than the arc length threshold, and the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, then it is determined that the current scene is foggy. As an example, the target arc group is as follows: Figure 3As shown, the total arc length of the arcs in the target arc group is the total arc length of the three arcs, that is, the sum of the arc lengths of arc 301, arc 302, and arc 303. The maximum arc angle of the arcs in the target arc group is the maximum value of the arc angles of arc 301, arc 302, and arc 303.
[0070] In some embodiments, the foggy weather recognition method may further include: calculating the circumference of the circle corresponding to the radius of the arc in the target arc group; calculating the ratio of the total arc length to the circumference of the arc in the target arc group. If the total arc length of the arc in the target arc group is greater than the arc length threshold, and the maximum arc angle of the arc in the target arc group is greater than the angle threshold, then it is determined that the scene is currently in foggy weather, including: if the total arc length of the arc in the target arc group is greater than the arc length threshold, the maximum arc angle of the arc in the target arc group is greater than the angle threshold, and the above ratio is greater than the ratio threshold, then it is determined that the scene is in foggy weather.
[0071] It can be understood that the closer the ratio of the total arc length to the circumference is to 1, the more complete the circle is, and thus the greater the possibility of foggy weather.
[0072] In the disclosed embodiment, the ratio of the total arc length to the circumference of the arcs in the target arc group is greater than the ratio threshold, which can better ensure that the circle formed by the arcs in the target arc group is more complete, and it can also be more determined that the characteristics of the current point cloud grid map are consistent with the characteristics of the point cloud grid map in the foggy scene, thereby ensuring the accuracy of the detection results.
[0073] In some embodiments, the above S120 performs rasterization processing on the point cloud data to obtain a current frame raster map, wherein the current frame raster map is a two-dimensional point cloud raster map. After obtaining the two-dimensional point cloud raster map, preprocessing can also be performed to remove holes in the raster map. The specific steps are as follows:
[0074] First, based on the preset grid size, the laser points within the filter range are rasterized in two dimensions, and all original candidate points in each grid are recorded. Among them, the grid with points is non-empty, which is recorded as 1, and the empty grid without points is recorded as 0. The original two-dimensional grid map constructed (the current frame grid map in the previous article) is as follows Figure 4 shown.
[0075] Then, the morphological closing operation and morphological gradient operation are performed on the two-dimensional grid map to obtain the contour of the foreground object, and the median filter is used to smooth the edge to obtain the contour grid map, such as Figure 5 shown.
[0076] After that, the outline grid map and the original grid map (the current frame grid map in the previous text) are merged by logical OR operation, and a morphological closing operation is performed on the merged grid map to fill the holes to ensure the connectivity of the grid map. The size of each grid can be set to 0.1m long and 0.1m wide.
[0077] In some embodiments, the above S130 detects an arc with the center of the laser radar as the center in the current frame grid image to obtain a target arc group, which may include: based on the distance between the non-empty grids in the current frame grid image and the center point of the laser radar, dividing multiple non-empty grids into multiple original grid groups, wherein the non-empty grids in each original grid group are at the same distance from the center point of the laser radar; among the multiple original grid groups, determining a target grid group containing the largest number of non-empty grids, the distance between the non-empty grids in the target grid group and the center point of the radar is less than a distance threshold, and the arcs in the target arc group are determined based on continuous non-empty grids in the target grid group.
[0078] In some embodiments, determining whether the total arc length of the arcs in the target arc group is greater than an arc length threshold may include: when the total number of non-empty grids in the target grid group is greater than a quantity threshold, determining that the total arc length of the arcs in the target arc group is greater than the arc length threshold.
[0079] In a specific example, the above S130 can realize efficient detection of arcs by optimizing the circle detection algorithm in opencv. The specific process is as follows:
[0080] Construct a non-empty grid distance distribution histogram and determine the largest grid group. Calculate the distance from the center point of the non-empty grid to the center of the circle (i.e., the center point of the radar) in the point cloud grid map (the current frame grid map in the previous article) (if the grid distance is a decimal, it needs to be rounded), and record all grids at the same distance as a grid group. Draw a distance distribution histogram based on the non-empty grid distance statistics. The horizontal axis of the histogram is the grid distance, and the vertical axis is the number of non-empty grids in the grid group corresponding to the grid distance. The grid group with the largest vertical axis in the distance distribution histogram is the largest grid group, which contains all non-empty grids at this grid distance. Among them, the arc in the target arc group in the previous article is composed of non-empty grids in the largest grid group.
[0081] Calculate the sector density of the maximum grid group. Preset the angular resolution, divide the angular resolution into several sectors with equal central angles (number of sectors = 360° / angular resolution), and assign all non-empty grids in the maximum grid group to the corresponding sectors according to their positions. The sectors that are not assigned to any non-empty grid are empty sectors, otherwise they are non-empty sectors. The non-empty sector density is the number of non-empty sectors divided by the total number of sectors, which is equivalent to the ratio of the total arc length to the circumference of the arc in the target arc group mentioned above. Among them, the angular resolution can be 1°.
[0082] The maximum arc angle is calculated based on the maximum grid group, as follows: merge continuous and non-empty sectors as a merged sector, and take the center angle corresponding to the merged sector with the largest center angle among the merged sectors as the maximum arc angle corresponding to the maximum grid group, that is, the maximum arc angle of the arc in the target arc group mentioned above. Figure 6 This is the maximum arc found.
[0083] Based on the above maximum arc search results, foggy scene judgment is performed. The grid group size threshold, grid group distance threshold, merged sector angle threshold, and non-empty sector density threshold are preset. If the number of non-empty grids in the maximum grid group is greater than the grid group size threshold (that is, the total arc length of the arcs in the target arc group in the previous text is greater than the arc length threshold), the maximum grid group distance is less than the distance threshold (that is, the radius of the arcs in the target arc group in the previous text is less than the distance threshold), the maximum arc angle of the maximum grid group is greater than the merged sector angle threshold (that is, the maximum arc angle of the arcs in the target arc group in the previous text is greater than the angle threshold), and the sector density of the maximum grid group is greater than the non-empty sector density threshold (that is, the ratio of the total arc length to the circumference of the arcs in the target arc group in the previous text is greater than the ratio threshold), then it is a foggy scene, otherwise it is not a foggy scene. The grid group size threshold may range from 12 to 18, and as an example, may be 15; the grid group distance threshold may range from 14 to 18, and as an example, may be 16; the merged sector angle threshold may range from 150°, and the non-empty sector density threshold may range from 0.3 to 0.4, and as an example, the non-empty sector density threshold (i.e., the ratio threshold mentioned above) may be 0.35. In some embodiments, the above angle threshold may range from 140° to 160°.
[0084] In some embodiments, Figure 7 As shown, after detecting an arc with the center of the laser radar as the center and a radius less than the distance threshold in the current frame raster image, the above-mentioned fog recognition method can also include steps S701-S703.
[0085] In S701, based on the detected arc, a depth-first search is performed to find the connected domain of the non-empty grid;
[0086] In S702, the fog point density is calculated according to the number of points contained in the connected domain and the number of grids in the connected domain;
[0087] In S703, the fog level is determined according to the fog point density.
[0088] In some embodiments, before determining the fog level, abnormal grids in the current frame grid map can also be removed, wherein, when determining abnormal grids, the density value of the points in each non-empty grid can be calculated; the non-empty grid with a density value greater than the density threshold is determined as an abnormal grid; the above S702 can be after removing abnormal grids in the connected domain, according to the number of points contained in the connected domain and the number of grids in the connected domain, calculate the fog point density. The disclosed embodiment can effectively identify whether the current scene is a foggy scene, and filter the point cloud noise of the mechanical laser radar in the foggy scene.
[0089] In foggy scenes, the embodiment of the present disclosure uses the non-empty grids passed by the largest circular arc as the basis to perform a depth-first search to find the connected domains of the non-empty grids. During the connected domain search, considering the situation where conventional obstacle point clouds are mixed into fog point clouds, it is necessary to exclude non-empty grids with excessively large candidate point density as abnormal grids (grid candidate point density = number of candidate points in the grid / grid area). After completing the connected domain search, all laser points corresponding to all non-empty grids in the connected domain are fog points. Figure 8 That is, the current frame grid map corresponding to the identified fog point cloud. The fog point density is calculated according to the number of fog points and the number of non-empty grids in the connected domain (fog point density = total number of fog points / number of non-empty grids), and the fog level is determined according to the fog point density. Specifically, the candidate point density threshold of the abnormal grid can be set to 100, when the fog point density is not less than 10, it is heavy fog, when the fog point density is less than 10 and not less than 5, it is medium fog, and when the fog point density is less than 5, it is light fog.
[0090] The disclosed embodiment can be applied to mechanical laser radar, which can effectively judge foggy scenes, filter out foggy laser point cloud noise, and determine foggy concentration level.
[0091] Based on the same inventive concept, the embodiment of the present disclosure also provides a foggy weather identification device. Fig. 9 As shown, the foggy weather recognition device includes a point cloud acquisition module 910 , a rasterization module 920 , an arc detection module 930 , and a foggy weather judgment module 940 .
[0092] The point cloud acquisition module 910 is used to acquire the point cloud data of the current frame of the laser radar;
[0093] The rasterization module 920 is used to perform rasterization processing on the point cloud data to obtain a current frame raster image;
[0094] The arc detection module 930 is used to detect an arc with a center of the laser radar as the center and a radius less than the distance threshold in the current frame raster image, and obtain a target arc group, wherein the radius of the arcs in the target arc group is the same, and the total arc length of the target arc group is the longest among any arc groups detected with a radius less than the distance threshold;
[0095] The foggy weather judgment module 940 is used to judge whether the current scene is foggy weather according to the integrity of the circle formed by the arcs in the target arc group.
[0096] In some embodiments, the fog judgment module 940 is used to determine whether the total arc length of the arcs in the target arc group is greater than the arc length threshold; determine whether the maximum arc angle of the arcs in the target arc group is greater than the angle threshold; if the total arc length of the arcs in the target arc group is greater than the arc length threshold, and the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, it is determined that the current scene is foggy.
[0097] In some embodiments, the foggy weather identification device may further include a circumference calculation module and a ratio judgment module.
[0098] A circumference calculation module, used to calculate the circumference of a circle corresponding to the radius of the arc in the target arc group;
[0099] A ratio judgment module, used for calculating the ratio of the total arc length to the circumference of the arcs in the target arc group;
[0100] The fog judgment module 940 is used to determine that the scene is foggy if the total arc length of the arcs in the target arc group is greater than the arc length threshold, the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, and the ratio is greater than the ratio threshold.
[0101] In some embodiments, the arc detection module 930 is used to divide multiple non-empty grids into multiple original grid groups based on the distance between the non-empty grids and the center point of the laser radar in the current frame grid image, wherein the non-empty grids in each original grid group are at the same distance from the center point of the laser radar; among the multiple original grid groups, determine the target grid group containing the largest number of non-empty grids, the distance between the non-empty grids in the target grid group and the center point of the radar is less than a distance threshold, and the arcs in the target arc group are determined based on the continuous non-empty grids in the target grid group.
[0102] In some embodiments, determining whether the total arc length of the arcs in the target arc group is greater than an arc length threshold includes: when the total number of non-empty grids in the target grid group is greater than a quantity threshold, determining that the total arc length of the arcs in the target arc group is greater than the arc length threshold.
[0103] In some embodiments, the fog recognition device may further include a level determination module. The level determination module is used to detect an arc with a center of the laser radar as the center and a radius less than a distance threshold in the current frame grid map, and then perform a depth-first search based on the detected arc to find a connected domain of non-empty grids; calculate the fog point density according to the number of points contained in the connected domain and the number of grids in the connected domain; and determine the fog level according to the fog point density.
[0104] In some embodiments, the level determination module is used to calculate the density value of the points in each non-empty grid; determine the non-empty grid whose density value is greater than the density threshold as an abnormal grid; after eliminating the abnormal grid in the connected domain, calculate the fog point density according to the number of points contained in the connected domain and the number of grids in the connected domain; determine the fog level according to the fog point density.
[0105] Regarding the foggy weather recognition device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the foggy weather recognition method, and will not be elaborated on again here.
[0106] Fig.10 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0107] like Fig.10 As shown, the electronic device 1000 may include a processing device 1001, a ROM 1002, a RAM 1003, a bus 1004, an input / output (I / O) interface 1005, an input device 1006, an output device 1007, a storage device 1008, and a communication device 1009. The processing device (e.g., a central processing unit, a graphics processor, etc.) 1001 can perform various appropriate actions and processes to implement the method of the embodiment described in the present disclosure according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1008 to the random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other through the bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the positioning method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0110] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device performs the following steps: obtaining an image to be detected; extracting features from the image to be detected to obtain a feature map; rasterizing the feature map to obtain features of each grid in a plurality of grids; sequentially identifying the features of each grid to obtain the recognition result of each grid, the recognition result including the offset and flow vector of the sampling point in the grid; the sampling point is the intersection of the edge of the grid in the first direction and the lane line; the offset is the distance from the sampling point to the preset vertex of the current grid in the first direction; the flow vector is the direction vector from the current sampling point to the next sampling point; according to the position of each grid in the feature map, the offset and flow vector of each sampling point, multiple sampling point sets are obtained; and according to the sampling points in the sampling point set, the lane line is constructed.
[0111] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0112] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0113] The present disclosure also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the foggy weather identification method described in the above method embodiment is implemented.
[0114] The computer-readable storage medium in the embodiments of the present disclosure is a computer instruction that can be sent, propagated or transmitted for use by or in conjunction with an instruction execution system, apparatus or device.
[0115] As one example, computer readable storage media are non-volatile storage media.
[0116] In some embodiments, more specific examples of computer-readable storage media in the present disclosure may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, a USB flash drive, a mobile hard disk, or any suitable combination of the foregoing.
[0117] In the embodiments of the present disclosure, the computer-readable storage medium may include a data signal propagated in a baseband or as a part of a carrier wave, in which computer instructions (readable program codes) are carried.
[0118] Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
[0119] In some examples, computing instructions contained on a computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0120] The embodiments of the present disclosure further provide a computer program product, which stores instructions. When the instructions are executed by a computer, the computer implements the foggy weather identification method described in the above method embodiment.
[0121] The above instructions may be program codes. In specific implementation, the program codes may be written in any combination of one or more programming languages.
[0122] The programming language includes object-oriented programming languages, such as Java, C++, etc., and also includes conventional procedural programming languages, such as "C" language or similar programming languages.
[0123] The program code may execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.
[0124] Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0125] The embodiment of the present disclosure also provides a chip, including at least one processor and an interface;
[0126] An interface for providing program instructions or data to at least one processor;
[0127] At least one processor is used to execute program instructions to implement the foggy weather identification method described in the above method embodiment.
[0128] In some embodiments, the chip may further include a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0129] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
Claims
1. A foggy weather recognition method, It is characterized in that The method comprises: Get the point cloud data of the current frame of the laser radar; Performing rasterization processing on the point cloud data to obtain a current frame raster image; Detecting an arc with the center of the laser radar as the center and a radius less than the distance threshold in the current frame grid image, and obtaining a target arc group, wherein the radius of the arcs in the target arc group is the same, and the total arc length of the target arc group is the longest among any arc groups detected with a radius less than the distance threshold; Whether the current scene is foggy is determined based on the completeness of the circle formed by the arcs in the target arc group.
2. The method according to claim 1, It is characterized in that The step of judging whether the current scene is foggy based on the integrity of the circle formed by the arcs in the target arc group includes: Determine whether the total arc length of the arcs in the target arc group is greater than an arc length threshold; Determine whether the maximum arc angle of the arcs in the target arc group is greater than an angle threshold; If the total arc length of the arcs in the target arc group is greater than the arc length threshold, and the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, it is determined that the current scene is foggy.
3. The method according to claim 2, It is characterized in that The method further comprises: Calculate the circumference of the circle corresponding to the radius of the arc in the target arc group; Calculating the ratio of the total arc length of the arcs in the target arc group to the circumference; If the total arc length of the arcs in the target arc group is greater than the arc length threshold, and the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, determining that the current scene is in foggy weather includes: If the total arc length of the arcs in the target arc group is greater than the arc length threshold, the maximum arc angle of the arcs in the target arc group is greater than the angle threshold, and the ratio is greater than the ratio threshold, it is determined that the scene is in foggy weather.
4. The method according to any one of claims 1 to 3, It is characterized in that The detecting of an arc with the center of the laser radar as the center in the current frame grid image to obtain a target arc group includes: Based on the distance between the non-empty grids in the current frame grid image and the center point of the laser radar, the plurality of non-empty grids are divided into a plurality of original grid groups, wherein the distance between the non-empty grids in each original grid group and the center point of the laser radar is the same; Among the multiple original grid groups, a target grid group containing the largest number of the non-empty grids is determined, the distance between the non-empty grids in the target grid group and the center point of the radar is less than the distance threshold, and the arcs in the target arc group are determined based on continuous non-empty grids in the target grid group.
5. The method according to claim 4, It is characterized in that The determining whether the total arc length of the arcs in the target arc group is greater than an arc length threshold comprises: When the total number of non-empty grids in the target grid group is greater than the quantity threshold, it is determined that the total arc length of the arcs in the target arc group is greater than the arc length threshold.
6. The method according to claim 1, It is characterized in that After detecting in the current frame grid map an arc with the center of the laser radar as the center and a radius less than the distance threshold, the method further includes: Based on the detected arcs, a depth-first search is performed to find the connected domain of the non-empty grid; Calculating fog point density according to the number of points contained in the connected domain and the number of grids in the connected domain; The fog level is determined according to the fog point density.
7. The method according to claim 6, It is characterized in that The method further comprises: Calculate the density value of each non-empty grid point; Determine the non-empty grid whose density value is greater than the density threshold as an abnormal grid; The step of calculating the fog point density according to the number of points included in the connected domain and the number of grids in the connected domain comprises: After the abnormal grids are removed from the connected domain, the fog point density is calculated according to the number of points contained in the connected domain and the number of grids in the connected domain.
8. A foggy weather identification device, It is characterized in that The device comprises: Point cloud acquisition module, used to obtain the point cloud data of the current frame of the laser radar; A rasterization module, used for performing rasterization processing on the point cloud data to obtain a current frame raster image; An arc detection module is used to detect an arc with a center of the laser radar as the center and a radius less than a distance threshold in the current frame raster image, and obtain a target arc group, wherein the radius of the arcs in the target arc group is the same, and the total arc length of the target arc group is the longest among any arc groups with a radius less than the distance threshold detected; The foggy weather judgment module is used to judge whether the current scene is foggy weather according to the integrity of the circle formed by the arcs in the target arc group.
9. An electronic device, It is characterized in that The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the fog recognition method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the foggy weather recognition method as described in any one of claims 1 to 7 is implemented.
