Road guardrail detection method and device

Through the depth-first search and preset sliding window method, the gridded point cloud data is subjected to sliding search and pruning, which solves the problem of insufficient road guardrail detection accuracy in the existing technology and realizes accurate guardrail detection under complex road conditions.

CN115327539BActive Publication Date: 2025-09-26JILUO TECH (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210855336.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-19
Publication Date
2025-09-26
Estimated Expiration
2042-07-19

AI Technical Summary

Technical Problem

In the existing technology of road guardrail detection, the point cloud is affected by roadside signs or billboards, resulting in poor detection accuracy and inability to adapt to changes in road guardrails under various road conditions.

Method used

A method based on depth-first search and preset sliding window is used to perform sliding search on the gridded point cloud data. The target score and pruning mechanism are used to find the longest sliding path, which is then fitted to obtain the guardrail detection result.

Benefits of technology

The accuracy of road guardrail detection is improved, and it can adapt to the changes of road guardrails under various road conditions, reduce the point cloud bifurcation phenomenon caused by scatterers, and avoid fitting failure or erroneous results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115327539B_ABST
    Figure CN115327539B_ABST
Patent Text Reader

Abstract

The present invention provides a road guardrail detection method and device, comprising: acquiring point cloud data; gridding the point cloud data to obtain gridded point cloud data; performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path; and fitting the points corresponding to the longest sliding path to obtain a guardrail detection result. The present invention determines a search path through a depth-first search and searches along the search path based on a preset sliding window to obtain the optimal path. This avoids bifurcations of the point cloud relative to the road due to scatterers at the road edge, thereby preventing search errors that could lead to fitting failures or erroneous results, and improving fitting accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a road guardrail detection method and device. Background Art

[0002] With the advancement of radar and chip technologies, millimeter-wave radars are becoming increasingly smaller, enabling them to perform effectively in complex, multi-target environments and provide better warnings to drivers. This has led to a growing interest in millimeter-wave radars. Millimeter-wave radar detection incorporates a velocity dimension, enabling it to distinguish between moving and stationary targets, with particularly good detection capabilities for metal objects. In highway scenarios, metal guardrails on both sides of the road create a relatively dense static point cloud. The guardrails serve as road boundaries, and millimeter-wave radar's precise boundary recognition can be used to estimate the drivable area. It can also effectively filter out noise and false detections from the guardrails and the road outside.

[0003] At present, two methods are mostly used to detect guardrails on both sides of the road. One is to segment the stationary points on the left and right sides of the vehicle, fit all the stationary points on the left and right sides respectively, and then perform curve fitting to obtain the results; the other is to segment the rectangular areas at certain intervals in the direction of the vehicle's travel, select the points falling into the rectangular area with the most stationary point clouds as guardrail points, perform curve fitting, and then perform curve fitting to obtain the results.

[0004] However, the above-mentioned method of using stationary points on both sides of the vehicle for segmentation and fitting all points on both sides does not take into account the distribution of the point cloud. For example, strong scattering points affected by billboards, mountains, etc., result in bifurcations of the point cloud relative to the road guardrail, which in turn causes large errors in the detection results. The method of segmenting rectangular areas at certain intervals based on the direction of travel of the vehicle requires selecting points that fall within the rectangular area with the most stationary point clouds as guardrail points, which is not suitable for curved scenarios. Summary of the Invention

[0005] The present invention provides a road guardrail detection method and device to overcome the defect in the prior art that the point cloud is affected by roadside signs or billboards, resulting in poor detection accuracy, so as to facilitate fitting of accurate road guardrail curves. At the same time, it can better adapt to the changes in road guardrails under various road conditions.

[0006] The present invention provides a road guardrail detection method, comprising: acquiring point cloud data; gridding the point cloud data to obtain gridded point cloud data; performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain a longest sliding path; and fitting points corresponding to the longest sliding path to obtain a guardrail detection result.

[0007] According to a road guardrail detection method provided by the present invention, the gridded point cloud data is subjected to a sliding search based on a depth-first search and a preset sliding window to obtain the longest sliding path, including: Sa, obtaining a target point and a target score of each target point based on the gridded point cloud data and a preset weight; Sb, determining a specific target point based on the target score of each target point and performing a sliding search toward the specific target point; Sc, judging whether to prune the directions of the remaining target points based on the target score of each target point, and performing pruning based on the judgment result; Sd, counting interruptions using an interrupt counter based on the target score of each target point, and completing the search based on the count value exceeding a first preset threshold to obtain the current maximum sliding path; Se, backtracking to an unpruned target point and re-executing steps Sa, Sb, Sc, and Sd to obtain the next search path; and Sf, using the next search path to update the current maximum sliding path to obtain the longest sliding path.

[0008] According to a road guardrail detection method provided by the present invention, the target points and target scores of each target point are obtained based on gridded point cloud data and preset weights, including: based on the current position of the vehicle relative to the gridded point cloud data, selecting the grid with the largest number of point clouds in the gridded point cloud data within a preset range on both sides of the vehicle as the starting point of a preset sliding window; obtaining the target points based on the preset sliding window and the starting point, and obtaining the target scores of each target point based on the preset weights.

[0009] According to a road guardrail detection method provided by the present invention, obtaining a target point based on the preset sliding window and the starting point includes: placing the starting point at a predetermined position of the preset sliding window to obtain a target point; wherein the target point is a grid in the gridded point cloud data located in the preset sliding window, and the grid is located on one side of the predetermined position along the sliding direction.

[0010] According to a road guardrail detection method provided by the present invention, obtaining the target score of each target point includes: determining the weighted sum of the number of point clouds of the target point and the number of point clouds in the grids on the left and right sides of the target point; determining the target score of the target point based on the preset weight corresponding to the target point and the weighted sum, wherein the preset weight corresponding to the target point close to the vehicle is greater than the preset weight corresponding to the target point far from the vehicle.

[0011] According to a road guardrail detection method provided by the present invention, determining a specific target point based on the target score of each target point includes: if there are target scores greater than a second preset threshold and the same, selecting a target point close to the side of the vehicle as the specific target point; if the target scores of each target point are all within the second preset threshold, selecting a target point located in the same row of the preset sliding window as the predetermined position as the specific target point.

[0012] According to a road guardrail detection method provided by the present invention, the method determines whether to prune the directions of the remaining target points based on the target scores of the target points, and performs pruning based on the determination result, including: when a target score of the target points is greater than a third preset threshold, pruning the target path formed by the remaining target points with target scores greater than the third preset threshold and the current position of the sliding window; when the ratio of the target score to the sum of the target scores of the target points is less than a fourth preset threshold, pruning the target path formed by the corresponding target point and the current position of the sliding window; and when the target scores of the target points are all greater than the third preset threshold, not pruning.

[0013] According to a road guardrail detection method provided by the present invention, interrupt counting is performed using an interrupt counter based on the target score of each target point, including: if the target score of each target point is a fifth preset threshold, the count value of the interrupt counter is increased by 1; otherwise, the count value of the interrupt counter is reset to zero.

[0014] According to a road guardrail detection method provided by the present invention, the updating of the current maximum sliding path using the next search path includes: comparing the path length of the next search path with the path length of the current maximum sliding path; if the path length of the next search path is greater than the path length of the current maximum sliding path, updating the current maximum sliding path using the next search path; and if the path length of the next search path is equal to the path length of the current maximum sliding path, based on the number of point clouds of the next search path being greater than the number of point clouds of the current maximum sliding path, updating the current maximum sliding path using the next search path.

[0015] According to a road guardrail detection method provided by the present invention, the point cloud data is screened based on preset point attributes, including: eliminating non-stationary points in the point cloud data; eliminating points in the point cloud data whose radar scattering cross-section is less than a sixth preset threshold; eliminating points in the point cloud data whose signal-to-noise ratio is less than a seventh preset threshold; and eliminating points in the point cloud data that are outside the field of view of each sensor.

[0016] The present invention also provides a road guardrail detection device, comprising: a data acquisition module for acquiring point cloud data; a data processing module for gridding the point cloud data to obtain gridded point cloud data; a path search module for performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path; and a detection module for fitting points corresponding to the longest sliding path to obtain a guardrail detection result.

[0017] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described road guardrail detection methods are implemented.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described road guardrail detection methods.

[0019] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned road guardrail detection methods.

[0020] The road guardrail detection method and device provided by the present invention select the point cloud for subsequent fitting through a preset sliding window, so as to better adapt to the changes of road guardrails under various road conditions, thereby facilitating more accurate acquisition of the point cloud constituting the guardrail, so as to facilitate fitting of accurate road guardrail curves or straight lines. At the same time, it can better cope with sparse points and occlusion interruptions on the guardrail; based on depth-first search, after searching for one path, it will backtrack and re-search other paths, so as to facilitate obtaining the optimal path, so as to avoid the situation where the point cloud is bifurcated relative to the road due to scatterers at the edge of the road, thereby avoiding search errors that cause fitting failure or erroneous results, and improving the fitting accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to 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 any creative work.

[0022] Figure 1 1 is a flow chart of a road guardrail detection method provided by the present invention;

[0023] Figure 2 is a schematic diagram of a gridded point cloud provided by the present invention;

[0024] Figure 3 is a schematic diagram of a preset sliding window provided by the present invention;

[0025] Figure 4 It is a structural schematic diagram of the road guardrail detection device provided by the present invention;

[0026] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0027] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0028] Figure 1 A schematic flow chart of a road guardrail detection method of the present invention is shown, and the method includes:

