A method and system for extracting ground points from point clouds based on three-dimensional Alpha-shape algorithm
Through a method based on the three-dimensional Alpha-shape algorithm, the Delaunay tetrahedral grid and the rolling ball radius are used to extract ground points, which solves the problem of poor ground point extraction in the existing technology and achieves efficient and low-parameter ground point extraction. It is suitable for a variety of terrain scenarios and reduces the computational burden.
Patent Information
- Application Number
- CN202410277783.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-03-12
AI Technical Summary
Existing ground point extraction methods are not effective in steep mountainous areas, and parameter settings are complex and easy to misclassify. Cloth simulation filtering is not effective on undulating terrain, and the existing implementation of the three-dimensional Alpha-shape algorithm uses a large amount of memory and takes a long time to calculate. It is long and cannot be directly used for ground point extraction.
A method based on the three-dimensional Alpha-shape algorithm is used to extract ground points from the airborne lidar point cloud. By constructing a Delaunay tetrahedral grid and generating uniformly distributed detection line segments, the rolling ball radius is used to extract ground points, reducing the number of parameters and Improve extraction efficiency.
It achieves efficient extraction of ground points with fewer parameters, is suitable for scenes with many buildings and large terrain undulations, has small memory usage, fast calculation speed, and has anti-noise capabilities.
Smart Images

