A road boundary detection method, computer equipment, readable storage medium and motor vehicle
By employing a road boundary detection method based on lidar point cloud semantic segmentation and polynomial fitting, the problem of insufficient accuracy in unstructured road boundary detection in existing technologies is solved, achieving high-precision and stable road boundary detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG LEAPMOTOR TECH CO LTD
- Filing Date
- 2023-03-10
- Publication Date
- 2026-05-08
AI Technical Summary
Existing LiDAR-based road boundary detection methods lack accuracy in detecting unstructured road boundaries and curved roads, are prone to missegmentation, and have large errors when using single curve fitting in heavily occluded scenarios.
A road boundary detection method based on lidar point cloud semantics is adopted. Through preprocessing, semantic segmentation, corner cutting, filtering and fitting steps, a semantic segmentation model trained by deep learning is used to identify different types of point clouds and extract road boundary information. First-order or second-order polynomial fitting is used to fit according to the road occlusion situation.
It improves the accuracy and stability of road boundary detection, can effectively distinguish obstructions, and is applicable to various lidar systems, especially in scenarios with severe obstruction, it can still detect accurately.
Smart Images

Figure CN116311127B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, specifically to a road boundary detection method, a computer device, a readable storage medium, and a motor vehicle. Background Technology
[0002] In the field of autonomous driving, 3D LiDAR-based perception solutions can achieve high-precision environmental scene detection, detecting both dynamic and static objects in the environment. Road boundaries, as essential information for autonomous vehicles, are crucial for determining the drivable area and ensuring driving safety. Autonomous vehicles often rely on road boundary information during operation. Road boundary information not only generates drivable areas but also assists in vehicle positioning. Under normal driving conditions, road boundaries are insurmountable for vehicles, providing a path planning range for vehicle positioning and navigation. Therefore, accurate road boundary detection is highly significant for both autonomous and assisted driving systems.
[0003] Existing LiDAR-based road boundary detection methods perform reasonably well for some structured road boundaries, but struggle with unstructured road boundaries, such as vegetated road edges, highway scenes, and median barriers. Furthermore, current methods segment roads on both sides using the LiDAR's X-axis as the boundary, which can lead to missegmentation of curved roads, reducing segmentation accuracy. Moreover, existing road boundary fitting algorithms rely on a single quadratic parabolic curve fitting algorithm to extract road boundary points. Single curve fitting is particularly problematic in heavily occluded scenes. Summary of the Invention
[0004] This invention aims to address one of the technical problems in related technologies to a certain extent. To this end, this invention provides a road boundary detection method with high detection accuracy and low false detection rate.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A road boundary detection method is provided, in which an autonomous vehicle identifies and detects the boundary of a road using the road boundary detection method, the road boundary detection method comprising the following steps:
[0007] Preprocessing: The original point cloud is preprocessed to form a two-dimensional array;
[0008] Semantic segmentation: The original point cloud is classified according to the obstacle category to obtain different semantic labels, and the point cloud containing the labels of road boundaries is extracted;
[0009] Cut corners: Divide the extracted point cloud into a left point cloud and a right point cloud;
[0010] Filtering: Filter the left and right point clouds to obtain the left boundary candidate point cloud and the right boundary candidate point cloud;
[0011] Fitting: Fit the candidate point clouds of the left and right road boundaries to obtain the road boundaries.
[0012] The technical solution provided by this invention, based on the semantics of LiDAR point clouds, is a road boundary method that does not rely on LiDAR beam information. Compared to cameras, it can better detect the 3D structural information of objects in a scene. By training a semantic segmentation model through deep learning, different categories in the LiDAR point cloud are identified. Then, road boundary information is extracted from the category point cloud containing road boundaries, quickly filtering out interference information. It has good anti-interference capabilities and can effectively distinguish road boundary occlusions, effectively solving the problem of road boundary occlusion by vehicles and pedestrians, ensuring the accuracy and stability of road boundary detection. Even road boundaries severely obscured by vehicles can be distinguished and detected, and it can be applied to both mechanical and solid-state LiDAR.
[0013] Optionally, the preprocessing step includes the following sub-steps:
[0014] Remove invalid point cloud data from the original point cloud, where any one of the X, Y, or Z coordinate channels has a value of NaN.
[0015] The remaining point cloud data is converted into an N×4 two-dimensional array. Each row of the two-dimensional array is Ri(x,y,z,intensity), which contains the coordinate information of the point cloud data and the reflectivity of each point. The number of columns of the two-dimensional array is the number of points in each frame of the point cloud.
[0016] While existing technologies also involve preprocessing point cloud data to remove NaN values and improve the efficiency of subsequent algorithms, the purpose of preprocessing in the technical solution provided by this invention differs from that in existing technologies. In this invention, preprocessing aims to convert the raw data type of the point cloud data into a matrix array that can be processed by a convolutional neural network, while simultaneously removing invalid points from the array to ensure the validity of the array data and improve the efficiency of matrix operations.
[0017] Optionally, the semantic segmentation step includes the following sub-steps:
[0018] The two-dimensional array is segmented using a convolutional neural network, and each point in the point cloud is assigned a corresponding semantic label.
[0019] Classify point cloud data with semantic labels using a semantic segmentation network;
[0020] Extract the point cloud corresponding to the semantic labels containing road boundaries.
[0021] Existing technologies, such as those based on point cloud beam information and point cloud elevation changes, rely on the geometric information of lidar point clouds. These methods are easily affected by dynamic obstacle occlusion and require ground filtering, resulting in poor accuracy and stability in road boundary detection. The technical solution provided by this invention, however, does not rely on lidar beam information or the elevation geometry features of lidar point clouds. It fully considers the special circumstances of actual road surfaces, using a deep learning-trained semantic segmentation model to identify different categories in the lidar point cloud. Semantic labels are then applied to the lidar point cloud, and categories containing road boundaries, such as fences, concrete walls, traffic signs, and curbs, are separated using these labels. Road boundary information is extracted from these category point clouds, exhibiting excellent anti-interference capabilities, high detection accuracy, and a low false detection rate.
[0022] Optionally, the miter step includes the following sub-steps:
[0023] The extracted point cloud is divided into several sector grids along the circumference, with the central angle of each sector grid being 1°;
[0024] Count the number of points in each sector grid, save the angle position labels of the sector grids with a count of 0, and mark the sector grids with a count of 0 as 1, and the other sector grids as 0;
[0025] Median filtering is applied to all annotations to obtain a sector grid array. Each sector grid array stores the annotation value and the angular position of the sector grid.
[0026] Sort the angle positions of all sector grid arrays labeled 1, and select the median value as the road dividing angle. If the angle position of the sector grid array labeled 1 is 0, then the dividing angle is 0.
[0027] Divide the left and right point clouds according to the following formula:
[0028]
[0029] Where pt represents a point in the sector grid, pt.x represents the x-coordinate of a point in the sector grid, pt.y represents the y-coordinate of a point in the sector grid, and P left For the point cloud on the left, P right Let α be the point cloud on the right, and α be the dividing angle.
[0030] This invention proposes a novel road surface detection method. It involves rasterizing the candidate point cloud of road boundaries after semantic segmentation, statistically analyzing the angles of grid cells with zero points, and then filtering out outliers using median filtering. The filtered non-ground point cloud will no longer contain point clouds in the central region, thus allowing for a better statistical analysis of the road's forward trend angle. The technical solution provided by this invention can calculate road segmentation angles, improving the accuracy of road segmentation. It can also detect road trends using surround-view LiDAR, identifying intersections, T-junctions, and curves, and can accurately segment road boundaries into left and right boundaries.
[0031] Optionally, the filtering step includes the following sub-steps:
[0032] Cluster the left and right point clouds respectively according to the following formula to obtain the left cluster point cloud and the right cluster point cloud:
[0033]
[0034] Where, p i For the i-th point, p j For the j-th point, d thr For threshold;
[0035] Calculate the centroid Y-values of the point cloud clusters closest to the drivable road surface for the left and right clusters of point clouds, respectively;
[0036] The left and right point clouds are filtered using the following formula to obtain the left and right boundary region point clouds:
[0037]
[0038] Among them, Y right Y is the value of the right centroid. left P is the Y-value of the left centroid. r_region Point cloud of the right boundary region; P l_region Point cloud of the left boundary region;
[0039] By using distance filtering, seed points for the left and right boundaries are extracted from the point clouds of the left and right boundary regions.
[0040] Curvature filtering is performed on the seed points of the left and right boundaries respectively to obtain the candidate point clouds of the left and right boundaries.
[0041] Optionally, extracting the left boundary seed point and the right boundary seed point from the left boundary region point cloud and the right boundary region point cloud includes the following steps:
[0042] The point clouds of the left and right boundary regions are gridded along the x-axis to obtain the left gridded point cloud and the right gridded point cloud.
[0043] Within each grid, selection is performed based on the Y-axis coordinates of the point cloud. In the right gridded point cloud, max(pt.y) is selected as the right boundary seed point, and in the left gridded point cloud, min(pt.y) is selected as the left boundary seed point.
[0044] Other existing methods typically extract road boundary seed points directly from information such as abrupt changes in the curvature and elevation of the laser point cloud. However, these methods are difficult to apply to solid-state LiDARs that lack circumferential beam information. Furthermore, the directly extracted seed points contain numerous noise points, affecting subsequent fitting. This invention overcomes these shortcomings by using filtering. Distance filtering finds road edge seed points for each segment along the road dividing line direction, selecting the point with the smallest Y-value on the left road edge and the point with the largest Y-value on the right road edge. This allows for the extraction of a coarse road boundary point cloud. It is applicable not only to the extraction of road boundary seed points from various 3D LiDARs but also to the extraction of road boundary seed points from visually dense point clouds.
[0045] Optionally, in the fitting step, the farthest distances of the candidate point clouds of the left and right road boundaries along the x-axis of the vehicle's forward direction are calculated. If the farthest distance is less than a threshold, a first-order polynomial is used for fitting; if the farthest distance is greater than the distance threshold, a second-order polynomial is used for fitting.
[0046] Optionally, fitting a first-order polynomial includes the following steps:
[0047] Two points are randomly selected from the candidate point clouds of the left and right boundaries, and the linear model y = a0x + b0 is calculated.
[0048] The selected point cloud points are used to form matrix X1 based on their pt.x coordinates and matrix Y1 based on their pt.y coordinates.
[0049] According to the formula M1=X 1inv *Y1 calculates the model parameter matrix M1 = [a0, b0], where X 1inv Let X1 be the inverse matrix;
[0050] Using the model parameter matrix M1 and the residual threshold T two Count the number of interior points in the linear model.
[0051] The linear model is iterated to obtain the model with the largest number of interior points, which is then taken as the optimal linear model M. 1best ;
[0052] Through the optimal linear model M 1best Obtain the road boundaries.
[0053] Optionally, fitting the quadratic polynomial includes the following steps:
[0054] Randomly select two or three points from the candidate point clouds of the left and right boundaries, and calculate the parabolic model y = ax. 2 +bx+c;
[0055] The selected point cloud points are used to form matrix X2 based on their pt.x coordinates and matrix Y2 based on their pt.y coordinates.
[0056] According to the formula M2 = X 2inv *Y2 calculates the model parameter matrix M2 = [a,b,c], where X 2inv It is the inverse matrix of X2;
[0057] Using the model parameter matrix M2 and the residual threshold T two Count the number of interior points of the parabola model.
[0058] The parabola model is iterated to obtain the model with the largest number of interior points, which is then taken as the optimal model, parabola model M. 2best ;
[0059] Through the optimal parabolic model M 2best Obtain the road boundaries.
[0060] Other methods in the prior art typically select a suitable polynomial algorithm for fitting. However, when encountering occlusion, the fitting error of short road edges under high-order polynomials is usually larger than that of first-order polynomials when fitting. This invention takes into account road edge occlusion, identifying some severely occluded scenarios by using the length of the road boundary. By calculating the X-axis distance and using first-order polynomial fitting, the accuracy of the road boundary can be well guaranteed, avoiding excessive road boundary curvature. For normal scenarios, quadratic polynomial fitting is used to ensure that the shape of the detected road boundary matches the actual road boundary shape.
[0061] Meanwhile, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the road boundary detection method described in any of the preceding claims.
[0062] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the road boundary detection method described in any of the preceding claims.
[0063] In addition, the present invention also provides a motor vehicle having an automatic driving function, wherein when the motor vehicle operates the automatic driving function, the road boundary is detected by the road boundary detection method described in any one of the preceding claims;
[0064] Or the motor vehicle has the aforementioned computer equipment;
[0065] Alternatively, the motor vehicle may have the aforementioned computer-readable storage medium, and the computer program, when executed by a processor, implements the road boundary detection method described in any of the preceding claims.
[0066] The motor vehicle provided by this invention has a similar beneficial effect to the reasoning process of the beneficial effect of the aforementioned vehicle control method, and will not be repeated here.
[0067] These features and advantages of the present invention will be disclosed in detail in the following specific embodiments and accompanying drawings. The preferred embodiments or means of the present invention will be shown in detail in conjunction with the accompanying drawings, but are not intended to limit the technical solutions of the present invention. In addition, each of these features, elements and components appearing in the following text and drawings is a plurality of, and different symbols or numbers are used for convenience of representation, but all represent parts with the same or similar construction or function. Attached Figure Description
[0068] The present invention will be further described below with reference to the accompanying drawings:
[0069] Figure 1 This is a flowchart illustrating an embodiment of the present invention. Detailed Implementation
[0070] The technical solutions of the embodiments of the present invention will be explained and described below with reference to the accompanying drawings. However, the following embodiments are only preferred embodiments of the present invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments in the implementation methods without creative effort are all within the protection scope of the present invention.
[0071] The terms "an embodiment," "example," or "trademark" used in this specification refer to a particular feature, structure, or characteristic described in connection with the embodiment itself that may be included in at least one embodiment disclosed in this patent. The phrase "in an embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment.
[0072] Example:
[0073] like Figure 1 As shown, this embodiment provides a road boundary detection method, which enables autonomous vehicles to identify and detect road boundaries.
[0074] The road boundary detection method provided in this embodiment includes the following steps:
[0075] Preprocessing: The original point cloud is preprocessed to form a two-dimensional array. While existing technologies also involve preprocessing point cloud data to remove NaN values and improve the efficiency of subsequent algorithms, the purpose of preprocessing in this embodiment differs from that in existing technologies. In this embodiment, invalid points with NaN values in any of the X, Y, and Z coordinate channels are first removed from the original point cloud to obtain a clean and effective point cloud.
[0076] The effective clean point cloud is converted into an N×4 two-dimensional array. Each row of the two-dimensional array is Ri(x,y,z,intensity), which contains the coordinate information of the point cloud data and the reflectivity of each point. The number of columns of the two-dimensional array is the number of points in each frame of the point cloud.
[0077] Through the aforementioned preprocessing, the original data type in the point cloud data is converted into a matrix array that can be processed by the convolutional neural network. At the same time, invalid points in the array are removed to ensure the validity of the array data and improve the efficiency of matrix operations.
[0078] Semantic segmentation: The original point cloud is classified according to the obstacle category to obtain different semantic labels, and the point cloud containing the labels of road boundaries is extracted.
[0079] In this step, a convolutional neural network is used to segment the two-dimensional array, assigning a corresponding semantic label to each point in the point cloud. Existing technologies, such as those based on point cloud line bundle information and point cloud elevation changes, rely on the geometric information of LiDAR point clouds, making them susceptible to dynamic obstacle occlusion and requiring ground filtering operations, resulting in poor accuracy and stability in road boundary detection. This embodiment, however, does not rely on LiDAR line bundle information for road boundary methods, nor on the elevation geometric features of LiDAR point clouds. It fully considers the special circumstances of actual road surfaces, training a semantic segmentation model through deep learning to identify different categories in the LiDAR point cloud and assigning semantic labels to it. Then, the semantic segmentation network classifies the semantically labeled point cloud data, including categories such as Road Edge, Car, Fence, and Pedestrian.
[0080] Road boundaries are typically contained within point clouds labeled with tags such as RoadEdge and Fence. Therefore, it is crucial to extract point clouds containing semantic tags representing road boundaries. By separating elements such as fences, concrete walls, traffic signs, and road edges that contain road boundaries using category labels, road boundary information can be extracted from the category point clouds containing road boundaries. This method exhibits strong anti-interference capabilities, high detection accuracy, and a low false detection rate.
[0081] Corner cut: The extracted point cloud is divided into a left point cloud and a right point cloud. Existing technologies often use the X-axis based on the LiDAR coordinate system as the dividing line between the two road boundaries. However, this can lead to missegmentation problems in intersections and curved scenes. The corner cut method provided in this embodiment can detect road trends, identify intersections and curved scenes, and can accurately segment the road boundary into left and right boundaries, as detailed below:
[0082] The extracted point cloud is divided into several sector grids along the circumference, with the central angle of each sector grid being 1°;
[0083] Count the number of points in each sector grid, save the angular position labels of the sector grids with a count of 0, and mark the sector grids with a count of 0 as 1, and the other sector grids as 0. In this sub-step, the width of the point cloud, which is the ratio of the nearest point to the farthest point in the sector grid, can also be saved in each sector grid as the value stored in the sector grid.
[0084] Median filtering is applied to all annotations to obtain a sector grid array. Each sector grid array stores the annotation value and the angular position of the sector grid.
[0085] Sort the angle positions of all sector grid arrays labeled 1, and select the median value as the road dividing angle. If the angle position of the sector grid array labeled 1 is 0, it means that the vehicles ahead are congested and severely obstructed, so the dividing angle is 0.
[0086] Divide the left and right point clouds according to the following formula:
[0087]
[0088] Where pt represents a point in the sector grid, pt.x represents the x-coordinate of a point in the sector grid, pt.y represents the y-coordinate of a point in the sector grid, and P left For the point cloud on the left, P right Let α be the point cloud on the right, and α be the dividing angle.
[0089] This embodiment rasterizes the candidate point cloud of road boundaries after semantic segmentation, counts the angles of grid cells with zero points, and then filters out outliers using median filtering. The filtered non-ground point cloud will no longer contain point clouds in the middle region, thus allowing for a better statistical analysis of the road's trend angle. The angle-cutting step in this embodiment not only calculates the road segmentation angle, improving road segmentation accuracy, but also detects road trends in a surround-view LiDAR system, identifying intersections, T-junctions, and curves, and accurately segmenting the road boundary into left and right boundaries.
[0090] Filtering: The left and right point clouds are filtered to obtain candidate point clouds for the left and right road boundaries. Other existing methods typically extract seed points for road boundaries directly from information such as abrupt changes in the curvature and elevation of the laser point cloud. However, these methods are difficult to apply to solid-state lidar without circumferential beam information. Furthermore, the directly extracted seed points contain many noise points, affecting subsequent fitting. This implementation provides the following filtering method:
[0091] The left and right point clouds are clustered according to the following formulas to obtain left-clustered and right-clustered point clouds, respectively. The clustering algorithm can be Euclidean clustering or DBSCAN clustering; no specific limitation is made here. In this embodiment, Euclidean clustering is preferred, i.e., when the cluster size of the i-th point and the j-th point is less than the clustering threshold d... thr Then the i-th point p can be... i Include the point cloud set P containing j j middle:
[0092] |p i -p j | <d thr ,(p i ∈p j )
[0093] Where, p i For the i-th point, p j For the j-th point, d thr For threshold;
[0094] Calculate the centroid Y-values of the point cloud clusters closest to the drivable road surface for the left and right clusters of point clouds, respectively;
[0095] The left and right point clouds are filtered using the following formula to obtain the left and right boundary region point clouds:
[0096]
[0097] Among them, Y right Y is the value of the right centroid. left P is the Y-value of the left centroid. r_region Point cloud of the right boundary region; P l_region Point cloud of the left boundary region;
[0098] By using distance filtering, seed points for the left and right boundaries are extracted from the point clouds of the left and right boundary regions.
[0099] Extracting left boundary seed points and right boundary seed points from the left boundary region point cloud and the right boundary region point cloud includes the following steps:
[0100] The point clouds of the left and right boundary regions are gridded along the x-axis to obtain the left gridded point cloud and the right gridded point cloud.
[0101] Within each grid, selection is performed based on the Y-axis coordinates of the point cloud. In the right gridded point cloud, max(pt.y) is selected as the right boundary seed point, and in the left gridded point cloud, min(pt.y) is selected as the left boundary seed point.
[0102] Curvature filtering is performed on the seed points of the left and right boundaries respectively to obtain the candidate point clouds of the left and right boundaries.
[0103] This implementation provides a filtering method that overcomes the aforementioned shortcomings of existing technologies. It uses distance filtering to find roadside seed points for each segment along the road dividing line direction, selecting the point with the smallest Y-value on the left roadside and the point with the largest Y-value on the right roadside. This allows for the extraction of a coarse road boundary point cloud. It is applicable not only to the extraction of roadside seed points from various 3D LiDAR systems but also to the extraction of roadside seed points from visually dense point clouds.
[0104] Fitting: The candidate point clouds of the left and right road boundaries are fitted to obtain the road boundaries. Other methods in the prior art usually choose a suitable polynomial algorithm for fitting. However, when encountering occlusion, the fitting error of short road edges under high-order polynomials is usually larger than that of first-order polynomials when fitting. Therefore, this embodiment takes into account the road edge occlusion situation. By calculating the length of the road boundary, some scenes with severe occlusion can be identified. By calculating the distance along the X-axis, first-order polynomial fitting can ensure the accuracy of the road boundary well and avoid excessive curvature of the road boundary. For normal scenes, quadratic polynomial fitting is used to ensure that the shape of the detected road boundary matches the actual road boundary shape.
[0105] In the fitting step, the farthest distances of the candidate point clouds of the left and right road boundaries along the x-axis of the vehicle's forward direction are calculated. If the farthest distance is less than a threshold, a first-order polynomial is used for fitting; if the farthest distance is greater than the distance threshold, a second-order polynomial is used for fitting.
[0106] Fitting a first-order polynomial involves the following steps:
[0107] Two points are randomly selected from the candidate point clouds of the left and right boundaries, and the linear model y = a0x + b0 is calculated.
[0108] The selected point cloud points are used to form matrix X1 based on their pt.x coordinates and matrix Y1 based on their pt.y coordinates.
[0109] According to the formula M1=X 1inv*Y1 calculates the model parameter matrix M1 = [a0, b0], where X 1inv Let X1 be the inverse matrix;
[0110] Using the model parameter matrix M1 and the residual threshold T two Count the number of interior points in the linear model. Residual threshold T. two The terms have general technical meanings in this field and will not be elaborated further here.
[0111] The linear model is iterated to obtain the model with the largest number of interior points, which is then taken as the optimal linear model M. 1best ;
[0112] Through the optimal linear model M 1best Obtain the road boundaries.
[0113] Fitting a quadratic polynomial involves the following steps:
[0114] Randomly select two or three points from the candidate point clouds of the left and right boundaries, and calculate the parabolic model y = ax. 2 +bx+c;
[0115] The selected point cloud points are used to form matrix X2 based on their pt.x coordinates and matrix Y2 based on their pt.y coordinates.
[0116] According to the formula M2 = X 2inv *Y2 calculates the model parameter matrix M2 = [a,b,c], where X 2inv It is the inverse matrix of X2;
[0117] Using the model parameter matrix M2 and the residual threshold T two Count the number of interior points of the parabolic model, where the residual threshold T is... two This is also a common technical meaning in this field, and will not be elaborated further here.
[0118] The parabola model is iterated to obtain the model with the largest number of interior points, which is then taken as the optimal model, parabola model M. 2best ;
[0119] Through the optimal parabolic model M 2best Obtain the road boundaries.
[0120] The technical solution provided in this embodiment, based on LiDAR point cloud semantics, is a road boundary method that does not rely on LiDAR beam information. Compared to cameras, it can better detect the 3D structural information of objects in the scene. By training a semantic segmentation model through deep learning, different categories in the LiDAR point cloud are identified. Then, road boundary information is extracted from the category point cloud containing road boundaries, quickly filtering out interference information. It has good anti-interference capabilities and can effectively distinguish road boundary occlusions, effectively solving the problem of road boundary occlusion by vehicles and pedestrians, ensuring the accuracy and stability of road boundary detection. Even road boundaries severely obscured by vehicles can be distinguished and detected, and it can be applied to both mechanical and solid-state LiDAR.
[0121] Meanwhile, this embodiment also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the point cloud semantic segmentation method described above.
[0122] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. Accordingly, the computer program can be stored in a non-volatile computer-readable storage medium, and when executed, the computer program can implement the methods of any of the above embodiments. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0123] Furthermore, this embodiment also provides a motor vehicle with an autonomous driving function. When the motor vehicle provided in this embodiment operates the autonomous driving function, the road boundary is detected by the aforementioned road boundary detection method.
[0124] Or the motor vehicle has the aforementioned computer equipment;
[0125] Alternatively, the motor vehicle may have the aforementioned computer-readable storage medium, and the computer program, when executed by a processor, implements the road boundary detection method described in any of the preceding claims.
[0126] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes, but is not limited to, the contents described in the accompanying drawings and the specific embodiments above. Any modifications that do not depart from the functional and structural principles of the present invention will be included within the scope of the claims.
Claims
1. A road boundary detection method, wherein an autonomous vehicle identifies and detects the boundary of a road using the road boundary detection method, characterized in that, The road boundary detection method includes the following steps: Preprocessing: The original point cloud is preprocessed to form a two-dimensional array; Semantic segmentation: The original point cloud is classified according to the obstacle category to obtain different semantic labels, and the point cloud containing the labels of road boundaries is extracted; Cut corners: The extracted point cloud is divided into a left point cloud and a right point cloud; Filtering: Filter the left and right point clouds to obtain the left boundary candidate point cloud and the right boundary candidate point cloud; Fitting: Fit the candidate point clouds of the left and right road boundaries to obtain the road boundaries; The filtering step includes the following sub-steps: Cluster the left and right point clouds respectively according to the following formula to obtain the left cluster point cloud and the right cluster point cloud: in, p i For the first i One point, p j For the first j One point, d thr For threshold; Calculate the centroid Y-values of the point cloud clusters closest to the drivable road surface for the left and right clusters of point clouds, respectively; The left and right point clouds are filtered using the following formula to obtain the left and right boundary region point clouds: Among them, Y right Y is the value of the right centroid. left P represents the Y-value of the left centroid. r_region For the point cloud of the right boundary region, P l_region Point cloud of the left boundary region; By using distance filtering, seed points for the left and right boundaries are extracted from the point clouds of the left and right boundary regions. Curvature filtering is performed on the seed points of the left and right boundaries respectively to obtain the candidate point clouds of the left and right boundaries.
2. The road boundary detection method according to claim 1, characterized in that, The preprocessing step includes the following sub-steps: Remove invalid point cloud data from the original point cloud, where any one of the X, Y, or Z coordinate channels has a value of NaN. The remaining point cloud data is converted into an N×4 two-dimensional array, where each row of the two-dimensional array contains data of type N×4. Ri ( x , y , z , intensity The array contains the coordinate information of the point cloud data and the reflectivity of each point. The number of columns in the two-dimensional array is the number of points in each frame of the point cloud.
3. The road boundary detection method according to claim 2, characterized in that, The semantic segmentation step includes the following sub-steps: The two-dimensional array is segmented using a convolutional neural network, and each point in the point cloud is assigned a corresponding semantic label. Classify point cloud data with semantic labels using a semantic segmentation network; Extract the point cloud corresponding to the semantic labels containing road boundaries.
4. The road boundary detection method according to claim 3, characterized in that, The mitting step includes the following sub-steps: The extracted point cloud is divided into several sector grids along the circumference, with the central angle of each sector grid being 1°; Count the number of points in each sector grid, save the angle position labels of the sector grids with a count of 0, and mark the sector grids with a count of 0 as 1, and the other sector grids as 0; Median filtering is applied to all annotations to obtain a sector grid array. Each sector grid array stores the annotation value and the angular position of the sector grid. Sort the angle positions of all sector grid arrays labeled 1, and select the median value as the road dividing angle. If the angle position of the sector grid array labeled 1 is 0, then the dividing angle is 0. Divide the left and right point clouds according to the following formula: in, pt For points in a sector grid, pt . x The x-coordinate of a point in the sector grid. pt . y The y-coordinate of a point in the sector grid. P left Point clouds on the left, P right Add clouds to the right side α It is the dividing angle.
5. The road boundary detection method according to claim 1, characterized in that, Extracting the left boundary seed point and the right boundary seed point from the left boundary region point cloud and the right boundary region point cloud includes the following steps: The point clouds of the left and right boundary regions are gridded along the x-axis to obtain the left gridded point cloud and the right gridded point cloud. Within each grid, selection is performed based on the Y-axis coordinates of the point cloud. In the right gridded point cloud, max(pt.y) is selected as the right boundary seed point, and in the left gridded point cloud, min(pt.y) is selected as the left boundary seed point.
6. The road boundary detection method according to claim 1, characterized in that, In the fitting step, the farthest distances of the candidate point clouds of the left and right road boundaries along the x-axis of the vehicle's forward direction are calculated. If the farthest distance is less than a threshold, a first-order polynomial is used for fitting; if the farthest distance is greater than the distance threshold, a second-order polynomial is used for fitting.
7. The road boundary detection method according to claim 6, characterized in that, Fitting a first-order polynomial involves the following steps: Two points are randomly selected from the candidate point clouds of the left and right boundaries to calculate the straight line model. y = a 0 x + b 0; The selected point clouds are respectively pt . x The coordinates form a matrix X1. pt . y The coordinates form a matrix Y1; According to the formula M1=X 1inv *Y1 calculates the model parameter matrix M1=[ a 0, b 0], where X 1inv Let X1 be the inverse matrix; Using the model parameter matrix M1 and the residual threshold T two Count the number of interior points in the linear model. The linear model is iterated to obtain the model with the largest number of interior points, which is then taken as the optimal linear model M. 1best ; Through the optimal linear model M 1best Obtain the road boundaries.
8. The road boundary detection method according to claim 6, characterized in that, Fitting a quadratic polynomial involves the following steps: Randomly select two or three points from the candidate point clouds of the left and right boundaries to calculate the parabolic model. y = ax 2 + bx + c ; The selected point clouds are respectively pt . x The coordinates form a matrix X2. pt . y The coordinates form the matrix Y2; According to the formula M2=X 2inv *Y2 calculation model parameter matrix M2=[ a , b [, c], where X 2inv It is the inverse matrix of X2; Using the model parameter matrix M2 and the residual threshold T two Count the number of interior points of the parabola model. The parabola model is iterated to obtain the model with the largest number of interior points, which is then taken as the optimal model, parabola model M. 2best ; Through the optimal parabolic model M 2best Obtain the road boundaries.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the road boundary detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the road boundary detection method according to any one of claims 1 to 8.
11. A motor vehicle, characterized in that, The motor vehicle has an automatic driving function. When the motor vehicle operates the automatic driving function, the road boundary is detected by the road boundary detection method described in any one of claims 1 to 8. Or the motor vehicle may have the computer equipment as described in claim 9; Alternatively, the motor vehicle may have a computer-readable storage medium as described in claim 10, wherein the computer program, when executed by a processor, implements the road boundary detection method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Road boundary detection method and device, computer equipment and storage medium
CN115731527A