A method, system and readable medium for segmenting ground points based on key points

By extracting and segmenting key points and dividing all points with them as the benchmark, the problem of long calculation time for ground point cloud segmentation in the prior art is solved, and a fast and accurate segmentation effect is achieved.

CN114332414BActive Publication Date: 2025-04-29CHENGDU JOUAV DA PENG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210017644.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-07
Publication Date
2025-04-29
Estimated Expiration
2042-01-07

AI Technical Summary

Technical Problem

The prior art has a long calculation time when segmenting ground point cloud data, making it difficult to achieve fast and accurate segmentation.

Method used

By extracting key points, segmenting key points, and using key points as the benchmark, all points are divided to achieve fast and accurate ground point cloud segmentation. Specific steps include grid processing, key point segmentation, calculating target distance, judging and extracting ground points, and merging ground points.

Benefits of technology

This method can quickly and accurately segment ground points, reduce the calculation time using conventional segmentation algorithms, and improve the efficiency of ground point segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332414B_ABST
    Figure CN114332414B_ABST
Patent Text Reader

Abstract

The present invention discloses a ground point cloud segmentation method, system and readable medium based on key points. The original point cloud is processed to obtain a first point cloud, the first point cloud is gridded, and the point with the smallest Z direction value is selected as the key point from the points corresponding to each grid. All the key points are segmented by a segmentation algorithm, the key points are segmented into key ground points and non-ground points, and all the points in each grid are merged into a point set. The target distances of all the points in each grid and the corresponding key ground points or the measurement reference targets obtained according to the key ground points are calculated, and the ground points in the entire point cloud are segmented quickly and accurately by comparison with a set threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a ground point cloud segmentation method, system and readable medium based on key points. Background Art

[0002] LiDAR can quickly and non-contactly acquire surface data of a large number of objects and high-precision three-dimensional spatial data, and has been widely used in the fields of electricity, surveying and mapping, forestry, etc. In the processing of point cloud data, segmenting ground points is a very important link, which prepares for the generation of subsequent DTM data, DSM data, building models and other data. LiDAR can collect hundreds of thousands or even millions of point data per second, and the amount of data is very huge.

[0003] Some conventional algorithms currently used in the market, such as the progressive morphological filtering algorithm, require a lot of computing time. Therefore, how to quickly and accurately segment ground points is a problem that the present invention needs to solve. Summary of the invention

[0004] In view of this, the present invention provides a ground point cloud segmentation method, system and readable medium based on key points, which can quickly and accurately segment ground points by extracting key points, segmenting the key points, and then segmenting all points based on the key points.

[0005] The present invention provides a ground point cloud segmentation method based on key points, the method comprising:

[0006] S1: Grid the first point cloud, form the points in each grid into a point set Bi, and then grid each point set B i The point with the minimum value in the Z direction is taken as the key point;

[0007] S2: Segment the key points into key ground points P i with key non-ground points;

[0008] S3: Based on key ground points P i Or the point set A i Calculate the corresponding measurement reference target and calculate the point set B i Each point B ij Target distance d to the corresponding measurement reference target ij ;

[0009] S4: Determine the target distance d ij Is it less than the set threshold? If so, the point is extracted as a ground point;

[0010] S5: Merge the ground points to generate a final ground point set C.

[0011] Preferably, the first point cloud is:

[0012] The original point cloud is filtered to remove isolated points in the original point cloud data, and the point set obtained is the first point cloud.

[0013] Preferably, the process of meshing the first point cloud is:

[0014] Obtain the circumscribed rectangle of the first point cloud on the projection plane, divide the circumscribed rectangle into a number of two-dimensional grids of the same size, and divide the first point cloud into a number of grids based on the correspondence between the first point cloud and the projection to form a number of point sets B i .

[0015] Preferably, the key points are segmented into key ground points P according to a segmentation algorithm. i The steps with key non-ground points include:

[0016] Merging the key points to generate a second point cloud;

[0017] Use the ground point segmentation algorithm to segment the key points in the second point cloud into key ground points P i with the key non-ground points.

[0018] Optionally, step S3 includes:

[0019] The key ground point set A i The key ground point P in i As the measurement reference target, calculate the point set B i Each point B ij The distance from the reference target in the Z direction is the target distance d ij .