[0029] S11, obtaining point cloud data;

[0030] S12, performing gridding processing on the point cloud data to obtain gridded point cloud data;

[0031] S13, based on depth-first search and preset sliding window, performing sliding search on the gridded point cloud data to obtain the longest sliding path;

[0032] S14, fitting the points corresponding to the longest sliding path to obtain the guardrail detection result.

[0033] It should be noted that S1N in this manual does not represent the order of road guardrail detection methods. Figure 2 The road guardrail detection method of the present invention is described.

[0034] Step S11, obtaining point cloud data.

[0035] In this embodiment, acquiring point cloud data includes acquiring point cloud data within a preset time period based on millimeter-wave radar. It should be noted that the preset time period can be determined based on the actual road section, design requirements, and actual road conditions, and is not further limited here. For example, the preset time period can be [tk, t], where t represents the current time. For most straight roads, k can be set to 1000 milliseconds.

[0036] In an optional embodiment, acquiring point cloud data further includes: filtering the point cloud data based on preset point attributes. Specifically, the method includes: traversing the point cloud data to remove non-stationary points in the point cloud data; removing points in the point cloud data whose radar cross section (RCS) is less than a sixth preset threshold; removing points in the point cloud data whose signal-to-noise ratio (SNR) is less than a seventh preset threshold; and removing points in the point cloud data that are outside the field of view (FOV) of each sensor.