Figure CN118015294B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of aerial surveying and mapping, and in particular to a method and system for extracting ground points from a point cloud based on a three-dimensional Alpha-shape algorithm. Background Art
[0002] Ground point extraction is one of the most important tasks in airborne LiDAR point cloud data processing. It is not only the basis for generating digital elevation models (DEM), but also the basis for subsequent semantic classification of building points, vegetation points, power line points, vehicle points, etc. The effect of ground point extraction directly affects the accuracy of point cloud semantic classification and DEM elevation accuracy.
[0003] In the prior art, researchers have proposed many methods for extracting ground points. Currently, the commonly used methods mainly include progressive triangulation encryption filtering, cloth simulation filtering, and improved versions of these two methods. The progressive triangulation encryption filtering method uses more parameters and is not effective for steep peaks. If the parameters are not set properly, it is easy to classify large areas of low buildings as ground points. Cloth simulation filtering is more suitable for flat land, and is not effective for surveying areas with large undulations and complex terrain. The ConcaveHull class of the open source software PCL (Point Cloud Library) provides the function of extracting three-dimensional surface points using three-dimensional Alpha-shape. However, it uses all points for Delaunay tetrahedron partitioning, which uses a large amount of memory and takes a long time to calculate. In addition, the extracted points are three-dimensional surface points and cannot be directly used for ground point extraction. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to address the deficiencies in the prior art and to provide a method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm, with the aim of reducing the number of parameters used in the calculation and achieving better ground point extraction effects using only fewer parameters.
[0005] At the same time, the present invention also provides a system for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm to solve the above-mentioned problem.
[0006] Technical solution: The present invention discloses a method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm, and extracting ground points from point clouds collected by an airborne laser radar. The specific steps are as follows:
[0007] S1, treat the extracted point cloud S extract Build indexes;
[0008] S2, treat the extracted point cloud S extract Construct a Delaunay tetrahedral mesh;
[0009] S3, according to the point cloud S to be extracted extract Generate uniformly distributed detection line segments projected on the XY plane within the coordinate range;
[0010] S4. Calculate all tetrahedral triangles that each detection line segment passes through, and sort the tetrahedral triangles that pass through according to the Z coordinates of the intersection points. The specific steps are as follows:
[0011] S41, let the detection line segment set S line The i-th detection line segment L in i The plane coordinates of the endpoints are (x i ,y i );Traverse all tetrahedrons in the Delaunay tetrahedron mesh and set the jth tetrahedron to be T j , traverse T j The four triangles on the surface are found to have a projection on the XY plane containing (xx, y i ) and add it to the set S Δ,j,i ;
[0012] S42, traverse S Δ,j,i The triangle inside, calculate the triangle and L i The intersection point P ip , add the intersection set S ip,j,i , add the triangle to the intersecting triangle set I i ;
[0013] S5. Using the three-dimensional Alpha-shape algorithm to extract ground points, the steps specifically include:
[0014] S51, for the i-th detection line segment L i , traverse the intersecting triangle set I in order from small to large Z coordinates of the intersection points i inner triangle;
[0015] S52. Assume that the vertices of the current triangle are P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3). The radius of the rolling ball used by the Alpha-shape algorithm is R. Calculate the two possible centers of the rolling ball with radius R and P1, P2, and P3 all on the spherical surface. If there is a valid solution for the coordinates of the center of the ball, select the center with the smaller Z coordinate as the final center P. o ;
[0016] S53, in S extract Search for P o In the spherical neighborhood with R as the center and R as the radius, are there other points besides P1, P2, and P3? If not, then ΔP1P2P3 is called a ground point triangle, and P1, P2, and P3 are added to the initial ground point set S.grd , stop from L i Continue to extract ground points and process the next detection line segment;
[0017] S6, based on the initial ground point set S grd , extract ground points from the original point cloud and add the extracted ground points to the final ground point set S′ grd .
[0018] The technical solution of the present invention is further defined as follows: the specific steps of generating detection line segments uniformly distributed on the XY plane in step S3 include:
[0019] S31, calculate the point cloud S to be extracted extract The three-dimensional enclosing box E of min , the maximum X coordinate is x max , the minimum Y coordinate is y min , the maximum Y coordinate is y max , the minimum Z coordinate is z min , the maximum Z coordinate is z max ;
[0020] S32, generate a fall in S extract The detection points are evenly distributed in the coverage area of the XY plane and projected on the XY plane in a rectangular grid shape, and the grid spacing is d;
[0021] S33, generate a detection line segment corresponding to the detection point, assuming that the plane coordinates of a detection point p are (x p ,y p ), then the corresponding detection line segment L p The two endpoints are (x p ,y p , z min ) and (x p ,y p , z max ), L p Add the detection line segment set S Line .
[0022] Furthermore, the search for the projection on the XY plane in step S41 includes (x i ,y i ) is as follows: suppose the vertices of a triangle ΔP1P2P3 are P1(x1, y1, z1), P2(x2, y2, z1) and P3(x3, y3, z3), then the projection of ΔP1P2P3 on the XY plane forms a triangle ΔP A P B P C , whose vertices are P A (x1, y1), P B(x2, y2), P C (x3, y3); determine the point P(x i ,y i ) is within ΔP A P B P C The following methods can be used: If The same sign (positive and negative), then P is in ΔP A P B P C Inside.
[0023] Furthermore, the final circle center P in step S52 o The calculation method is:
[0024] S521, calculate the radius R of the circumscribed circle of ΔP1P2P3 outcircle :
[0025]
[0026] Where p = (|P1P2| + |P2P3| + |P3P1|) / 2, if R < R outcircle , then there is no valid rolling ball, otherwise go to step 522;
[0027] S522, calculate the coordinates (x c ,y c , z c ):x c =(C x M+C y , N xy +C z N xz ) / Q,y c =(C x N yx +C y M+C z N yz ) / Q,z c =(C x N zx +C y N zy +C z M) / Q,
[0028] Where g1=|P1| 2 / 2 , g2=|P2| 2 / 2 , g3=|P3| 2 / 2 ,
[0029] S523, calculate the normal vector N of ΔP1P2P3, and set the normalized N=(a, b, c);
[0030] S524, if c>0, take P o =(x c -aE,y c -bE,z c -cE); if c<0, take
[0031] P o =(x c +aE,y c +bE,z c +cE); where
[0032] Furthermore, the method for extracting ground points from the original point cloud in step S6 is: orig Located in P o Add the final ground point set S' to the point inside the sphere with the center and radius R grd .
[0033] Furthermore, the method for extracting ground points from the original point cloud in step S6 is: orig Search and initial ground point set S grd The distance of the points within is less than the threshold d thre points to form a new point cloud S to be extracted extract , use a smaller grid spacing, repeat steps S2-S5, and add the extracted ground points to the final ground point set S′ grd .
[0034] Furthermore, the method for extracting ground points from the original point cloud in step S6 is: traverse the ground triangles, for a single ground triangle, orig Search for the neighborhood points of the three vertices in the graph to form a neighborhood point set S neighb , by neighb Extract different 3-point combinations, use the method in steps S52 and S53 to extract ground points, and add the extracted ground points to the final ground point set S′ g,d .
[0035] The present invention also provides another technical solution: a system for implementing any of the above-mentioned methods for extracting ground points from a point cloud based on a three-dimensional Alpha-shape algorithm.
[0036] Beneficial effects: The present invention provides a method and system for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm. The method extracts ground points from airborne laser radar point clouds with few parameters and is easy to use. The most important parameter is the rolling ball radius. By adjusting the rolling ball radius, the method can be used for residential areas with many buildings, as well as forests and bare land with few buildings and large terrain undulations. The method does not use all point clouds to construct tetrahedral meshes, so the memory usage is small and the calculation speed is fast. At the same time, the method has a certain anti-noise ability for a small number of noise points below the ground. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flow chart of a method for extracting ground points from a point cloud based on a three-dimensional Alpha-shape algorithm provided by the present invention;
[0038] Figure 2 It is a schematic diagram of the distribution of detection points in the XY plane of the present invention;
[0039] Figure 3 It is a schematic diagram of the distribution of the detection line segments in the Z coordinate direction of the present invention;
[0040] Figure 4 is a schematic diagram of the present invention for detecting line segments and calculating intersections of tetrahedrons;
[0041] Figure 5 It is a schematic diagram of the three-dimensional Alpha-shape algorithm of the present invention. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the embodiments.
[0043] Embodiment 1: The present invention provides a method for extracting ground points from a point cloud based on a three-dimensional Alpha-shape algorithm, and extracting ground points from an airborne laser radar point cloud based on Delaunay tetrahedron decomposition and a three-dimensional Alpha-shape algorithm. The flow chart is as follows: Figure 1 As shown, the specific steps are as follows.
[0044] S1, for the original point cloud S orig Denoising and simplification are performed to obtain the simplified point cloud S simp , to simplify the point cloud S simp As the point cloud S to be extracted extract , for S extract Build the index.
[0045] In this embodiment, point cloud denoising especially needs to completely remove noise points located under the ground. Point cloud simplification can adopt spatial bounding box method, clustering-based method, normal deviation method, curvature simplification method, average point distance method and uniform grid division method. Point cloud index can be KD tree or octree.
[0046] S2, treat the extracted point cloud S extract Construct a Delaunay tetrahedral mesh.
[0047] In this embodiment, the Bowyer-Watson algorithm or the incremental flipping algorithm may be used to generate the Delaunay tetrahedral mesh.
[0048] S3, generate detection line segments that are evenly distributed on the XY plane. The distribution of detection points on the XY plane is as follows: Figure 2 As shown, the closed black lines surround the point cloud coverage area, and the black dots are detection points.
[0049] Specifically include:
[0050] S31, calculate the point cloud S to be extracted extract The three-dimensional enclosing box E of min , the maximum X coordinate is x max , the minimum Y coordinate is y min , the maximum Y coordinate is y max , the minimum Z coordinate is z min , the maximum Z coordinate is z max .
[0051] S32, generate a fall in S extract The detection points are evenly distributed in the coverage area of the XY plane and projected on the XY plane in a rectangular grid shape, and the grid spacing is d.
[0052] S33, generate a detection line segment corresponding to the detection point, and assume that the projection coordinates of a detection point p on the XY plane are (x p ,y p ), then the corresponding detection line segment L p The two endpoints are (x p ,y p , z min ;) and (x p ,y p , z max ), L p Add the detection line segment set S line .
[0053] S4. Calculate all tetrahedral triangles that each detection line segment passes through, and sort the tetrahedral triangles that pass through according to the Z coordinates of the intersection points. The distribution diagram of the detection line segment in the Z coordinate direction is as follows: Figure 3 As shown in the figure, the black line segment is the detection line segment, and the gray area is the point cloud distribution area. The schematic diagram of calculating the intersection of the detection line segment and the tetrahedron is as follows Figure 4 shown.
[0054] The specific steps include:
[0055] S41, let the detection line segment set S line The i-th detection line segment L in i The plane coordinates of the endpoints are (x i ,y i );Traverse all tetrahedrons in the Delaunay tetrahedron mesh and set the jth tetrahedron to be T j , traverse T j The four triangles on the surface are found to have a projection on the XY plane containing (x i ,y i ) and add it to the set S Δ,j,i .
[0056] In this embodiment, assuming that the vertices of a triangle ΔP1P2P3 are P1(x1, y1, z1), P2(x2, y2, z2) and P3(x3, y3, z3), the projection of ΔP1P2P3 on the XY plane constitutes a triangle ΔP A P B P C , whose vertices are P A (x1, y1), P B (x2, y2), P C (x3, y3); determine the point P(x i ,y i ) is within ΔP A P B P C The following methods can be used: If The same sign (positive and negative), then P is in ΔP A P B P C Inside.
[0057] S42, traverse S Δ,j,i The triangle inside, calculate the triangle and L i The intersection point P ip , add the intersection set S ip,ji , add the triangle to the intersecting triangle set I i .
[0058] In this embodiment, assuming that the general plane equation of the current triangle is ax+by+cz+d=0, then the triangle and L i The intersection point P ip The coordinates of (xp ,y p ,-(ax p +by p +d) / c).
[0059] S5. Use the three-dimensional Alpha-shape algorithm to extract ground points. The schematic diagram of the three-dimensional Alpha-shape algorithm is as follows Figure 5 As shown, in (a), the center P is determined by P1, P2, P3 and radius R o , other points (represented by P4) to the center of the sphere P o If the distance between P4 and the center of the sphere P is greater than R, then P1, P2, and P3 are ground points; in (b), the distance between P4 and the center of the sphere P o If the distance is less than R, then P1, P2, and P3 are not ground points.
[0060] The steps include:
[0061] S51, for the i-th detection line segment L i , using S ip,j,i Traverse the set of intersecting triangles I in order from small to large Z coordinates of the intersection points i inside the triangle.
[0062] S52. Assume that the three vertices of the current triangle are P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3). The radius of the rolling ball used by the Alpha-shape algorithm is R. Calculate the two possible centers of the rolling ball with a radius of R and P1, P2, and P3 on the spherical surface. If there is a valid solution for the coordinates of the center of the ball, select the center with the smaller Z coordinate as the final center P. o .
[0063] In this embodiment, if the building in the point cloud is large, the rolling ball radius R can take a larger value, which is slightly larger than half of the longest dimension of the large building; if the building in the point cloud is small, the rolling ball radius R can take a smaller value, and the lower limit is half of the average ground point spacing designed by aerial photography. o The following steps can be used for calculation:
[0064] S521, calculate the radius R of the circumscribed circle of ΔP1P2P3 outcircle :
[0065]
[0066] in,
[0067]
[0068] If R < R outcircle , then there is no valid rolling ball, otherwise go to step S522.
[0069] S522, calculate the coordinates (x c ,y c , z c ):
[0070]
[0071]
[0072] Where g1=|P1| 2 / 2 , g2=|P2| 2 / 2 , g3=|P3| 2 / 2 ,
[0073] S523, calculate the normal vector N of ΔP1P2P3, and set the normalized N=(a, b, c).
[0074] S524, if c>0, take P o =(x c -aE,y c -bE,z c -cE); if c<0, take
[0075] P o =(x c +aE,y c +bE,z c +cE); where
[0076] S53, in S extract Search for P o In the spherical neighborhood with R as the center and R as the radius, are there other points besides P1, P2, and P3? If not, then ΔP1P2P3 is called a ground point triangle, and P1, P2, and P3 are added to the initial ground point set S. grd , stop from L i Continue to extract ground points and process the next detection line segment.
[0077] S6, based on the initial ground point set S grd , extract ground points from the original point cloud and add the extracted ground points to the final ground point set S′ grd .
[0078] In this embodiment, one of the following methods can be used to extract ground points from the original point cloud, including:
[0079] 1. S orig Located in P oAdd the final ground point set S' to the point inside the sphere with the center and radius R grd .
[0080] 2. In S orig Search and initial ground point set S grd The distance of the points within is less than the threshold d thre Points to be extracted constitute a new point cloud S extract , use a smaller grid spacing (about twice the spacing of the laser pulse foot points), repeat steps S2-S5, and add the extracted ground points to the final ground point set S′ grd .
[0081] 3. Traverse the ground triangles. For a single ground triangle, orig Search for the neighborhood points of the three vertices in the graph to form a neighborhood point set S neighb , by neighb Extract different 3-point combinations, use the method in steps S52 and S53 to extract ground points, and add the extracted ground points to the final ground point set S′ grd .
[0082] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes in form and details may be made without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm, wherein ground points are extracted from point clouds collected by an airborne laser radar, characterized in that: The specific steps are as follows: S1, treat the extracted point cloud S extract Build indexes; S2, treat the extracted point cloud S extract Construct a Delaunay tetrahedral mesh; S3, according to the point cloud S to be extracted extract Generate uniformly distributed detection line segments projected on the XY plane within the coordinate range; S4. Calculate all tetrahedral triangles that each detection line segment passes through, and sort the tetrahedral triangles that pass through according to the Z coordinates of the intersection points. The specific steps are as follows: S41, let the detection line segment set S line The i-th detection line segment L in i The plane coordinates of the endpoints are (x i ,y i );Traverse all tetrahedrons in the Delaunay tetrahedron mesh and set the jth tetrahedron to be T j , traverse T j The four triangles on the surface are found to have a projection on the XY plane containing (x i ,y i ) and add it to the set S Δ,j,i ; S42, traverse S Δ,j,i The triangle inside, calculate the triangle and L i The intersection point P ip , add the intersection set S ip,j,i , add the triangle to the intersecting triangle set I i ; S5. Using the three-dimensional Alpha-shape algorithm to extract ground points, the steps specifically include: S51, for the i-th detection line segment L i , traverse the intersecting triangle set I in order from small to large Z coordinates of the intersection points i inner triangle; S52. Assume that the vertices of the current triangle are P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3). The radius of the rolling ball used by the Alpha-shape algorithm is R. Calculate the two possible centers of the rolling ball with radius R and P1, P2, and P3 all on the spherical surface. If there is a valid solution for the coordinates of the center of the ball, select the center with the smaller Z coordinate as the final center P. o ; S53, in S extract Search for P o In the spherical neighborhood with R as the center and R as the radius, are there other points besides P1, P2, and P3? If not, then ΔP1P2P3 is called a ground point triangle, and P1, P2, and P3 are added to the initial ground point set S. grd , stop from L i Continue to extract ground points and process the next detection line segment; S6, based on the initial ground point set S grd , extract ground points from the original point cloud and add the extracted ground points to the final ground point set S′ grd ; The final circle center P in step S52 o The calculation method is: S521, calculate the radius R of the circumscribed circle of ΔP1P2P3 outcircle : Where p = (|P1P2| + |P2P3| + |P3P1|) / 2, if R < R outcircle , then there is no valid rolling ball, otherwise go to step 522; S522, calculate the coordinates (x c ,y c , z c ):x c =(C x M+C y N xy +C z N xz ) / Q,y c =(C x N yx +C y M+C z N yz ) / Q,z c =(C x N zx +C y N zy +C z M) / Q, Where g1=|P1| 2 / 2, g2=|P2| 2 / 2, g3=|P3| 2 / 2, S523, calculate the normal vector N of ΔP1P2P3, and set the normalized N=(a, b, c); S524, if c>0, take P o =(x c -aE,y c -bE,z c -cE); if c<0, take P o =(x c +aE,y c +bE,z c +cE); where 2. A method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm according to claim 1, characterized in that: The specific steps of generating detection line segments uniformly distributed on the XY plane in step S3 include: S31, calculate the point cloud S to be extracted extract The three-dimensional enclosing box E of min , the maximum X coordinate is x max , the minimum Y coordinate is y min , the maximum Y coordinate is y max , the minimum Z coordinate is z min , the maximum Z coordinate is z max ; S32, generate a fall in S extract The detection points are evenly distributed in the coverage area of the XY plane and projected on the XY plane in a rectangular grid shape, and the grid spacing is d; S33, generate a detection line segment corresponding to the detection point, and assume that the projection coordinates of a detection point p on the XY plane are (x p ,y p ), then the corresponding detection line segment L p The two endpoints are (x p ,y p , z min ) and (x p ,y p , z max ), L p Add the detection line segment set S Line .
3. The method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm according to claim 1, characterized in that: The search for the projection on the XY plane in step S41 includes (x i ,y i ) is as follows: suppose the vertices of a triangle ΔP1P2P3 are P1(x1, y1, z1), P2(x2, y2, z2) and P3(x3, y3, z3), then the projection of ΔP1P2P3 on the XY plane forms a triangle ΔP A P B P C , whose vertices are P A (x1, y1), P B (x2, y2), P C (x3, y3); determine the point P(x i ,y i ) is within ΔP A P B P C The following methods can be used: If The same sign (positive and negative), then P is in ΔP A P B P C Inside.
4. The method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm according to claim 1, characterized in that: The method for extracting ground points from the original point cloud in step S6 is: orig Located in P o Add the final ground point set S' to the point inside the sphere with the center and radius R grd .
5. The method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm according to claim 1, characterized in that: The method for extracting ground points from the original point cloud in step S6 is: orig Search and initial ground point set s grd The distance of the points within is less than the threshold d thre points to form a new point cloud S to be extracted extract , use a smaller grid spacing, repeat steps S2-S5, and add the extracted ground points to the final ground point set S′ grd .
6. The method for extracting ground points from point clouds based on a three-dimensional Alpha-shape algorithm according to claim 1, characterized in that:The method for extracting ground points from the original point cloud in step S6 is: traverse the ground triangles, for a single ground triangle, orig Search for the neighborhood points of the three vertices in the graph to form a neighborhood point set S neighb , by neighb Extract different 3-point combinations, use the method in steps S52 and S53 to extract ground points, and add the extracted ground points to the final ground point set S′ grd .
7. A system for implementing the method of extracting ground points from a point cloud based on a three-dimensional Alpha-shape algorithm as described in any one of claims 1 to 6.