[0020] Optionally, step S3 includes:

[0021] For the key ground point set A i Perform local plane fitting to generate fitting plane F;

[0022] The fitting plane F is used as the measurement reference target; the point set B is calculated; i Each point B ij The distance between the fitting plane F and the target distance d is obtained ij .

[0023] Optionally, step S3 includes:

[0024] According to point set A i , for point set B i Each point B in ij Perform interpolation calculation to generate point set B i Each point B ijThe interpolation point P in the corresponding XY plane c , P c As a measurement reference target;

[0025] Calculate point B ij and the corresponding interpolation point P c The distance between them is the target distance d ij .

[0026] Optionally, the interpolation calculation method includes at least one or more of an inverse distance weighted method, a Kriging method, a natural domain method, and a spline function method.

[0027] The present invention provides a ground point cloud segmentation system based on key points, the system comprising:

[0028] Point cloud segmentation module: used to segment the key points into key ground points P i with key non-ground points;

[0029] Data operation module: used to calculate the key ground point P i Or the point set A i Calculate the corresponding measurement reference target and calculate the point set B i Each point B ij Target distance d to the corresponding measurement reference target ij ; Determine the target distance d ij Is it less than the set threshold? If so, the point is extracted as a ground point;

[0030] Point cloud synthesis module: used to merge the ground points to generate the final ground point set C.

[0031] The present invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned ground point cloud segmentation methods.

[0032] The present invention grids the point cloud, selects key points from the points corresponding to each grid, first segments all the key points, segments the key points into key ground points and non-ground points, and merges all the points in each two-dimensional grid into a point set, calculates the target distances of all points in each grid and the corresponding key ground points or the measurement reference targets obtained according to the key ground points, and quickly and accurately obtains the ground points in the entire point cloud by comparing with a set threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The figure is a flowchart of a ground point cloud segmentation method based on key points.

[0034] Figure 2 Schematic diagram of the plane projection of the point cloud. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods.

[0036] The present invention provides a ground point cloud segmentation method based on key points, as shown in the figure, the method includes:

[0037] S1: Grid the first point cloud and form a point set B with the points in each grid. i , for each point set B i The point with the minimum value in the Z direction is taken as the key point;

[0038] S2: Segment the key points into key ground points P i with key non-ground points;

[0039] S3: Based on key ground points P i Or the point set A i Calculate the corresponding measurement reference target and calculate the point set B i Each point B ij Target distance d to the corresponding measurement reference target ij ;

[0040] S4: Determine the target distance d ij Is it less than the set threshold? If so, the point is extracted as a ground point;

[0041] S5: Merge the ground points to generate a final ground point set C.

[0042] Specifically, the method performs filtering processing on the collected raw point cloud data to eliminate discrete isolated points. In a preferred embodiment, the method uses the PCL library programming environment under VisualStudio to perform radius filtering processing on each point in the point cloud data. For example, the filter radius is set to 0.5m, and the filter threshold is set to 10. The isolated points with less than 10 points within the radius of 0.5m are filtered out to obtain the first point cloud.

[0043] Get the maximum and minimum points of the first point cloud in the X and Y directions (X min , X max , Y min , Y max ), generate a circumscribed rectangle of the point cloud in the XY plane, and divide the circumscribed rectangle into two-dimensional grids according to a certain length.

[0044] like Figure 2 As shown, the first point cloud is projected onto a two-dimensional grid, a projection of a point is generated on the two-dimensional grid, and a point set B consisting of all points in each grid is obtained. i .

[0045] Specifically, through the formula Calculate the projection position of each point on the two-dimensional grid (I x ,I y ), record the index position of each point in the point cloud in the corresponding grid, and according to the index position of each point, all the corresponding points in the grid form a point set B i .

[0046] Compare the values ​​of all points in each grid in the Z direction, and record the point with the smallest value in the Z direction as the key point.

[0047] In the above preferred embodiment, the smallest point in the Z direction in each grid is determined as the key point for the next step of segmentation of key ground points. In other embodiments of the present application, the range of key point selection can be expanded according to the calculation needs. For example, the lowest point in each grid of all records is traversed, and other points within a certain range of each lowest point are determined, and the average height h of these adjacent points is calculated. a , and according to the average height h a Get the average height h of each lowest point in the grid a The close points are taken as key points.