[0037] It should be noted that by filtering the point cloud data, irregularly distributed point clouds are removed, such as strongly scattered points affected by scatterers such as billboards, road signs, and mountains, or points that have been reflected multiple times, thereby avoiding subsequent path selection errors and resulting fitting errors. In addition, the sixth and seventh preset thresholds can be set based on prior experience.

[0038] Step S12: gridding the point cloud data to obtain gridded point cloud data.

[0039] In this embodiment, reference Figure 2 , gridding the point cloud data, including: based on the current position of the vehicle as the coordinate origin, setting the vehicle's driving direction as the first coordinate axis, setting the direction perpendicular to the vehicle's driving direction and parallel to the road surface as the second coordinate axis, constructing a vehicle coordinate system (VCS) based on the coordinate origin, the first coordinate axis and the second coordinate axis, and placing all the filtered point cloud data into the vehicle coordinate system; selecting a first preset range along the first coordinate axis as the length, and selecting a second preset range along the second coordinate axis as the width, and dividing them according to the length and width to obtain a uniform grid; calculating the number of point clouds falling into each grid to obtain gridded point cloud data.

[0040] It should be noted that gridded point cloud data can be represented as a three-dimensional grid graph, with the attributes of each dimension being the grid position along the first coordinate axis, the grid position along the second coordinate axis, and the number of point clouds in the grid. Furthermore, the first preset range, the second preset range, and the grid division can be set based on actual design requirements and are not further defined here. For example, the first preset range can be set to [-100m, 200m], the second preset range can be set to [-50m, 50m], and the length of the divided grid can be set to 2m and the width can be set to 1m.

[0041] Step S13: Based on the depth-first search and the preset sliding window, a sliding search is performed on the gridded point cloud data to obtain the longest sliding path.

[0042] In this embodiment, based on the depth-first search and the preset sliding window, the gridded point cloud data is subjected to a sliding search to obtain the longest sliding path, including: Sa, based on the gridded point cloud data and the preset weight, obtaining the target point and the target score of each target point; Sb, according to the target score of each target point, determining a specific target point and performing a sliding search toward the specific target point; Sc, according to the target score of each target point, judging whether to prune the direction of the remaining target points, and performing pruning based on the judgment result; Sd, based on the target score of each target point, using an interrupt counter to count interrupts, and completing the search based on the count value exceeding the first preset threshold to obtain the current maximum sliding path; Se, backtracking to the target point that has not been pruned, and re-executing steps Sa, Sb, Sc, and Sd to obtain the next search path; Sf, using the next search path to update the current maximum sliding path to obtain the longest sliding path. Specifically:

