Ground point cloud segmentation method and device, storage medium and computing unit
By combining polar coordinate grids and water injection algorithms, the problem of recognition errors in ground segmentation algorithms on uneven roads was solved, and accurate segmentation of ground surfaces such as slopes, bridges and tunnels was achieved, improving the accuracy and stability of laser sensing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEOLIX TECH CO LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-05-29
Smart Images

Figure CN116030248B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and in particular to a ground point cloud segmentation method, apparatus, storage medium, and computing unit. Background Technology
[0002] Current advanced autonomous driving solutions typically rely on LiDAR (Light Detection and Ranging). Due to the characteristics of laser scanning, a significant portion of each point cloud frame belongs to the ground. Therefore, the first step in laser perception is to filter out the ground-related portions from the point cloud, a process known as ground segmentation.
[0003] Existing ground segmentation algorithms typically rely on the flat-ground assumption, which assumes the ground is approximately flat and then segments point clouds below a certain height as ground points according to certain rules. However, in reality, roads are often not flat; in addition to bumps and potholes, there are also large-scale uneven phenomena such as bridges, tunnels, and ramps. In these complex scenarios, methods based on the flat-ground assumption often yield incorrect results: either filtering out obstacles as ground or retaining the ground as obstacles because it is higher than the vehicle. Summary of the Invention
[0004] This application provides a ground point cloud segmentation method, apparatus, storage medium, and computing unit to address the inaccuracy of ground segmentation algorithms based on the horizon assumption. The technical solution is as follows:
[0005] On the one hand, a ground point cloud segmentation method is provided, the method comprising:
[0006] The point cloud to be segmented is segmented using a polar coordinate grid to obtain multiple point cloud blocks;
[0007] The point cloud blocks are sequentially fitted with a vertical plane and a ground plane to obtain a fitting plane.
[0008] The first fitting ground is formed by using a water-filling algorithm to combine the central fitting plane and multiple fitting planes connected to the central fitting plane. The central fitting plane is the fitting plane corresponding to the point cloud block at the center position.
[0009] The vertex heights of the remaining fitted planes are predicted based on the first fitted ground, and a second fitted ground is generated based on the predicted vertex height values.
[0010] Point clouds below the first and second fitting planes are marked as ground, and point clouds above the first and second fitting planes are marked as non-ground.
[0011] In one possible implementation, predicting the fitting height of the remaining fitting plane based on the first fitted surface includes:
[0012] For each remaining point cloud block corresponding to the fitting plane, if there is a water-filled area in the circumferential direction of the point cloud block along the polar coordinate grid, the vertex height of the point cloud block is predicted based on the water-filled area and the point cloud block located inside the point cloud block. The water-filled area is the point cloud block corresponding to the fitting plane in the first fitting ground.
[0013] If there is no water-filled area in the point cloud block along the circumferential direction of the polar coordinate grid, the vertex height of the point cloud block is predicted based on the point cloud blocks located inside and on the left and right sides of the point cloud block.
[0014] In one possible implementation, the step of using a water-filling algorithm to form a first fitting ground plane from the central fitting plane and multiple fitting planes connected to the central fitting plane includes:
[0015] Add the point cloud block corresponding to the center fitting plane as a candidate block to the block set;
[0016] Traverse the point cloud blocks adjacent to each candidate block in the block set, and obtain the height of the fitting plane corresponding to the point cloud block at the two common endpoints and the height of the fitting plane corresponding to the adjacent candidate block at the two common endpoints. The two common endpoints are the two endpoints of the common edge between the point cloud block and the candidate block.
[0017] If the absolute value of the height difference between the fitting plane corresponding to the point cloud block and the fitting plane corresponding to the candidate block at each common endpoint is less than the error tolerance threshold, then the point cloud block is added to the block set as a candidate block; the step of traversing the point cloud blocks adjacent to each candidate block in the block set is executed repeatedly until there are no point cloud blocks that can be added to the block set.
[0018] The fitting planes corresponding to each candidate block in the block set are used to form the first fitting ground.
[0019] In one possible implementation, the step of sequentially performing vertical plane fitting and ground plane fitting on the point cloud blocks to obtain a fitting plane includes:
[0020] A vertical plane is fitted to the point cloud block, and point clouds whose distance from the vertical plane is less than a first threshold are removed.
[0021] A ground plane is fitted to the point cloud blocks after removing the point cloud to obtain a fitting plane;
[0022] Detect whether the fitted plane meets the preset test conditions;
[0023] If the fitted plane satisfies the test conditions, then the fitted plane is retained.
[0024] In one possible implementation, fitting the point cloud block to a vertical plane includes:
[0025] Select the point cloud with the lowest height from the point cloud blocks as the seed point cloud;
[0026] Principal component analysis was performed on the seed point cloud.
[0027] The eigenvector with the smallest eigenvalue in the analysis results is determined as the normal vector of the fitting plane, and the fitting plane is generated.
[0028] If the inclination angle of the fitted plane is greater than the second threshold, then the fitted plane is determined to be a vertical plane.
[0029] In one possible implementation, the step of performing ground plane fitting on the point cloud blocks after removing the point cloud to obtain a fitting plane includes:
[0030] Select the point cloud with the lowest height from the point cloud blocks after removing the point cloud as the seed point cloud;
[0031] Principal component analysis was performed on the seed point cloud.
[0032] The eigenvector with the smallest eigenvalue in the analysis results is determined as the normal vector of the fitting plane, and the fitting plane is generated.
[0033] Points in the point cloud block whose distance to the fitting plane is less than a third threshold are used as seed point clouds. The step of performing principal component analysis on the seed point clouds is repeated until the number of iterations reaches the threshold.
[0034] In one possible implementation, detecting whether the fitted plane meets a preset test condition includes:
[0035] Detect whether the tilt angle of the fitted plane is less than a fourth threshold; and / or,
[0036] Detect whether the minimum eigenvalue of the fitted plane at the last fitting is less than a fifth threshold; and / or,
[0037] The ratio of the largest eigenvalue and the second largest eigenvalue of the fitted plane at the last fitting is detected to be less than a sixth threshold.
[0038] On the one hand, a ground point cloud segmentation device is provided, the device comprising:
[0039] The segmentation module is used to segment the point cloud to be segmented using polar coordinate grids to obtain multiple point cloud blocks;
[0040] The fitting module is used to sequentially perform vertical plane fitting and ground plane fitting on the point cloud blocks to obtain a fitting plane;
[0041] The water injection module is used to form a first fitting ground by using a water injection algorithm to combine the central fitting plane and multiple fitting planes connected to the central fitting plane. The central fitting plane is the fitting plane corresponding to the point cloud block at the center position.
[0042] The generation module is used to predict the vertex height of the remaining fitting plane based on the first fitted ground surface, and generate a second fitted ground surface based on the predicted vertex height values.
[0043] The labeling module is used to label point clouds below the first fitting plane and the second fitting plane as ground, and to label point clouds above the first fitting plane and the second fitting plane as non-ground.
[0044] On the one hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the ground point cloud segmentation method as described above.
[0045] On the one hand, a computing unit is provided, the computing unit including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to implement the ground point cloud segmentation method as described above.
[0046] The beneficial effects of the technical solution provided in this application include at least the following:
[0047] After segmenting the point cloud to be segmented using a polar coordinate grid, the resulting point cloud blocks can be fitted to obtain a fitting plane. Since the point cloud block at the center position is close enough to an autonomous vehicle, the central fitting plane corresponding to this point cloud block is determined as the ground. Then, the water-filling algorithm is used to form the first fitting ground by combining the central fitting plane and multiple fitting planes connected to the central fitting plane. The vertex height of the remaining fitting planes is then predicted based on the first fitting ground, and the second fitting ground is generated based on the predicted vertex height. Finally, point clouds below the first and second fitting planes are marked as ground, and point clouds above the first and second fitting planes are marked as non-ground. In this way, non-flat ground such as ramps, bridges, and tunnels can be correctly segmented, achieving fast and robust ground segmentation, which provides a good guarantee for improving the performance of laser sensing. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart of a ground point cloud segmentation method provided in one embodiment of this application;
[0050] Figure 2 This is a schematic diagram of a polar coordinate grid provided in one embodiment of this application;
[0051] Figure 3 This is a schematic diagram of point cloud block fitting provided in one embodiment of this application;
[0052] Figure 4 This is a structural block diagram of a ground point cloud segmentation device provided in one embodiment of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0054] Please refer to Figure 1 This document illustrates a flowchart of a ground point cloud segmentation method according to an embodiment of this application. This ground point cloud segmentation method can be applied in a computing unit. The ground point cloud segmentation method may include:
[0055] Step 101: Use polar coordinate grids to segment the point cloud to be segmented to obtain multiple point cloud blocks.
[0056] The LiDAR in an autonomous vehicle can periodically acquire a frame of point cloud and send each frame of point cloud to the computing unit in the autonomous vehicle. The computing unit can segment the point cloud after acquiring each frame, or it can segment the point cloud after acquiring multiple frames. In this embodiment, the timing of segmentation is not limited.
[0057] The computing unit can preset the size and center position of the polar coordinate grid, and use this grid to segment the point cloud. After segmentation, each grid corresponds to a point cloud block. The center position refers to the origin of the polar coordinate grid, and the computing unit can arbitrarily select any position as the center position. For example, the computing unit can use the location of the lidar as the center position of the polar coordinate grid.
[0058] In one embodiment, the polar coordinate grid can be as follows: Figure 2 The grid shown.
[0059] Step 102: Perform vertical plane fitting and ground plane fitting on the point cloud blocks in sequence to obtain a fitting plane.
[0060] Specifically, the point cloud blocks are fitted with the vertical plane and the ground plane in sequence to obtain a fitted plane, which may include the following steps:
[0061] (1) Fit a vertical plane to the point cloud block and remove point clouds whose distance from the vertical plane is less than the first threshold.
[0062] This step is called Vertical Plane Fitting (VPF).
[0063] The process of fitting a vertical plane to a point cloud block includes: selecting the point cloud with the lowest height from the point cloud block according to a predetermined proportion as a seed point cloud; performing principal component analysis (PCA) on the seed point cloud; determining the eigenvector with the smallest eigenvalue in the analysis results as the normal vector of the fitting plane and generating the fitting plane; if the tilt angle of the fitting plane is greater than a second threshold, then the fitting plane is determined to be a vertical plane.
[0064] The predetermined percentage can be a pre-set empirical value. In one example, the predetermined percentage could be 40%.
[0065] The second threshold can be set to a value less than 90 degrees based on business requirements. For example, the second threshold could be 45 degrees. It should be noted that the vertical plane refers to the fitted plane with an inclination angle greater than the second threshold, not a plane perpendicular to the ground.
[0066] After obtaining the vertical plane, the computing unit calculates the distance between the point cloud in the point cloud block and the vertical plane, removes point clouds with a distance less than a first threshold, retains point clouds with a distance greater than or equal to the first threshold, and groups the remaining point clouds into a point cloud block. The first threshold can be set according to actual business needs.
[0067] In this embodiment, the calculation unit can repeatedly execute step (1) until the number of executions reaches a threshold. The threshold can be set according to actual business needs; for example, if the threshold is 3, the calculation unit needs to execute step (1) 3 times.
[0068] Since the selection of seed point clouds based on height is required when performing ground plane fitting in the following text, in order to avoid the influence of point clouds located near the vertical plane on the selection of seed point clouds, the computing unit needs to perform vertical plane fitting first to remove these point clouds, thereby improving the accuracy of seed point cloud selection and further improving the accuracy of ground plane fitting.
[0069] (2) Perform ground plane fitting on the point cloud blocks after removing the point cloud to obtain a fitting plane.
[0070] This step is called Ground Plane Fitting (GPF).
[0071] The process involves fitting a ground plane to the point cloud blocks after removing the point cloud, resulting in a fitting plane. This includes: selecting the point cloud with the lowest height from the point cloud blocks as a seed point cloud; performing principal component analysis on the seed point cloud; determining the eigenvector with the smallest eigenvalue in the analysis results as the normal vector of the fitting plane and generating the fitting plane; and repeatedly performing principal component analysis on the seed point cloud as a seed point cloud, with the point cloud blocks whose distance from the fitting plane is less than a third threshold. This process continues until the number of iterations reaches a threshold.
[0072] The predetermined percentage can be a pre-set empirical value. In one example, the predetermined percentage could be 12.5%.
[0073] The third threshold can be set according to actual business needs.
[0074] In this embodiment, the calculation unit can repeatedly execute step (2) until the number of executions reaches the threshold. The threshold can be set according to actual business needs. For example, if the threshold is 3, the calculation unit needs to execute step (2) 3 times to avoid the sensitivity to noise during principal component analysis and to fit the ground more accurately.
[0075] (3) Check whether the fitted plane meets the preset test conditions.
[0076] The detection of whether the fitted plane meets the preset test conditions includes: detecting whether the tilt angle of the fitted plane is less than the fourth threshold; and / or detecting whether the minimum eigenvalue of the fitted plane at the last fitting is less than the fifth threshold; and / or detecting whether the ratio of the maximum eigenvalue and the second maximum eigenvalue of the fitted plane at the last fitting is less than the sixth threshold.
[0077] The fourth, fifth, and sixth thresholds can all be set according to actual business needs.
[0078] This embodiment sets three verification conditions, and the calculation unit can choose one or more of them to verify the rationality of the fitted plane. Specifically, verifying the tilt angle aims to check the upward orientation of the fitted plane; verifying the minimum eigenvalue aims to check the flatness of the fitted plane; and verifying the maximum and second largest eigenvalues aims to check the nonlinearity of the fitted plane.
[0079] (4) If the fitted plane meets the test conditions, then the fitted plane is retained.
[0080] Step 103: Use the water injection algorithm to form the first fitting ground by combining the central fitting plane and multiple fitting planes connected to the central fitting plane. The central fitting plane is the fitting plane corresponding to the point cloud block at the center position.
[0081] As mentioned above, the center position refers to the location of the lidar.
[0082] Specifically, using the water-filling algorithm to form the first fitting ground by the central fitting plane and multiple fitting planes connected to the central fitting plane can include the following steps:
[0083] (1) Add the point cloud blocks corresponding to the center fitting plane as candidate blocks to the block set.
[0084] Since the point cloud block at the center is close enough to the autonomous vehicle, the computing unit determines the center fitting plane corresponding to the point cloud block as the ground and adds the point cloud block as the first candidate block to the block set.
[0085] (2) Traverse the point cloud blocks adjacent to each candidate block in the block set, and obtain the height of the fitting plane corresponding to the point cloud block at the two common endpoints and the height of the fitting plane corresponding to the adjacent candidate block at the two common endpoints. The two common endpoints are the two endpoints of the common edge between the point cloud block and the candidate block.
[0086] According to the polar coordinate grid, two adjacent point cloud blocks have a common edge. The computing unit can select two endpoints on the common edge and then compare the height of the fitting plane at the two common endpoints.
[0087] Assuming the candidate block is C, the adjacent point cloud blocks are X, and the common endpoints are A and B, then the height of the fitting plane corresponding to point cloud block X at the two common endpoints can be determined to include H. A (X) and H B (X), the fitting plane corresponding to candidate block C has a height H at its two common endpoints. A (C) and H B (C).
[0088] (3) If the absolute value of the height difference between the fitting plane corresponding to the point cloud block and the fitting plane corresponding to the candidate block at each common endpoint is less than the error tolerance threshold, then the point cloud block is added to the block set as a candidate block; the step of traversing the point cloud blocks adjacent to each candidate block in the block set is executed repeatedly until there are no point cloud blocks that can be added to the block set.
[0089] If the following conditions are met:
[0090] abs(H A (X)-H A(C)) <threshold,abs(H B (X)-H B (C)) <threshold
[0091] If candidate block C is considered to be connected to point cloud block X, then point cloud block X is added to the block set as a candidate block. Here, abs represents the absolute value, and threshold represents the error tolerance threshold.
[0092] The computing unit can repeat steps (2) and (3) until there are no point cloud blocks that can be added to the block set.
[0093] (4) The fitting planes corresponding to each candidate block in the block set are used to form the first fitting ground.
[0094] The above algorithm can also be called the water-filling algorithm. In this algorithm, point cloud blocks that can be connected are called water-filled blocks, and point cloud blocks that cannot be connected are called non-water-filled blocks.
[0095] Step 104: Predict the vertex heights of the remaining fitted planes based on the first fitted ground, and generate the second fitted ground based on the predicted vertex height values.
[0096] Specifically, the prediction of the fitting height of the remaining fitting planes based on the first fitted ground includes: for each remaining point cloud block corresponding to a fitting plane, if the point cloud block has a water-filled area along the circumferential direction of the polar coordinate grid, the vertex height of the point cloud block is predicted based on the water-filled area and the point cloud blocks located inside the point cloud block, where the water-filled area is the point cloud block corresponding to the fitting plane in the first fitted ground; if the point cloud block does not have a water-filled area along the circumferential direction of the polar coordinate grid, the vertex height of the point cloud block is predicted based on the point cloud blocks located inside the point cloud block and on its left and right sides.
[0097] Among them, the point cloud blocks corresponding to the remaining fitted planes are non-water-filled blocks, which cannot be connected with other water-filled blocks to form the ground. The computing unit can use the water-filled blocks to predict the ground of the non-water-filled blocks.
[0098] Specifically, if a point cloud patch has water-filled areas along its circumference, water-filled areas are searched for on its left and right sides. The fitted heights of the vertices of these water-filled areas are used for interpolation to calculate the predicted heights of the two outer vertices of the point cloud patch. Similarly, the fitted heights of the inner vertices are used for interpolation to calculate the predicted heights of the two inner vertices of the point cloud patch, resulting in the final predicted heights of all four vertices. If a point cloud patch does not have water-filled areas along its circumference, the vertex heights of its inner layer are interpolated, and then averaged with the vertex heights of the left and right sides. This average is used as the final predicted heights of the four vertices of the point cloud patch. Finally, principal component analysis is performed using the predicted heights of the four vertices to fit the final second fitted ground.
[0099] Step 105: Mark the point cloud below the first fitting plane and the second fitting plane as ground, and mark the point cloud above the first fitting plane and the second fitting plane as non-ground.
[0100] In summary, the ground point cloud segmentation method provided in this application, after segmenting the point cloud to be segmented using a polar coordinate grid, can fit the obtained point cloud blocks to obtain a fitting plane. Since the point cloud block at the center position is close enough to an autonomous vehicle, the central fitting plane corresponding to the point cloud block is determined as the ground. Then, the water-filling algorithm is used to form a first fitting ground by combining the central fitting plane and multiple fitting planes connected to the central fitting plane. The vertex height of the remaining fitting planes is predicted based on the first fitting ground, and a second fitting ground is generated based on the predicted vertex height. Finally, point clouds below the first and second fitting planes are marked as ground, and point clouds above the first and second fitting planes are marked as non-ground. In this way, non-flat ground such as slopes, bridges, and tunnels can be correctly segmented, achieving fast and robust ground segmentation, and providing a good guarantee for improving the performance of laser sensing.
[0101] Please refer to Figure 4 This diagram illustrates a structural block diagram of a ground point cloud segmentation device according to an embodiment of this application. The ground point cloud segmentation device can be applied in a computing unit. The ground point cloud segmentation device may include:
[0102] The segmentation module 410 is used to segment the point cloud to be segmented using a polar coordinate grid to obtain multiple point cloud blocks.
[0103] The fitting module 420 is used to sequentially perform vertical plane fitting and ground plane fitting on the point cloud blocks to obtain a fitting plane;
[0104] The water injection module 430 is used to form a first fitting ground by using a water injection algorithm to combine the central fitting plane and multiple fitting planes connected to the central fitting plane. The central fitting plane is the fitting plane corresponding to the point cloud block at the center position.
[0105] The generation module 440 is used to predict the vertex height of the remaining fitting plane based on the first fitted ground and generate a second fitted ground based on the predicted vertex height value.
[0106] The labeling module 450 is used to label point clouds below the first fitting plane and the second fitting plane as ground, and to label point clouds above the first fitting plane and the second fitting plane as non-ground.
[0107] In an optional embodiment, the generation module 440 is further configured to:
[0108] For each remaining point cloud block corresponding to the fitted plane, if there is a water-filled block in the circumferential direction along the polar coordinate grid, the vertex height of the point cloud block is predicted based on the water-filled block and the point cloud block located inside the point cloud block. The water-filled block is the point cloud block corresponding to the fitted plane in the first fitted ground.
[0109] If there is no water-filled area in the point cloud block along the circumference of the polar coordinate grid, the vertex height of the point cloud block is predicted based on the point cloud blocks located inside and to the left and right of the point cloud block.
[0110] In an optional embodiment, the water injection module 430 is further configured to:
[0111] Add the point cloud block corresponding to the center fitting plane as a candidate block to the block set;
[0112] Traverse the point cloud blocks adjacent to each candidate block in the block set, and obtain the height of the fitting plane corresponding to the point cloud block at the two common endpoints and the height of the fitting plane corresponding to the adjacent candidate block at the two common endpoints. The two common endpoints are the two endpoints of the common edge between the point cloud block and the candidate block.
[0113] If the absolute value of the height difference between the fitted plane corresponding to the point cloud block and the fitted plane corresponding to the candidate block at each common endpoint is less than the error tolerance threshold, then the point cloud block is added to the block set as a candidate block; the step of traversing the point cloud blocks adjacent to each candidate block in the block set is executed repeatedly until there are no point cloud blocks that can be added to the block set.
[0114] The fitting plane corresponding to each candidate block in the block set is used to form the first fitting ground.
[0115] In an optional embodiment, the fitting module 420 is further configured to:
[0116] Fit a vertical plane to the point cloud blocks and remove point clouds whose distance from the vertical plane is less than a first threshold.
[0117] A ground plane is fitted to the point cloud blocks after removing the point cloud, resulting in a fitted plane.
[0118] Check whether the fitted plane meets the preset test conditions;
[0119] If the fitted plane meets the test conditions, then the fitted plane is retained.
[0120] In an optional embodiment, the fitting module 420 is further configured to:
[0121] Select the point cloud with the lowest height from the point cloud blocks at a predetermined proportion as the seed point cloud;
[0122] Principal component analysis was performed on the seed point cloud.
[0123] The eigenvector with the smallest eigenvalue in the analysis results is determined as the normal vector of the fitting plane, and the fitting plane is generated.
[0124] If the inclination angle of the fitted plane is greater than the second threshold, then the fitted plane is determined to be a vertical plane.
[0125] In an optional embodiment, the fitting module 420 is further configured to:
[0126] Select the point cloud with the lowest height from the point cloud blocks after removing the point cloud as the seed point cloud;
[0127] Principal component analysis was performed on the seed point cloud.
[0128] The eigenvector with the smallest eigenvalue in the analysis results is determined as the normal vector of the fitting plane, and the fitting plane is generated.
[0129] Points in the point cloud block whose distance to the fitting plane is less than the third threshold are used as seed point clouds. The principal component analysis of the seed point clouds is performed repeatedly until the number of iterations reaches the threshold.
[0130] In an optional embodiment, the fitting module 420 is further configured to:
[0131] Detect whether the tilt angle of the fitted plane is less than a fourth threshold; and / or,
[0132] Detect whether the minimum eigenvalue of the fitted plane at the time of the last fitting is less than the fifth threshold; and / or,
[0133] The test checks whether the ratio of the largest eigenvalue and the second largest eigenvalue of the fitted plane at the last fitting is less than the sixth threshold.
[0134] In summary, the ground point cloud segmentation device provided in this application, after segmenting the point cloud to be segmented using a polar coordinate grid, can fit the obtained point cloud blocks to obtain a fitting plane. Since the point cloud block at the center position is close enough to an autonomous vehicle, the center fitting plane corresponding to the point cloud block is determined as the ground. Then, the water-filling algorithm is used to form a first fitting ground by combining the center fitting plane and multiple fitting planes connected to the center fitting plane. The vertex height of the remaining fitting planes is predicted based on the first fitting ground, and a second fitting ground is generated based on the predicted vertex height. Finally, point clouds below the first and second fitting planes are marked as ground, and point clouds above the first and second fitting planes are marked as non-ground. In this way, non-flat ground such as slopes, bridges, and tunnels can be correctly segmented, achieving fast and robust ground segmentation, and providing a good guarantee for improving the performance of laser sensing.
[0135] One embodiment of this application provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the ground point cloud segmentation method as described above.
[0136] One embodiment of this application provides a computing unit, which includes a processor and a memory. The memory stores at least one instruction, which is loaded and executed by the processor to implement the ground point cloud segmentation method as described above.
[0137] It should be noted that the ground point cloud segmentation device provided in the above embodiments is only illustrated by the division of the above functional modules when performing ground point cloud segmentation. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the ground point cloud segmentation device can be divided into different functional modules to complete all or part of the functions described above. In addition, the ground point cloud segmentation device and the ground point cloud segmentation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0138] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0139] The above description is not intended to limit the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for segmenting ground point clouds, characterized in that, The method includes: The point cloud to be segmented is segmented using a polar coordinate grid to obtain multiple point cloud blocks; The point cloud blocks are sequentially fitted with a vertical plane and a ground plane to obtain a fitting plane. The first fitting ground is formed by using a water-filling algorithm to combine the central fitting plane and multiple fitting planes connected to the central fitting plane. The central fitting plane is the fitting plane corresponding to the point cloud block at the center position. The vertex heights of the remaining fitted planes are predicted based on the first fitted ground, and a second fitted ground is generated based on the predicted vertex height values. Point clouds that are lower than the first and second fitted ground planes are marked as ground, and point clouds that are higher than the first and second fitted ground planes are marked as non-ground. The step of predicting the fitting height of the remaining fitting planes based on the first fitted ground surface includes: for each remaining point cloud block corresponding to a fitting plane, if the point cloud block has a water-filled area along the circumferential direction of the polar coordinate grid, then the vertex height of the point cloud block is predicted based on the water-filled area and the point cloud blocks located inside the point cloud block, where the water-filled area is the point cloud block corresponding to the fitting plane in the first fitted ground surface; if the point cloud block does not have a water-filled area along the circumferential direction of the polar coordinate grid, then the vertex height of the point cloud block is predicted based on the point cloud blocks located inside the point cloud block and on its left and right sides.
2. The ground point cloud segmentation method according to claim 1, characterized in that, The step of using a water-filling algorithm to form a first fitting ground plane consisting of a central fitting plane and multiple fitting planes connected to the central fitting plane includes: Add the point cloud block corresponding to the center fitting plane as a candidate block to the block set; Traverse the point cloud blocks adjacent to each candidate block in the block set, and obtain the height of the fitting plane corresponding to the point cloud block at the two common endpoints and the height of the fitting plane corresponding to the adjacent candidate block at the two common endpoints. The two common endpoints are the two endpoints of the common edge between the point cloud block and the candidate block. If the absolute value of the height difference between the fitting plane corresponding to the point cloud block and the fitting plane corresponding to the candidate block at each common endpoint is less than the error tolerance threshold, then the point cloud block is added to the block set as a candidate block; the step of traversing the point cloud blocks adjacent to each candidate block in the block set is executed repeatedly until there are no point cloud blocks that can be added to the block set. The fitting planes corresponding to each candidate block in the block set are used to form the first fitting ground.
3. The ground point cloud segmentation method according to claim 1 or 2, characterized in that, The step of sequentially performing vertical plane fitting and ground plane fitting on the point cloud blocks to obtain a fitting plane includes: A vertical plane is fitted to the point cloud block, and point clouds whose distance from the vertical plane is less than a first threshold are removed. A ground plane is fitted to the point cloud blocks after removing the point cloud to obtain a fitting plane; Detect whether the fitted plane meets the preset test conditions; If the fitted plane satisfies the test conditions, then the fitted plane is retained.
4. The ground point cloud segmentation method according to claim 3, characterized in that, The fitting of the point cloud block to a vertical plane includes: Select the point cloud with the lowest height from the point cloud blocks as the seed point cloud; Principal component analysis was performed on the seed point cloud. The eigenvector with the smallest eigenvalue in the analysis results is determined as the normal vector of the fitting plane, and the fitting plane is generated. If the inclination angle of the fitted plane is greater than the second threshold, then the fitted plane is determined to be a vertical plane.
5. The ground point cloud segmentation method according to claim 3, characterized in that, The step of performing ground plane fitting on the point cloud blocks after removing the point cloud to obtain a fitting plane includes: Select the point cloud with the lowest height from the point cloud blocks after removing the point cloud as the seed point cloud; Principal component analysis was performed on the seed point cloud. The eigenvector with the smallest eigenvalue in the analysis results is determined as the normal vector of the fitting plane, and the fitting plane is generated. Points in the point cloud block whose distance to the fitting plane is less than a third threshold are used as seed point clouds. The step of performing principal component analysis on the seed point clouds is repeated until the number of iterations reaches the threshold.
6. The ground point cloud segmentation method according to claim 3, characterized in that, The step of detecting whether the fitted plane meets the preset test conditions includes: Detect whether the tilt angle of the fitted plane is less than a fourth threshold; and / or, Detect whether the minimum eigenvalue of the fitted plane at the last fitting is less than a fifth threshold; and / or, The ratio of the largest eigenvalue and the second largest eigenvalue of the fitted plane at the last fitting is detected to be less than a sixth threshold.
7. A ground point cloud segmentation device, characterized in that, The device includes: The segmentation module is used to segment the point cloud to be segmented using polar coordinate grids to obtain multiple point cloud blocks; The fitting module is used to sequentially perform vertical plane fitting and ground plane fitting on the point cloud blocks to obtain a fitting plane; The water injection module is used to form a first fitting ground by using a water injection algorithm to combine the central fitting plane and multiple fitting planes connected to the central fitting plane. The central fitting plane is the fitting plane corresponding to the point cloud block at the center position. The generation module is used to predict the vertex height of the remaining fitting plane based on the first fitted ground surface, and generate a second fitted ground surface based on the predicted vertex height values. A labeling module is used to label point clouds that are lower than the first fitted ground and the second fitted ground as ground, and to label point clouds that are higher than the first fitted ground and the second fitted ground as non-ground; The generation module is further configured to, for each remaining point cloud block corresponding to a fitting plane, if the point cloud block has a water-filled area along the circumferential direction of the polar coordinate grid, predict the vertex height of the point cloud block based on the water-filled area and the point cloud block located inside the point cloud block, wherein the water-filled area is the point cloud block corresponding to the fitting plane in the first fitting ground; if the point cloud block does not have a water-filled area along the circumferential direction of the polar coordinate grid, predict the vertex height of the point cloud block based on the point cloud blocks located inside the point cloud block and on the left and right sides of the point cloud block.
8. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the ground point cloud segmentation method as described in any one of claims 1 to 6.
9. A computing unit, characterized in that, The computing unit includes a processor and a memory, the memory storing at least one instruction, which is loaded and executed by the processor to implement the ground point cloud segmentation method as described in any one of claims 1 to 6.