[0048] In this step, the point with the smallest value in the Z direction in each grid or the point close to the average height in the corresponding grid is used as the key point to segment some points in the point cloud.

[0049] The key points are merged to generate a second point cloud, and the ground point segmentation algorithm is used to segment the key points and filter the non-ground points to obtain the key ground points P i .

[0050] For example, as a preferred implementation method, the PCL library can be used to perform a progressive morphological filtering method to segment the key points and filter the non-ground points to obtain the key ground points P i .

[0051] Specifically, the preferred filtering process of this application includes:

[0052] Through the formula w k =nk+1 sets the filter window size w, where k is the number of iterations and n is the iteration step size;

[0053] The erosion operation starts from the lower left corner of the two-dimensional grid, and moves from left to right and from bottom to top with a window size of w×w. The minimum value of the height of the key point in the window is calculated and assigned to the height of the key point after erosion erodeZ;

[0054] The dilation operation starts from the lower left corner of the two-dimensional grid, and moves from left to right and from bottom to top with a window size of w×w. The maximum value of the height erodeZ of the key point after erosion in the window is calculated and assigned to the height dilateZ of the key point after dilation.

[0055] According to the height difference threshold calculation formula

[0056]

[0057] Calculate the height difference threshold heightThd, where dh is the initial height difference threshold, s is the slope, c is the two-dimensional grid, and dh is the height difference threshold. max is the maximum height difference threshold;

[0058] Determine whether the key point is a key ground point P i , calculate the difference between the height dilateZ of the key point after expansion and the height of the key point. If the difference is less than or equal to the height difference threshold, the key point is a key ground point P i , if not, it is a non-ground point;

[0059] According to the filter window size calculation formula, gradually increase the window size and repeat the above steps until termination.

[0060] Through the PCL library, the key ground point P i Generate a quadtree data structure for the data source;

[0061] Through the quadtree data structure, obtain each key ground point P i and the N key ground points P closest to this point i , forming point set A i .

[0062] In this embodiment, the measurement reference target is the key ground point P corresponding to each grid. i , calculate point set B i Each point B j and the corresponding key ground point P i Distance d in the Z direction ij , the formula is d ij =|z i -z j |;

[0063] Judgement ij Is it less than the set threshold? If so, the point is a ground point; if not, the point is a non-ground point.

[0064] Through the PCL library, all ground points are merged to generate the final ground point set C.

[0065] Embodiment 2:

[0066] In this embodiment, step S3 is implemented by the following steps:

[0067] Point set A i The key ground point P in i Perform plane fitting and calculate point set B i Each point B ij The distance d to the fitting plane F ij .

[0068] For example, as a preferred implementation method, the present method can perform plane fitting through the RANSAC algorithm in MATLAB to obtain the four parameter values ​​of A, B, C, and D in the plane parameter equation A×x+B×y+C×z+D=0, where x, y, and z are any key ground point P in the point set A. i The coordinate value of the plane is recorded as F;

[0069] By formula Calculate point set B i The distance d from each point Bj to the fitting plane F ij , where x j ,y j 、z j For point set B i Midpoint B j The coordinate value of .

[0070] Embodiment three:

[0071] In this embodiment, step S3 is implemented by the following steps:

[0072] According to point set A i The key ground point P in i Perform interpolation calculations, generate new interpolation points, and calculate point set B i Each point B ij The distance d to the corresponding interpolation point ij .

[0073] For example, as a preferred implementation means, the method can obtain point set B i Each point B ij (x j ,y j , z j ) in the XY plane (x j ,y j ), according to the point set A i The key ground point P in i , using an interpolation algorithm, such as the inverse distance weighted function in MATLAB, to calculate (x j ,y j ) corresponds to z ci The value of generates a new interpolation point Pci (x ci ,y ci , z ci ), through the formula Calculate each point B in the point set j To the interpolation point P ci The distance d ij .

[0074] In the second embodiment and the third embodiment provided by the present invention, the measurement reference target is determined by plane fitting and interpolation point calculation, so that the segmentation result has a higher calculation accuracy.