[0043] First, in step Sa, the target points and the target scores of each target point are obtained based on the gridded point cloud data and preset weights.

[0044] In this embodiment, based on the gridded point cloud data and preset weights, the target points and the target scores of the target points are obtained, including: according to the current position of the vehicle relative to the gridded point cloud data, selecting the grid with the largest number of point clouds in the gridded point cloud data within a preset range on both sides of the vehicle as the starting point of the preset sliding window; based on the preset sliding window and the starting point, the target points are obtained, and based on the preset weights, the target scores of the target points are obtained.

[0045] Furthermore, obtaining a target point based on the preset sliding window and the starting point includes: placing the starting point at a predetermined position in the preset sliding window to obtain the target point; wherein the target point is a grid within the gridded point cloud data within the preset sliding window, and the grid is located to one side of the predetermined position along the sliding direction. It should be noted that the predetermined position can be set based on actual setting requirements and the preset sliding window, for example, it can be set to the middle row of the first column of the preset sliding window.

[0046] For example, assuming the sliding window is set to 3×3, the target point is obtained based on the preset sliding window and the starting point, including: placing the starting and ending points in the first column and second row of the preset sliding window, obtaining the grid located in the second column of the preset sliding window in the gridded point cloud data as the target point; wherein the target point includes the first target point located in the first row of the second column of the preset sliding window, the second target point located in the second row of the second column of the preset sliding window, and the third target point located in the third row of the second column of the preset sliding window. Figure 2 , according to the above method, the grid with shadow in the figure is obtained as the starting point.

[0047] In a possible implementation, the preset range may be set based on the actual length of the vehicle and the position relative to the point cloud, which is not further limited here. For example, the preset range may be (-20m, 20m).

[0048] In addition, the target score of each target point is obtained, including: determining the weighted sum of the number of point clouds of the target point and the number of point clouds in the grids on the left and right sides of the target point; determining the target score of the target point based on the preset weight corresponding to the target point and the weighted sum, wherein the preset weight corresponding to the target point close to the vehicle is greater than the preset weight corresponding to the target point far from the vehicle. In this embodiment, the target score = the preset weight of the target point itself and the number of points on its left and right sides * the preset weight of the row number where the target point is located. Set the area close to the outside of the road to attenuation, such as 0.9, and set the area close to the inside of the road to gain, such as 1.1, and the preset weight of the row number where the second target point is located is set to 1. For example, refer to Figure 3 , assuming Figure 3 The right direction is positive, select Figure 3 For the guardrail located on the upper side, the corresponding first target is close to the outer side of the road; the corresponding third target is close to the inner side of the road.

[0049] In an optional embodiment, the preset weight of the target point corresponding to the first column of the sliding window and the points on its left and right sides can be set to 0.1, the preset weight of the target point corresponding to the second column of the sliding window and the points on its left and right sides can be set to 0.7, and the preset weight of the target point corresponding to the third column of the sliding window and the points on its left and right sides can be set to 0.2. The specific weight settings can be determined according to actual design requirements.

[0050] Secondly, in step Sb, a specific target point is determined based on the target score of each target point and a sliding search is performed towards the specific target point.

[0051] In this embodiment, the specific target point is determined based on the target score of each target point. This includes: if there are target points with the same target score greater than a second preset threshold, the target point closest to the vehicle is selected as the specific target point; if the target scores of all target points are equal to the second preset threshold, the target point located in the same row of the preset sliding window as the predetermined position is selected as the specific target point. It should be noted that the second preset threshold can be 0 or set based on actual design requirements and is not further defined here.

[0052] Then, in step Sc, it is determined whether to prune the directions of the remaining target points according to the target scores of the target points, and pruning is performed based on the determination result.

[0053] In this embodiment, based on the target score of each target point, it is determined whether to prune the directions of the remaining target points, and pruning is performed based on the determination result, including: when there is a target score greater than a third preset threshold among the target scores of the target points, the target path consisting of the remaining target points with target scores of the third preset threshold and the current position of the sliding window is pruned; when the ratio of the target score to the sum of the target scores of all target points is less than a fourth preset threshold, the target path consisting of the corresponding target point and the current position of the sliding window is pruned; when the target scores of all target points are greater than the third preset threshold, no pruning is performed.

[0054] It should be noted that pruning the target path reduces the computational effort during subsequent backtracking, thereby reducing computing resource consumption. Furthermore, the third preset threshold can be set based on the second preset threshold, for example, the third preset threshold can be equal to the second preset threshold. This can be determined based on actual design circumstances and is not further elaborated upon here.

[0055] In an optional embodiment, when the first target point, the second target point, and the third target point exist, the fourth preset threshold value may be set to 0.2. It should be noted that the setting of the fourth preset threshold value may be determined in combination with the actual number of target points and is not further limited here.

[0056] Secondly, in step Sd, based on the target score of each target point, an interruption counter is used to count interruptions, and when the count value exceeds a first preset threshold, the search is completed to obtain the current maximum sliding path.

[0057] It should be noted that, based on the target score of each target point, interrupt counting is performed using an interrupt counter, including: based on the target score of each target point being the fifth threshold, the count value of the interrupt counter is increased by 1; otherwise, the count value of the interrupt counter is reset to zero.

[0058] In an optional embodiment, when the first, second, and third target points are present, the fifth preset threshold value may be set based on the second preset threshold value, for example, the fifth preset threshold value is equal to the second preset threshold value, which is equal to 0. Furthermore, the first preset threshold value may be set based on the number of target points and actual design requirements. For example, when there are three target points, the first preset threshold value may be set to 3.

[0059] Secondly, in step Se, backtrack to the target point that has not been pruned, and re-execute steps Sa, Sb, Sc, and Sd to obtain the next search path.

[0060] Finally, in step Sf, the current maximum sliding path is updated using the next search path to obtain the longest sliding path.

[0061] In this embodiment, updating the current maximum sliding path using the next search path includes: comparing the path length of the next search path with the path length of the current maximum sliding path; if the path length of the next search path is greater than the path length of the current maximum sliding path, then using the next search path to update the current maximum sliding path; if the path length of the next search path is equal to the path length of the current maximum sliding path, based on the number of point clouds of the next search path being greater than the number of point clouds of the current maximum sliding path, then using the next search path to update the current maximum sliding path; otherwise, retaining the current maximum sliding path. It should be noted that after each backtracking, the current maximum sliding path is updated using the next search path obtained by backtracking until the backtracking ends and the current maximum sliding path is used as the longest path.

[0062] For example, the path length of the current maximum sliding path is L1, the number of point clouds is K1, the path length of the next search path is L2, and the number of point clouds is K2. If L1 < L2, the current maximum sliding path is updated using the next search path, and backtracking is performed again to re-update the current maximum sliding path until the backtracking is completed and the current maximum sliding path is taken as the longest path; if L1 = L2, K1 and K2 are compared. If K1 > K2, the current maximum sliding path is updated using the next search path. Otherwise, if K1 ≤ K2, the current maximum sliding path is retained; if L1 > L2, the current maximum sliding path is retained.

[0063] It should be noted that the longest path obtained through the above steps is the longest path in the positive direction of the first coordinate axis of the guardrail on one side of the road. The same steps are then used to obtain the longest path in the negative direction of the first coordinate axis of the guardrail on that side. Based on the positive and negative longest paths, the longest path along the first coordinate axis of the guardrail on that side is obtained. Finally, subsequent curve fitting is performed based on this longest path. Similarly, the longest path of the guardrail on the other side of the road is obtained by referring to the longest path of that side guardrail, and this explanation is not repeated here.

[0064] Step S14: fitting the points corresponding to the longest sliding path to obtain the guardrail detection result.

[0065] It should be noted that fitting according to the longest path to obtain the guardrail detection result includes: obtaining the corresponding point cloud according to the longest path obtained above; and fitting the obtained point cloud using least squares fitting to obtain the guardrail detection result.

[0066] In summary, the embodiment of the present invention selects the point cloud for subsequent fitting through a preset sliding window to better adapt to the changes in road guardrails under various road conditions, thereby facilitating more accurate acquisition of the point cloud that constitutes the guardrail, so as to facilitate fitting of accurate road guardrail curves or straight lines. At the same time, it can better cope with sparse points on the guardrail and occlusion interruptions; based on depth-first search, after searching for one path, it will backtrack and re-search other paths, so as to facilitate obtaining the optimal path, so as to avoid the situation where the point cloud is bifurcated relative to the road due to the presence of scatterers at the edge of the road, thereby avoiding search errors that cause fitting failure or erroneous results, and improving the fitting accuracy.