[0075] By first segmenting the key points among all points, and then segmenting all points according to the key ground points to obtain the final complete ground points, the calculation time of using conventional segmentation algorithms is reduced, the efficiency of ground point segmentation is improved, and the ground points can be segmented accurately and quickly.

[0076] The present invention also provides a ground point cloud segmentation system based on key points, the system comprising:

[0077] Point cloud segmentation module: used to segment the key points into key ground points P i with key non-ground points;

[0078] Data operation module: used to calculate the key ground point P i Or the point set A i Calculate the corresponding measurement reference target and calculate the point set B i Each point B ij Target distance d to the corresponding measurement reference target ij ; Determine the target distance d ij Is it less than the set threshold? If so, the point is extracted as a ground point;

[0079] Point cloud synthesis module: used to merge the ground points to generate the final ground point set C.

[0080] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned ground point cloud segmentation methods.

[0081] The above are only preferred embodiments of the present invention. It should be noted that the above preferred embodiments should not be regarded as limiting the present invention, and the protection scope of the present invention should be based on the scope defined by the claims. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the spirit and scope of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A ground point cloud segmentation method based on key points, characterized in that: The method comprises the steps of: S1: Obtain the circumscribed rectangle of the first point cloud on the projection plane, divide the circumscribed rectangle into a number of two-dimensional grids of the same size, divide the first point cloud into a number of grids based on the correspondence between the first point cloud and the projection, and form a point set B from the points in each grid i , for each point set B i The point with the minimum value in the Z direction is taken as the key point; S2: Merge the key points to generate a second point cloud, and use a ground point segmentation algorithm to segment the key points in the second point cloud into key ground points P i with key non-ground points; S3: Based on key ground points P i Or the point set A i Calculate the corresponding measurement reference target and calculate the point set B i Each point B ij Target distance d to the corresponding measurement reference target ij ; S4: Determine the target distance d ij Is it less than the set threshold? If so, the point is extracted as a ground point; S5: Merge the ground points to generate a final ground point set C.

2. The ground point cloud segmentation method based on key points according to claim 1, characterized in that: The first point cloud is: The original point cloud is filtered to remove isolated points in the original point cloud, and the point set obtained is the first point cloud.

3. The ground point cloud segmentation method based on key points according to claim 1, characterized in that: The step S3 comprises: The key ground point set A i The key ground point P in i As the measurement reference target, calculate the point set B i Each point B ij The distance from the reference target in the Z direction is the target distance d ij .

4. The ground point cloud segmentation method based on key points according to claim 1, characterized in that: The step S3 comprises: For the key ground point set A i Perform local plane fitting to generate the fitting plane F. The fitting plane F is used as the measurement reference target; the point set B is calculated; i Each point B ij The distance between the fitting plane F and the target distance d is obtained ij .

5. The ground point cloud segmentation method based on key points according to claim 1, characterized in that: The step S3 comprises: According to point set A i , for point set B i Each point B in ij Perform interpolation calculation to generate point set B i Each point B ij The interpolation point P in the corresponding XY plane c , P c As a measurement reference target; Calculate point B ij and the corresponding interpolation point P c The distance between them is the target distance d ij .

6. The ground point cloud segmentation method based on key points according to claim 5, characterized in that: The interpolation calculation method includes at least one or more of the following: inverse distance weighted method, Kriging method, natural domain method, and spline function method.

7. A ground point cloud segmentation system based on key points, used to implement the ground point cloud segmentation method based on key points according to any one of claims 1 to 6, characterized in that: The system comprises: Point cloud preprocessing module: used to grid the first point cloud and form the points in each grid into a point set B i , for each point set B i The point with the minimum value in the Z direction is taken as the key point; Point cloud segmentation module: used to segment the key points into key ground points P i with key non-ground points; Data operation module: used to calculate the key ground point P i Or the point set A i Calculate the corresponding measurement reference target and calculate the point set B i Each point B ij Target distance d to the corresponding measurement reference target ij ; Determine the target distance d ij Is it less than the set threshold? If so, the point is extracted as a ground point; Point cloud synthesis module: used to merge the ground points to generate the final ground point set C.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the ground point cloud segmentation method described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Laser point cloud ground segmentation method and device, computing equipment and storage medium

    CN111445472A