[0067] The road guardrail detection device provided by the present invention is described below. The road guardrail detection device described below and the road guardrail detection method described above can be referenced to each other.

[0068] Figure 4 The present invention shows a schematic structural diagram of a road guardrail detection device based on weighted depth-first search millimeter-wave radar, which includes:

[0069] The data acquisition module 41 acquires point cloud data; the data processing module 42 performs gridding processing on the point cloud data to obtain gridded point cloud data;

[0070] The path search module 43 performs a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path;

[0071] The detection module 44 performs fitting on the points corresponding to the longest sliding path to obtain a guardrail detection result.

[0072] In this embodiment, data acquisition module 41 includes a data acquisition unit that acquires point cloud data within a preset time period based on millimeter-wave radar. It should be noted that the preset time period can be determined based on the actual road section, design requirements, and actual road conditions, and is not further defined herein.

[0073] In an optional embodiment, the device further includes: a data screening module that filters the acquired point cloud data according to preset point attributes. Specifically, the data screening module includes: a data elimination subunit that traverses the point cloud data to eliminate non-stationary points in the point cloud data; a first pre-processing subunit that eliminates points in the point cloud data whose radar cross section (RCS) is less than a sixth preset threshold; a second pre-processing subunit that eliminates points in the point cloud data whose signal-to-noise ratio (SNR) is less than a seventh preset threshold; and a third pre-processing subunit that eliminates points in the point cloud data that are outside the field of view (FOV) of each sensor. In the actual design process, the first pre-processing subunit, the second pre-processing subunit, and the third pre-processing subunit can be the same pre-processing subunit.

[0074] The data processing module 42 includes: a coordinate system construction unit, which uses the current position of the vehicle as the coordinate origin, sets the vehicle's driving direction as the first coordinate axis, sets the direction perpendicular to the vehicle's driving direction and parallel to the road surface as the second coordinate axis, constructs a vehicle coordinate system (VCS) based on the coordinate origin, the first coordinate axis, and the second coordinate axis, and puts all the filtered point cloud data into the vehicle coordinate system; a gridding unit, which selects a first preset range along the first coordinate axis as the length, and selects a second preset range along the second coordinate axis as the width, and divides the data according to the length and width to obtain a uniform grid; a point cloud data acquisition unit, which calculates the number of point clouds falling into each grid to obtain gridded point cloud data.

[0075] The path search module 43 includes: a score acquisition unit, which obtains the target point and the target score of each target point based on the gridded point cloud data and preset weights; a path search unit, which determines a specific target point based on the target score of each target point and performs a sliding search towards the specific target point; a pruning unit, which determines whether to prune the direction of the remaining target points based on the target score of each target point, and prunes based on the judgment result; a counting unit, which counts interruptions using an interrupt counter based on the target score of each target point, and completes the search based on the count value exceeding a first preset threshold to obtain the current maximum sliding path; a backtracking search unit, which backtracks to the target point that has not been pruned and reuses the score acquisition unit, the path search unit, the pruning unit and the counting unit to perform corresponding steps to obtain the next search path; and a longest path acquisition unit, which uses the next search path to update the current maximum sliding path to obtain the longest sliding path.

[0076] Specifically, the score acquisition unit includes: a starting point selection subunit, which selects the grid with the largest number of point clouds in the grid point cloud data within a preset range on both sides of the vehicle as the starting point of the preset sliding window based on the current position of the vehicle relative to the gridded point cloud data; a target acquisition subunit, which obtains the target point based on the preset sliding window and the starting point; and a target score acquisition subunit, which obtains the target score of each target point based on the preset weight.

[0077] Specifically, the target acquisition subunit includes a target acquisition grandson unit that places the starting point at a predetermined position within a preset sliding window to obtain a target point. The target point is a grid within the preset sliding window in the gridded point cloud data, and the grid is located to one side of the predetermined position along the sliding direction. It should be noted that the predetermined position can be set based on actual requirements and the preset sliding window. For example, it can be set to the middle row of the first column of the preset sliding window.

[0078] In addition, the target score acquisition subunit includes: a weighted sum determination grandson unit, which determines the weighted sum of the number of point clouds of the target point and the number of point clouds in the grids on the left and right sides of the target point; a target score determination grandson unit, which determines the target score of the target point based on the preset weight corresponding to the target point and the weighted sum, wherein the preset weight corresponding to the target point close to the vehicle is greater than the preset weight corresponding to the target point far away from the vehicle.

[0079] The path search unit includes: a target point selection subunit, which determines a specific target point according to the target score of each target point; and a search subunit, which slides and searches towards the specific target point.

[0080] The target point selection subunit includes: a target selection grandson unit, which selects a target point close to the vehicle as the specific target point if there are target scores greater than a second preset threshold and the same; and selects a target point located in the same row of the preset sliding window as the predetermined position as the specific target point if the target scores of all target points are the second preset threshold.

[0081] The pruning unit includes: when a target score of each target point exceeds a third preset threshold, pruning the target path formed by the remaining target points with target scores equal to the third preset threshold and the current position of the sliding window; when the ratio of the target score to the sum of the target scores of each target point is less than a fourth preset threshold, pruning the target path formed by the corresponding target point and the current position of the sliding window; and when the target scores of all target points exceed the third preset threshold, no pruning is performed. It should be noted that pruning the target path reduces the computational effort during subsequent backtracking, thereby reducing computing resource consumption.

[0082] In addition, the counting unit includes: a counting subunit, which adds 1 to the count value of the interruption counter based on the target score of each target point being the fifth threshold; otherwise, the count value of the interruption counter is reset to zero.

[0083] The longest path acquisition unit includes: a path comparison subunit that compares the path length of the next search path with the path length of the current maximum sliding path; a path update subunit that uses the next search path to update the current maximum sliding path if the path length of the next search path is greater than the path length of the current maximum sliding path; if the path length of the next search path is equal to the path length of the current maximum sliding path, based on the number of point clouds of the next search path being greater than the number of point clouds of the current maximum sliding path, uses the next search path to update the current maximum sliding path; otherwise, retains the current maximum sliding path. It should be noted that after each backtracking, the current maximum sliding path is updated using the next search path obtained by backtracking until the backtracking ends and the current maximum sliding path is used as the longest sliding path.

[0084] It should be noted that the longest path obtained by the above device is the longest path in the positive direction of the first coordinate axis of the guardrail on one side of the road. The above device can also be used to obtain the longest path in the negative direction of the first coordinate axis of the guardrail on that side. Based on the positive and negative longest paths, the longest path of the guardrail along the first coordinate axis is obtained, and the subsequent curve fitting is finally performed based on this longest path. Similarly, the above device can also obtain the longest path of the guardrail on the other side of the road, which will not be repeated here.

[0085] The detection module 44 includes: a point cloud acquisition unit, which obtains the corresponding point cloud according to the longest path obtained above; and a fitting unit, which fits the obtained point cloud using least squares fitting to obtain the guardrail detection result.

[0086] In summary, the embodiment of the present invention uses a preset sliding window based on the path search module to select the point cloud for subsequent fitting, so as to better adapt to the changes in road guardrails under various road conditions, thereby facilitating more accurate acquisition of the point cloud that constitutes the guardrail, so as to facilitate fitting of accurate road guardrail curves or straight lines. At the same time, it can better cope with sparse points and occlusion interruptions on the guardrail; based on depth-first search, after searching a path, it will backtrack and re-search other paths, so as to facilitate obtaining the optimal path, so as to avoid the situation where the point cloud is bifurcated relative to the road due to scatterers at the edge of the road, thereby avoiding search errors that cause fitting failure or erroneous results, and improving the fitting accuracy.

[0087] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5 As shown, the electronic device may include: a processor 51, a communications interface 52, a memory 53, and a communications bus 54. The processor 51, communications interface 52, and memory 53 communicate with each other via the communications bus 54. The processor 51 may call logic instructions in the memory 53 to execute a road guardrail detection method, which includes: acquiring point cloud data; gridding the point cloud data to obtain gridded point cloud data; performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path; and fitting points corresponding to the longest sliding path to obtain a guardrail detection result.

[0088] In addition, the logic instructions in the above-mentioned memory 53 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the road guardrail detection method provided by the above methods, which includes: obtaining point cloud data; gridding the point cloud data to obtain gridded point cloud data; performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path; fitting the points corresponding to the longest sliding path to obtain a guardrail detection result.

[0090] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the road guardrail detection method provided by the above-mentioned methods, the method including: obtaining point cloud data; gridding the point cloud data to obtain gridded point cloud data; performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path; fitting the points corresponding to the longest sliding path to obtain a guardrail detection result.

[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0092] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0093] 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A road guardrail detection method, characterized in that: include: Get point cloud data; Performing gridding processing on the point cloud data to obtain gridded point cloud data; Based on a depth-first search and a preset sliding window, a sliding search is performed on the gridded point cloud data to obtain the longest sliding path; Fitting the points corresponding to the longest sliding path to obtain a guardrail detection result; The method of performing a sliding search on the gridded point cloud data based on a depth-first search and a preset sliding window to obtain the longest sliding path includes: Sa, obtaining target points and target scores for each target point based on the gridded point cloud data and preset weights; Sb, determining a specific target point according to the target score of each target point and performing a sliding search on the specific target point; Sc, judging whether to prune the directions of the remaining target points according to the target scores of the target points, and performing pruning based on the judgment result; Sd, based on the target score of each target point, uses an interruption counter to count interruptions, and completes the search when the count value exceeds a first preset threshold to obtain the current maximum sliding path; Se, backtrack to the target point that has not been pruned, and re-execute steps Sa, Sb, Sc, Sd to obtain the next search path; Sf, using the next search path to update the current maximum sliding path to obtain the longest sliding path; Obtaining target points and target scores for each target point based on the gridded point cloud data and preset weights includes: According to the current position of the vehicle relative to the gridded point cloud data, a grid with the largest number of point clouds in the gridded point cloud data within a preset range on both sides of the vehicle is selected as the starting point of the preset sliding window; Obtaining target points based on the preset sliding window and the starting point, and obtaining target scores for each target point based on preset weights; Obtaining the target score for each target point includes: Determine a weighted sum of the number of point clouds of the target point and the number of point clouds in the grids on the left and right sides of the target point; The target score of the target point is determined based on the preset weight corresponding to the target point and the weighted sum, wherein the preset weight corresponding to the target point close to the vehicle is greater than the preset weight corresponding to the target point far from the vehicle.

2. The road guardrail detection method according to claim 1, characterized in that: The obtaining of a target point based on the preset sliding window and the starting point includes: The starting point is placed at a predetermined position of the preset sliding window to obtain a target point; wherein the target point is a grid in the gridded point cloud data located in the preset sliding window, and the grid is located on one side of the predetermined position along the sliding direction.

3. The road guardrail detection method according to claim 2, characterized in that: Determining a specific target point according to the target score of each target point includes: If there is a target point with the same score as the second preset threshold, selecting the target point close to the vehicle side as the specific target point; If the target scores of all the target points are equal to the second preset threshold, a target point located in the same row of the preset sliding window as the predetermined position is selected as the specific target point.

4. The road guardrail detection method according to claim 1, characterized in that: The determining, based on the target score of each target point, whether to prune the directions of the remaining target points, and performing pruning based on the determination result, includes: When there is a target score greater than a third preset threshold among the target scores of the target points, pruning the target path formed by the remaining target points with target scores equal to the third preset threshold and the current position of the sliding window; When the ratio of the target score to the sum of the target scores of the target points is less than a fourth preset threshold, pruning the target path formed by the corresponding target point and the current position of the sliding window; When the target scores of the target points are all equal to the third preset threshold, no pruning is performed.

5. The road guardrail detection method according to claim 1, characterized in that: The method of performing interrupt counting based on the target score of each target point by using an interrupt counter includes: If the target scores of the target points are all within the fifth preset threshold, the count value of the interruption counter is increased by 1; otherwise, the count value of the interruption counter is reset to zero.

6. The road guardrail detection method according to claim 1, characterized in that: The updating of the current maximum sliding path by using the next search path includes: comparing the path length of the next search path with the path length of the current maximum sliding path; If the path length of the next search path is greater than the path length of the current maximum sliding path, then using the next search path to update the current maximum sliding path; If the path length of the next search path is equal to the path length of the current maximum sliding path, and based on the fact that the number of point clouds of the next search path is greater than the number of point clouds of the current maximum sliding path, the current maximum sliding path is updated using the next search path.

7. The road guardrail detection method according to claim 1, characterized in that: The point cloud data is filtered based on preset point attributes, including: Eliminating non-stationary points in the point cloud data; Eliminate points in the point cloud data whose radar cross section is smaller than a sixth preset threshold; Eliminate points in the point cloud data whose signal-to-noise ratio is less than a seventh preset threshold; Points in the point cloud data that are outside the field of view of each sensor are removed.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the road guardrail detection method according to any one of claims 1 to 6 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the road guardrail detection method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Closed road edge and travelable area detection method based on laser radar

    CN113917487A