A three-dimensional point cloud data filtering method and system based on adaptive clustering segmentation and gradient compensation
By employing adaptive clustering segmentation and gradient compensation methods, the accuracy and efficiency issues of 3D point cloud data filtering algorithms in complex scenarios were resolved, enabling the generation of high-precision digital elevation models.
Patent Information
- Application Number
- CN202510478262.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-04-16
AI Technical Summary
Existing 3D point cloud data filtering algorithms are prone to under-filtering or filtering in complex scenes, making it difficult to balance accuracy and efficiency. They are particularly prone to failure in areas where low-lying features overlap with ground points, and they are also difficult to cope with sudden changes in local slope in non-uniform terrain.
An adaptive clustering segmentation and gradient compensation method is adopted. Multi-dimensional features are established through an adaptive clustering segmentation algorithm based on density spatial distribution. Combined with a coarse-fine granular grid hierarchical processing strategy, point cloud data is filtered.
It significantly improves the filtering accuracy and robustness in complex scenarios, overcomes the parameter dependence and terrain adaptability deficiencies of traditional methods, and achieves high-precision digital elevation model generation.
Smart Images

Figure CN120495090B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional point cloud data filtering, and particularly relates to a three-dimensional point cloud data filtering method and system based on adaptive clustering segmentation and gradient compensation. BACKGROUND
[0002] Three-dimensional point cloud data can accurately restore the three-dimensional space information of the real world by recording a large number of three-dimensional coordinate points and their attributes (such as color and reflectivity) on the surface of an object. Three-dimensional point cloud data is widely used in automatic driving, three-dimensional reconstruction, industrial manufacturing, geographic agriculture, medical biology and daily life.
[0003] At present, existing three-dimensional point cloud data filtering algorithms such as mathematical morphology, surface method and clustering segmentation have significant technical limitations, and generally rely on artificial preset structure element size, window threshold or initial DEM parameters, which not only leads to under-filtering or over-filtering phenomenon in complex scenes such as steep slopes, dense vegetation and mixed building groups, but also makes it difficult to balance accuracy and efficiency with a single scale processing strategy, especially in the overlapping area of low-height objects and ground points, and due to the gradient sensitivity defect, the existing method is difficult to effectively deal with the local slope mutation of non-uniform terrain such as cliffs and gullies; therefore, it is necessary to design a three-dimensional point cloud data filtering method and system based on adaptive clustering segmentation and gradient compensation. SUMMARY
[0004] The purpose of the present application is to overcome the deficiencies of the prior art, and to better effectively solve the existing three-dimensional point cloud data filtering algorithm such as mathematical morphology, surface method and clustering segmentation, which has significant technical limitations and generally relies on artificial pre-set structure element size, window threshold or initial DEM parameter, not only leading to the phenomenon of under-filtering or over-filtering of the filtering result in complex scenes such as steep slope, dense vegetation and mixed building group, but also making it difficult to balance accuracy and efficiency for single scale processing strategy, especially in the low-lying ground and ground point overlapping area, and due to the gradient sensitivity defect, the existing method is difficult to effectively deal with the problem of local slope mutation of non-uniform terrain such as cliffs and gullies, and a three-dimensional point cloud data filtering method and system based on adaptive clustering segmentation and gradient compensation are provided, which realizes the function of establishing multi-dimensional features including point cloud density, spatial autocorrelation and local curvature characteristics by using adaptive clustering segmentation algorithm based on density spatial distribution, and dynamically clustering the ground-terrain cluster, and separating the building cluster points by introducing linear feature parameters, and further separating the residual mixed point cloud by using coarse-fine granularity grid hierarchical processing strategy to separate the ground point cloud, not only breaking through the technical limitations of traditional parameters, insufficient terrain adaptability and poor real-time performance, but also significantly improving the filtering accuracy and robustness in complex scenes through multi-dimensional collaborative optimization, which provides an efficient solution with the advantages of theoretical innovation and engineering practical value for the generation of high-precision digital elevation model.
[0005] In order to achieve the above purpose, the technical scheme adopted by the present application is:
[0006] A three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, comprising the following steps,
[0007] Step A, using statistical filtering method to pre-process the three-dimensional point cloud data and obtain the pre-processed point cloud data;
[0008] Step B, extracting the point cloud features in the pre-processed point cloud data and obtaining the point cloud feature data;
[0009] Step C, performing adaptive clustering segmentation on the point cloud feature data and obtaining the clustering segmentation result;
[0010] Step D, determining the spatial relationship of each point in the clustering segmentation result by using Delaunay triangular net, so as to obtain the in-scene violation point of point cloud;
[0011] Step E, performing linear exponential solution extraction on the in-scene violation point of point cloud and obtaining the building violation point;
[0012] Step F, identifying the building contour based on the clustering segmentation result, the in-scene violation point of point cloud and the building violation point, and obtaining the building point cloud;
[0013] Step G, the building point cloud is removed from the three-dimensional point cloud data, and the remaining point cloud data is obtained, and then the statistical filtering method is used to filter the remaining point cloud data and establish a plane interpolation model, and then the point cloud interpolation is performed on the target scene point cloud according to the plane interpolation model to obtain a grid plane fitting reference point cloud;
[0014] Step H, the grid plane fitting reference point cloud is filtered by using the slope angle grid to obtain filtered three-dimensional point cloud data;
[0015] Step I, the edge contour points in the filtered three-dimensional point cloud data are checked and the three-dimensional point cloud data filtering operation is completed.
[0016] The foregoing three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step A, the statistical filtering method is used to pre-process the three-dimensional point cloud data to obtain pre-processed point cloud data, wherein the statistical filtering method is to calculate the average distance μ of each point and its adjacent point in the three-dimensional point cloud data, and then obtain the distance threshold d from the average distance μ threshold , as shown in formula (1),
[0017] d threshold = μ + k·σ (1)
[0018] Wherein, k is a constant factor, and σ is the distance standard deviation of each point and its adjacent point.
[0019] The foregoing three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step B, the point cloud features in the pre-processed point cloud data are extracted to obtain point cloud feature data, wherein the point cloud features include point cloud scene average density feature, point cloud scene normal vector feature and point cloud scene adjacent point spatial distance feature, and the specific steps are as follows,
[0020] Step B1, the point cloud scene average density feature is extracted, wherein the point cloud scene average density feature is calculated as shown in formula (2),
[0021] AD = SumD / NP (2)
[0022] Wherein, AD is the average density of the pre-processed point cloud data, SumD is the total distance of each point and the nearest point in the pre-processed point cloud data, and NP is the number of point clouds in the pre-processed point cloud data;
[0023] Step B2, the point cloud scene normal vector feature is extracted, wherein the normal vector feature includes the first covariance matrix, the characteristic value, the characteristic vector and the normal vector angle, and the specific steps are as follows,
[0024] Step B21, calculating the first covariance matrix, specifically, establishing KD-Tree and finding the corresponding m neighboring points, and then constructing an m*3 matrix through the coordinates of the m points and calculating the first covariance matrix of the m*3 matrix, as shown in formula (3),
[0025]
[0026] wherein Cov(X) is the first covariance matrix of matrix X, μ x is the average value of each dimension, and T is the matrix transpose;
[0027] Step B22, calculating the eigenvalue and eigenvector, specifically as shown in formula (4),
[0028]
[0029] wherein λ is the eigenvalue, and x is the eigenvector;
[0030] Step B23, calculating the angle between the normal vectors, specifically as shown in formula (5),
[0031]
[0032] wherein a1, b1, c1, a2, b2 and c2 are the normal vector components of each point, and θ is the angle between the normal vectors of two points.
[0033] Step B3, extracting the spatial distance features of the point cloud scene neighboring points, specifically as shown in formula (6),
[0034]
[0035] wherein Dis is the distance between two points in space, and (x1, y1, z1) and (x2, y2, z2) are the three-dimensional coordinates of the target points.
[0036] The aforementioned three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step C, performing adaptive clustering segmentation on the point cloud feature data and obtaining the clustering segmentation result, wherein the clustering threshold of the adaptive clustering segmentation can change with the spatial features of the point cloud, and the clustering threshold calculation process is shown in formula (7),
[0037]
[0038] wherein YC is the clustering threshold of two points, and Δh is the height difference between two points.
[0039] The aforementioned three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step D, determining the spatial relationship of each point in the clustering segmentation result by using the Delaunay triangular net, thereby obtaining the violation points in the point cloud scene, and the specific steps are as follows,
[0040] Step D1, the spatial relationship of each point in the clustering segmentation result is determined by using the Delaunay triangular network, specifically, the normal vector of adjacent triangles in the Delaunay triangular network is calculated, as shown in formula (8),
[0041]
[0042] wherein, and are the edge vectors formed by two points in the triangle, (x a , y a , z a ), (x b , y b , z b ) and (x c , y c , z c ) are the coordinates of the three vertices of the triangle, is the triangle normal vector;
[0043] Step D2, the violation points in the point cloud scene are obtained, specifically, whether it is a violation triangle is judged by using two triangle normal vectors If the included angle of the two triangle normal vectors exceeds the set angle, it is a violation triangle, and if the height difference between the highest point and the lowest point of the violation triangle satisfies the set threshold, the highest point of the violation triangle is taken as the violation point.
[0044] The foregoing three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step E, linear exponential solution extraction is performed on the violation points in the point cloud scene to obtain building violation points, specifically, the obtained violation points in the point cloud scene are extracted and sorted into a point cloud set, and each point in the point cloud set is judged point by point, and the specific steps are as follows,
[0045] Step E1, K nearest neighbor points around the target point are extracted to construct a local neighborhood point set, and the coordinate system is translated so that the centroid of the point cloud set is the origin, and then the second covariance matrix is calculated, as shown in formula (9),
[0046]
[0047] wherein, H is the second covariance matrix, n is the number of neighborhood points, x j is the three-dimensional coordinates of the jth point, is the centroid coordinates of the neighborhood points;
[0048] Step E2, the eigenvalues of the second covariance matrix H are decomposed, as shown in formula (10),
[0049]
[0050] wherein V is an orthogonal matrix, Λ is a diagonal matrix, λ1 and λ2 are the largest eigenvalue and the second largest eigenvalue of the covariance matrix H respectively, λ3 is the eigenvalue of the second covariance matrix H, diag is the square decomposition of the second covariance matrix H;
[0051] Step E3, linear exponential calculation is performed on the obtained eigenvalue to obtain the building violation point, wherein the linear exponential calculation is shown in formula (11),
[0052]
[0053] wherein Linearity is the linear index of the violation point in the point cloud scene.
[0054] The aforementioned three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step F, the building contour is identified based on the clustering segmentation result, the violation point in the point cloud scene and the building violation point to obtain the building point cloud, specifically, the number of point cloud scene violation points belonging to the cluster class is compared with the cluster class outer contour points in the clustering segmentation result, if the number of point cloud scene violation points belonging to the cluster class meets the set threshold, the number of building violation points is compared with the number of point cloud scene violation points, if the proportion of the number of building violation points meets the set threshold, the two-dimensional bounding box area of the cluster points in the clustering segmentation result is calculated to obtain the diagonal angle, and then the farthest point distance in the cluster class is obtained, and the diagonal angle sine value less than the set value is the cluster class belonging to the building point cloud, wherein the two-dimensional bounding box area is calculated by using the built-in area calculation function polyarea in MATLAB, as shown in formula (12),
[0055]
[0056] wherein S is the area of the geometric figure, d is the side length, and β is the included angle between the two sides.
[0057] The aforementioned three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step G, the building point cloud is removed from the three-dimensional point cloud data to obtain the remaining point cloud data, and then a statistical filtering method is used to filter the remaining point cloud data and establish a plane interpolation model, and then the target scene point cloud is interpolated according to the plane interpolation model to obtain the grid plane fitting reference point cloud, and the coordinates of each point in the plane interpolation model are shown in formula (13),
[0058] ax+by+cz+d=0(13)
[0059] wherein a, b and c are all fitting plane parameters, and the fitting plane parameter constraint condition is a 2 +b 2 +c2 = 1.
[0060] The aforementioned three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, step H, utilizes the slope angle grid to perform point cloud filtering on the grid plane fitting reference point cloud and obtains filtered three-dimensional point cloud data, the specific steps are as follows,
[0061] Step H1, nine divided grids are taken as a whole to solve the slope angle of the adjacent grid of the target grid, as shown in formula (14),
[0062]
[0063] Wherein, φ i is the slope angle of the adjacent grid in the nine-grid grid, (x i , y i , z i ) is the three-dimensional coordinates of the lowest point of the adjacent grid, (x ⑤ , y ⑤ , z ⑤ ) is the three-dimensional coordinates of the to-be-determined lowest point of the target grid;
[0064] Step H2, integrate the surrounding grids of the target grid in the nine-grid, and then obtain the corresponding weighted slope angle of the target grid through distance weighting, as shown in formula (15),
[0065]
[0066] Wherein, D i is the Euclidean distance between the lowest point of the adjacent grid and the to-be-determined lowest point of the target grid, D is the weighted Euclidean distance, and γ is the slope angle of the target grid;
[0067] Step H3, set the slope angle threshold to calculate the first elevation threshold, and the calculation of the first elevation threshold is as shown in formula (16),
[0068]
[0069] Wherein, h t is the first elevation threshold, α is the slope angle corresponding to the slope threshold, and L is the grid division length;
[0070] Step H4, establish the elevation plane equation by using the elevation threshold and formula (13), and then solve the elevation plane equation to obtain the second elevation threshold, as shown in formula (17),
[0071]
[0072] Wherein, z t is the second elevation threshold;
[0073] Step H5, comparing the first elevation threshold and the second elevation threshold, if the second elevation threshold is lower than the first elevation threshold, the target grid pending lowest point is a ground point, if the second elevation threshold is not lower than the first elevation threshold, the target grid pending lowest point is a non-ground point;
[0074] Step I, checking the edge contour points in the filtered three-dimensional point cloud data and completing the three-dimensional point cloud data filtering task, specifically, the in-scene point cloud violation points in step D and the cluster class edge points in step C are recombined as a whole point cloud set, and the building point cloud in step F is removed from the whole point cloud set, then the remaining point cloud is reattributed to the corresponding cluster class in step C, then each point in the remaining point cloud is searched within a set distance range, and the number of ground points obtained from step H within the set distance range is determined, if the number of ground points within the set distance range meets a set threshold, it is further determined whether there is a point with a height difference from the target grid pending lowest point not exceeding a set threshold within the search distance range, if there is a point with a height difference from the target grid pending lowest point not exceeding a set threshold, the target grid pending lowest point is divided into a ground point.
[0075] A three-dimensional point cloud data filtering system based on adaptive clustering segmentation and gradient compensation, comprising a preprocessing module, a feature extraction module, an adaptive clustering segmentation module, an in-scene point cloud violation point searching module, a building violation point searching module, a building contour identification module, a point cloud interpolation module, a point cloud filtering module and an edge contour point checking module, the preprocessing module is used for preprocessing the three-dimensional point cloud data by using a statistical filtering method and obtaining preprocessed point cloud data; the feature extraction module is used for extracting point cloud features in the preprocessed point cloud data and obtaining point cloud feature data; the adaptive clustering segmentation module is used for adaptively clustering and segmenting the point cloud feature data and obtaining a clustering segmentation result; the in-scene point cloud violation point searching module is used for determining the spatial relationship of each point in the clustering segmentation result by using a Delaunay triangular network to obtain in-scene point cloud violation points; the building violation point searching module is used for linearly and exponentially calculating and extracting the in-scene point cloud violation points to obtain building violation points; the building contour identification module is used for identifying building contours based on the clustering segmentation result, the in-scene point cloud violation points and the building violation points to obtain building point clouds; the point cloud interpolation module is used for removing the building point clouds from the three-dimensional point cloud data to obtain remaining point cloud data, filtering the remaining point cloud data by using a statistical filtering method and establishing a plane interpolation model, then performing point cloud interpolation on the target scene point cloud according to the plane interpolation model to obtain a grid plane fitting reference point cloud; the point cloud filtering module is used for filtering the grid plane fitting reference point cloud by using a slope angle grid to obtain filtered three-dimensional point cloud data; and the edge contour point checking module is used for checking the edge contour points in the filtered three-dimensional point cloud data and completing the three-dimensional point cloud data filtering task.
[0076] The beneficial effects of the present application are: the three-dimensional point cloud data filtering method and system based on adaptive clustering segmentation and gradient compensation, first, the statistical filtering method is used for data preprocessing of the three-dimensional point cloud data and obtaining the preprocessed point cloud data, then the point cloud features in the preprocessed point cloud data are extracted and the point cloud feature data is obtained, then the point cloud feature data is adaptively clustered and segmented to obtain the clustering segmentation result, then the spatial relationship of each point in the clustering segmentation result is determined by using the Delaunay triangular net to obtain the violation point in the point cloud scene, then the linear exponential solution extraction is carried out on the violation point in the point cloud scene to obtain the building violation point, then the building contour is identified based on the clustering segmentation result, the violation point in the point cloud scene and the building violation point to obtain the building point cloud, then the building point cloud is removed from the three-dimensional point cloud data to obtain the remaining point cloud data, then the statistical filtering method is used for filtering the remaining point cloud data and establishing the plane interpolation model, then the target scene point cloud is interpolated according to the plane interpolation model to obtain the grid plane fitting reference point cloud, finally, the grid plane fitting reference point cloud is filtered by using the slope angle grid to obtain the filtered three-dimensional point cloud data, and then the edge contour point in the filtered three-dimensional point cloud data is checked to complete the three-dimensional point cloud data filtering operation; effectively realize the three-dimensional point cloud data filtering method and system, which adopts the adaptive clustering segmentation algorithm based on the density spatial distribution to establish the multi-dimensional features including point cloud density, spatial autocorrelation and local curvature characteristics, and dynamically clusters and segments the ground-terrain cluster, and through the introduction of linear feature parameters, the building cluster points can be separated, and through the coarse-fine granularity grid hierarchical processing strategy, the residual mixed point cloud can be further separated to separate the ground point cloud, not only break through the technical limitations of strong dependence on traditional parameters, insufficient terrain adaptability and poor real-time performance, but also significantly improve the filtering accuracy and robustness in complex scenes through multi-dimensional collaborative optimization, which provides an efficient solution with theoretical innovation and engineering practical value for the generation of high-precision digital elevation model. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1 is the overall flowchart of the three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation of the present application;
[0078] Figure 2 is the adaptive clustering segmentation schematic diagram of the present application;
[0079] Figure 3 is the schematic diagram of not using the linear index retrieval violation point proposed by the present application;
[0080] Figure 4 is the linear index solution extraction violation point schematic diagram of the present application;
[0081] Figure 5is a mesh partitioning schematic diagram of the present application;
[0082] Figure 6 is a slope angle grid establishment schematic diagram of the present application;
[0083] Figure 7 is a center weighted slope angle calculation schematic diagram of the present application;
[0084] Figure 8 is a first elevation threshold establishment schematic diagram of the present application;
[0085] Figure 9 is an edge contour checking result diagram of the present application. DETAILED DESCRIPTION
[0086] The present application will be further described below in conjunction with the accompanying drawings.
[0087] As Figure 1 shown, a three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation of the present application comprises the following steps,
[0088] Step A, using a statistical filtering method to pre-process the three-dimensional point cloud data and obtain the pre-processed point cloud data, wherein the statistical filtering method specifically calculates the average distance μ of each point in the three-dimensional point cloud data and its neighboring points, and then obtains the distance threshold d from the average distance μ threshold , as shown in formula (1),
[0089] d threshold = μ + k·σ (1)
[0090] Wherein, k is a constant factor, and σ is the distance standard deviation of each point and its neighboring points.
[0091] Step B, extracting the point cloud features in the pre-processed point cloud data and obtaining the point cloud feature data, wherein the point cloud features include point cloud scene average density features, point cloud scene normal vector features and point cloud scene neighboring point spatial distance features, and the specific steps are as follows,
[0092] Step B1, extracting the point cloud scene average density features, wherein the point cloud scene average density features are calculated as shown in formula (2),
[0093] AD = SumD / NP (2)
[0094] Wherein, AD is the average density of the pre-processed point cloud data, SumD is the total distance of each point in the pre-processed point cloud data and the nearest point, and NP is the number of point clouds in the pre-processed point cloud data;
[0095] Step B2: Extract the point cloud scene normal vector features, where the normal vector features include the first covariance matrix, eigenvalues, eigenvectors, and the angle between the normal vectors. The specific steps are as follows.
[0096] Step B21: Calculate the first covariance matrix. Specifically, establish a KD-Tree and find the corresponding m neighboring points. Then, construct an m*3 matrix using the coordinates of the m points and calculate the first covariance matrix of the m*3 matrix, as shown in formula (3).
[0097]
[0098] Where Cov(X) is the first covariance matrix of matrix X, μ x The average value for each dimension, where T is the matrix transpose;
[0099] Step B22: Calculate the eigenvalues and eigenvectors, as shown in formula (4).
[0100]
[0101] Where λ is the eigenvalue and x is the eigenvector;
[0102] Step B23: Calculate the angle between the normal vectors, as shown in formula (5).
[0103]
[0104] Where a1, b1, c1, a2, b2 and c2 are the normal vector components of each point, and θ is the angle between the normal vectors of two points;
[0105] Step B3: Extract the spatial distance features of neighboring points in the point cloud scene, as shown in formula (6).
[0106]
[0107] Where Dis is the distance between two points in space, and (x1, y1, z1) and (x2, y2, z2) are the three-dimensional coordinates of the target point.
[0108] like Figure 2 As shown, in step C, adaptive clustering segmentation is performed on the point cloud feature data to obtain the clustering segmentation result. The clustering threshold of the adaptive clustering segmentation can be changed according to the spatial features of the point cloud, and the calculation process of the clustering threshold is shown in formula (7).
[0109]
[0110] Where YC is the two-point clustering threshold, and Δh is the height difference between the two points.
[0111] Step D, the spatial relationship of each point in the clustering segmentation result is determined by using a Delaunay triangulation network, so as to obtain the violation points in the point cloud scene, and the specific steps are as follows,
[0112] Step D1, the spatial relationship of each point in the clustering segmentation result is determined by using a Delaunay triangulation network, and specifically, the normal vectors of adjacent triangles in the Delaunay triangulation network are calculated, as shown in formula (8),
[0113]
[0114] wherein, and are edge vectors formed by two points in the triangle, (x a , y a , z a ), (x b , y b , z b ) and (x c , y c , z c ) are the coordinates of the three vertices of the triangle, is a triangle normal vector;
[0115] Step D2, the violation points in the point cloud scene are obtained, and specifically, whether two triangle normal vectors are violation triangles is judged, if the included angle between the two triangle normal vectors exceeds a set angle, it is a violation triangle, and if the height difference between the highest point and the lowest point of the violation triangle satisfies a set threshold, the highest point of the violation triangle is taken as the violation point.
[0116] As shown in 3 and Figure 4 , step E, the building violation points are extracted by linear index calculation of the violation points in the point cloud scene, and the specific steps are as follows,
[0117] Step E1, K nearest neighbor points around the target point are extracted to construct a local neighborhood point set, and the coordinate system is translated so that the point cloud set centroid is the origin, and then the second covariance matrix is calculated, as shown in formula (9),
[0118]
[0119] wherein, H is the second covariance matrix, n is the number of neighborhood points, x j is the three-dimensional coordinates of the jth point, is the centroid coordinates of the neighborhood points;
[0120] Step E2, eigenvalues of the second covariance matrix H are decomposed, as shown in formula (10),
[0121]
[0122] Wherein, V is an orthogonal matrix, Λ is a diagonal matrix, λ1 and λ2 are the maximum eigenvalue and the second largest eigenvalue of the covariance matrix H respectively, λ3 is the eigenvalue of the second covariance matrix H, and diag is the square decomposition of the second covariance matrix H;
[0123] Step E3, linear exponential calculation is performed on the obtained eigenvalues, and the building violation point is obtained, wherein the linear exponential calculation is shown in formula (11),
[0124]
[0125] Wherein, Linearity is the linear index of the violation point in the point cloud scene.
[0126] Step F, the building contour is identified based on the clustering segmentation result, the violation point in the point cloud scene and the building violation point, and the building point cloud is obtained, specifically, the number of cluster class outer contour points in the clustering segmentation result is compared with the number of violation points in the point cloud scene belonging to the cluster class, if the proportion of the number of violation points in the point cloud scene belonging to the cluster class meets the set threshold, the number of building violation points is compared with the number of violation points in the point cloud scene, if the proportion of the number of building violation points meets the set threshold, the two-dimensional bounding box area of the cluster points in the clustering segmentation result is calculated, so as to obtain the included angle of the diagonal, and then the farthest point distance in the cluster class is obtained, and the cluster class belongs to the building point cloud when the sine value of the included angle of the diagonal is less than the set value, wherein the two-dimensional bounding box area is calculated by using the built-in area calculation function polyarea in MATLAB, as shown in formula (12),
[0127]
[0128] Wherein, S is the area of the geometric figure, d is the side length, and β is the included angle between the two sides.
[0129] Step G, the building point cloud is removed from the three-dimensional point cloud data to obtain the remaining point cloud data, and then the statistical filtering method is used to filter the remaining point cloud data and establish a plane interpolation model, and then the target scene point cloud is interpolated according to the plane interpolation model to obtain the grid plane fitting reference point cloud, and the coordinates of each point in the plane interpolation model are shown in formula (13),
[0130] ax+by+cz+d=0(13)
[0131] Wherein, a, b and c are fitting plane parameters, and the fitting plane parameter constraint condition is a 2 +b2 +c 2 = 1.
[0132] Step H, the grid plane is fitted with the slope angle grid to filter the reference point cloud and obtain the filtered three-dimensional point cloud data, the specific steps are as follows,
[0133] As shown in Figure 5 and Figure 6 , step H1, nine divided grids are taken as a whole to solve the slope angle of the adjacent grid of the target grid, as shown in formula (14),
[0134]
[0135] Where, φ i is the slope angle of the adjacent grid in the nine-grid grid, (x i , y i , z i ) is the three-dimensional coordinates of the lowest point of the adjacent grid, (x ⑤ , y ⑤ , z ⑤ ) is the three-dimensional coordinates of the lowest point of the target grid to be determined;
[0136] As shown in Figure 7 , step H2, the surrounding grid of the target grid in the nine-grid is integrated, and the corresponding weighted slope angle of the target grid is obtained by distance weighting, as shown in formula (15),
[0137]
[0138] Where, D i is the Euclidean distance between the lowest point of the adjacent grid and the lowest point of the target grid to be determined, D is the weighted Euclidean distance, and γ is the slope angle of the target grid;
[0139] As shown in Figure 8 , step H3, set the slope angle threshold to calculate the first elevation threshold, and the calculation of the first elevation threshold is as shown in formula (16),
[0140]
[0141] Where, h t is the first elevation threshold, α is the slope angle corresponding to the slope threshold, and L is the grid division length;
[0142] Step H4, the elevation plane equation is established by using the elevation threshold and formula (13), and the second elevation threshold is obtained by solving the elevation plane equation, as shown in formula (17),
[0143]
[0144] wherein z t is a second elevation threshold value;
[0145] Step H5, comparing the first elevation threshold value and the second elevation threshold value, if the second elevation threshold value is lower than the first elevation threshold value, the target grid pending lowest point is a ground point, if the second elevation threshold value is not lower than the first elevation threshold value, the target grid pending lowest point is a non-ground point;
[0146] As shown in Figure 9 Step I, the edge contour points in the filtered three-dimensional point cloud data are checked and the three-dimensional point cloud data filtering operation is completed, specifically, the incoherent points in the point cloud scene in step D and the cluster class edge points in step C are taken as a whole point cloud set and the building point cloud in step F is removed therefrom, then the remaining point cloud is reattributed to the corresponding cluster class in step C, then the ground points obtained from step H in a set distance range of each point in the remaining point cloud are searched, if the number of ground points in the set distance range meets a set threshold value, it is further judged whether there is a point with a height difference from the target grid pending lowest point not exceeding a set threshold value in the searched distance range, if there is a point with a height difference from the target grid pending lowest point not exceeding a set threshold value, the target grid pending lowest point is divided into a ground point.
[0147] The application discloses a three-dimensional point cloud data filtering system based on adaptive clustering segmentation and gradient compensation, which comprises a pretreatment module, a feature extraction module, an adaptive clustering segmentation module, a point cloud scene violation point searching module, a building violation point searching module, a building contour identification module, a point cloud interpolation module, a point cloud filtering module and an edge contour point checking module. The pretreatment module is used for performing data pretreatment on three-dimensional point cloud data by using a statistical filtering method and obtaining pretreated point cloud data. The feature extraction module is used for extracting point cloud features in the pretreated point cloud data and obtaining point cloud feature data. The adaptive clustering segmentation module is used for performing adaptive clustering segmentation on the point cloud feature data and obtaining a clustering segmentation result. The point cloud scene violation point searching module is used for determining the spatial relationship of each point in the clustering segmentation result by using a Delaunay triangular net so as to obtain point cloud scene violation points. The building violation point searching module is used for performing linear index calculation and extraction on the point cloud scene violation points and obtaining building violation points. The building contour identification module is used for identifying a building contour based on the clustering segmentation result, the point cloud scene violation points and the building violation points and obtaining building point clouds. The point cloud interpolation module is used for removing the building point clouds from the three-dimensional point cloud data and obtaining residual point cloud data, performing filtering on the residual point cloud data by using a statistical filtering method and establishing a plane interpolation model, then performing point cloud interpolation on target scene point clouds according to the plane interpolation model and obtaining a grid plane fitting reference point cloud. The point cloud filtering module is used for performing point cloud filtering on the grid plane fitting reference point cloud by using a slope angle grid and obtaining filtered three-dimensional point cloud data. The edge contour point checking module is used for checking edge contour points in the filtered three-dimensional point cloud data and completing three-dimensional point cloud data filtering work.
[0148] In summary, the three-dimensional point cloud data filtering method and system based on adaptive clustering segmentation and gradient compensation first uses a statistical filtering method to pre-process the three-dimensional point cloud data and obtain pre-processed point cloud data, then extracts point cloud features in the pre-processed point cloud data and obtains point cloud feature data, then performs adaptive clustering segmentation on the point cloud feature data and obtains clustering segmentation results, then determines the spatial relationship of each point in the clustering segmentation results using a Delaunay triangular network to obtain in-scene violation points, then performs linear exponential calculation and extraction on the in-scene violation points to obtain building violation points, then identifies the building contour based on the clustering segmentation results, the in-scene violation points and the building violation points to obtain building point clouds, then removes the building point clouds from the three-dimensional point cloud data to obtain remaining point cloud data, then filters the remaining point cloud data using a statistical filtering method and establishes a plane interpolation model, then performs point cloud interpolation on the target scene point cloud according to the plane interpolation model to obtain a grid plane fitting reference point cloud, finally filters the grid plane fitting reference point cloud using a slope angle grid to obtain filtered three-dimensional point cloud data, and then checks the edge contour points in the filtered three-dimensional point cloud data to complete the three-dimensional point cloud data filtering operation; effectively realize the three-dimensional point cloud data filtering method and system, which uses an adaptive clustering segmentation algorithm based on density spatial distribution to establish multi-dimensional features including point cloud density, spatial autocorrelation and local curvature features, and dynamically clusters and segments the ground-terrain cluster, and through the introduction of linear feature parameters, the building cluster points can be separated, and through the coarse-fine granularity grid hierarchical processing strategy, the residual mixed point cloud can be further separated to separate the ground point cloud, not only breaking through the technical limitations of strong dependence on traditional parameters, insufficient terrain adaptability and poor real-time performance, but also significantly improving the filtering accuracy and robustness in complex scenes through multi-dimensional collaborative optimization, which provides an efficient solution with theoretical innovation and engineering practical value for the generation of high-precision digital elevation models.
[0149] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above examples, and the above examples and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation, characterized in that: Includes the following steps, Step A: Use statistical filtering to preprocess the 3D point cloud data and obtain the preprocessed point cloud data; Step B involves extracting point cloud features from the preprocessed point cloud data and obtaining point cloud feature data. Step C: Perform adaptive clustering segmentation on the point cloud feature data and obtain the clustering segmentation results; Step D: Use Delaunay triangulation to determine the spatial relationships of points in the clustering and segmentation results, thereby obtaining incongruity points in the point cloud scene; Step E involves extracting incongruity points from the point cloud scene using linear exponential calculation to obtain building incongruity points. Specifically, the obtained incongruity points are extracted and organized into a point cloud set, and each point in the point cloud set is evaluated point by point. The specific steps are as follows. Step E1: Extract the K nearest neighbors around the target point to construct a local neighborhood point set and translate the coordinate system so that the centroid of the point cloud set is the origin. Then calculate the second covariance matrix as shown in formula (9). (9) Where H is the second covariance matrix, and n is the number of neighborhood points. Let j be the three-dimensional coordinates of the j-th point. The centroid coordinates of the neighboring points; Step E2: Decompose the eigenvalues of the second covariance matrix H, as shown in formula (10). (10) in, It is an orthogonal matrix. It is a diagonal matrix. and These are the largest and second largest eigenvalues of the covariance matrix H, respectively. The eigenvalues of the second covariance matrix H are... This is the squared decomposition of the second covariance matrix H; Step E3 involves performing a linear exponential solution on the obtained eigenvalues to obtain the building inconsistency points. The linear exponential solution is shown in formula (11). (11) Wherein, Linearity is the linear exponent of incongruity points within the point cloud scene; Step F: Based on the clustering segmentation results, incongruity points in the point cloud scene, and building incongruity points, identify the building outline and obtain the building point cloud; Step G involves removing the building point cloud from the 3D point cloud data and obtaining the remaining point cloud data. Then, a statistical filtering method is used to filter the remaining point cloud data and establish a planar interpolation model. Next, point cloud interpolation is performed on the target scene point cloud based on the planar interpolation model to obtain the grid plane fitting reference point cloud. Step H involves using a slope angle grid to filter the reference point cloud fitted to the grid plane and obtaining the filtered 3D point cloud data. The specific steps are as follows. Step H1: Treat the nine grids as a whole and solve for the slope angle of adjacent grids of the target grid, as shown in formula (14). (14) in, The slope angle of adjacent grid cells within a 3x3 grid is ( ) represents the three-dimensional coordinates of the lowest point in the adjacent grid. , () represents the three-dimensional coordinates of the undetermined lowest point of the target mesh; Step H2: Integrate the surrounding grids of the target grid within the nine-square grid, and then obtain the weighted slope angle corresponding to the target grid through distance weighting, as shown in formula (15). (15) in, The Euclidean distance between the lowest point of an adjacent grid and the undetermined lowest point of the target grid. This is the weighted Euclidean distance. The target grid slope angle; Step H3: Set the slope angle threshold and calculate the first elevation threshold. The specific calculation of the first elevation threshold is shown in formula (16). (16) in, The first elevation threshold, This represents the slope threshold corresponding to the slope angle. Divide the grid into lengths; Step H4: Establish the elevation plane equation using the elevation threshold and formula (13), and then solve the elevation plane equation to obtain the second elevation threshold, as shown in formula (17). (17) in, This is the second elevation threshold; Step H5: Compare the first elevation threshold and the second elevation threshold. If the second elevation threshold is lower than the first elevation threshold, the undetermined lowest point of the target grid is a ground point. If the second elevation threshold is not lower than the first elevation threshold, the undetermined lowest point of the target grid is a non-ground point. Step I: Check the edge contour points in the filtered 3D point cloud data and complete the 3D point cloud data filtering operation.
2. The 3D point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 1, characterized in that: Step A involves preprocessing the 3D point cloud data using statistical filtering to obtain preprocessed point cloud data. Specifically, the statistical filtering method calculates the average distance between each point in the 3D point cloud data and its neighboring points. Then, based on the average distance Obtain distance threshold As shown in formula (1), (1) in, A constant factor, This represents the standard deviation of the distance between each point and its neighbors.
3. The three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 2, characterized in that: Step B involves extracting point cloud features from the preprocessed point cloud data to obtain point cloud feature data. These features include the average density of the point cloud scene, the normal vector of the point cloud scene, and the spatial distance between neighboring points in the point cloud scene. The specific steps are as follows. Step B1: Extract the average density features of the point cloud scene. The calculation of the average density features of the point cloud scene is shown in formula (2). (2) Where AD represents the average density of the preprocessed point cloud data. NP represents the total distance between each point in the preprocessed point cloud data and its nearest point, and NP represents the number of points in the preprocessed point cloud data. Step B2: Extract the point cloud scene normal vector features, where the normal vector features include the first covariance matrix, eigenvalues, eigenvectors, and the angle between the normal vectors. The specific steps are as follows. Step B21: Calculate the first covariance matrix. Specifically, establish a KD-Tree and find the corresponding m neighboring points. Then, construct an m*3 matrix using the coordinates of the m points and calculate the first covariance matrix of the m*3 matrix, as shown in formula (3). (3) in, For matrix The first covariance matrix, The average value for each dimension, where T is the matrix transpose; Step B22: Calculate the eigenvalues and eigenvectors, as shown in formula (4). (4) in, Let x be the eigenvalue and x be the eigenvector; Step B23, calculate the angle between the normal vectors, as shown in formula (5). (5) in, , These are all components of the normal vector at each point. The angle between the normal vectors of the two points; Step B3: Extract the spatial distance features of neighboring points in the point cloud scene, as shown in formula (6). (6) Where Dis is the distance between two points in space, ( )and( All of these are the three-dimensional coordinates of the target point.
4. The 3D point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 3, characterized in that: Step C involves performing adaptive clustering segmentation on the point cloud feature data and obtaining the clustering segmentation results. The clustering threshold for adaptive clustering segmentation can be changed according to the spatial features of the point cloud, and the calculation process of the clustering threshold is shown in formula (7). (7) Where YC is the two-point clustering threshold, The difference in height between the two points.
5. A three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 4, characterized in that: Step D involves using Delaunay triangulation to determine the spatial relationships between points in the clustering and segmentation results, thereby obtaining inconsistencies within the point cloud scene. The specific steps are as follows. Step D1: Delaunay triangulation is used to determine the spatial relationships of points in the clustering segmentation results. Specifically, the normal vectors of adjacent triangles within the Delaunay triangulation are calculated, as shown in formula (8). (8) in, and Let be the side vector formed by two points inside the triangle. , , ), ( , , )and( , , The coordinates of the three vertices of the triangle are shown below. It is a triangular normal vector; Step D2: Obtain incongruity points within the point cloud scene, specifically using two triangular normal vectors. To determine if a triangle is incongruous, if the two triangular normal vectors... If the included angle exceeds a set angle, it is considered an incongruous triangle. If the height difference between the highest and lowest points of the incongruous triangle meets a set threshold, then the highest point of the incongruous triangle is taken as the incongruous point.
6. The three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 5, characterized in that: Step F involves identifying the building outline and obtaining the building point cloud based on the clustering segmentation results, inconsistencies in the point cloud scene, and inconsistencies in the building. Specifically, the number of cluster outer contour points in the clustering segmentation results is compared with the number of inconsistencies in the point cloud scene belonging to that cluster. If the proportion of inconsistencies in the point cloud scene belonging to that cluster meets a set threshold, the number of inconsistencies in the building is compared with the number of inconsistencies in the point cloud scene. If the proportion of inconsistencies in the building meets a set threshold, the area of the two-dimensional bounding box of the cluster points in the clustering segmentation results is calculated to obtain the diagonal angle, and then the distance of the farthest point in the cluster is obtained. If the sine value of the diagonal angle is less than a set value, then the cluster belongs to the building point cloud. The area of the two-dimensional bounding box is calculated using the built-in area calculation function polyarea in MATLAB as shown in formula (12). (12) in, The area of the geometric figure. Let be the side length, and β be the included angle between the two sides.
7. A three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 6, characterized in that: Step G involves removing the building point cloud from the 3D point cloud data and obtaining the remaining point cloud data. Then, a statistical filtering method is used to filter the remaining point cloud data and establish a planar interpolation model. Next, point cloud interpolation is performed on the target scene point cloud based on the planar interpolation model to obtain the grid plane fitting reference point cloud. The coordinates of each point in the planar interpolation model are shown in formula (13). (13) in, All are parameters of the fitted plane, and the constraints of the fitted plane parameters are as follows: .
8. A three-dimensional point cloud data filtering method based on adaptive clustering segmentation and gradient compensation according to claim 7, characterized in that: Step I involves checking the edge contour points in the filtered 3D point cloud data and completing the 3D point cloud data filtering operation. Specifically, the incongruous points in the point cloud scene in Step D and the cluster edge points in Step C are reassembled into a single point cloud set, and the building point cloud in Step F is removed from it. The remaining point cloud is then reassigned to the corresponding cluster in Step C. Next, the number of ground points obtained in Step H within a set distance range of each point in the remaining point cloud is retrieved point by point. If the number of ground points within the set distance range meets the set threshold, it is further determined whether there are any ground points within the search distance range whose height difference with the target grid's undetermined lowest point does not exceed the set threshold. If there are any points whose height difference with the target grid's undetermined lowest point does not exceed the set threshold, then the target grid's undetermined lowest point is classified as a ground point.
9. A three-dimensional point cloud data filtering system based on adaptive clustering segmentation and gradient compensation, wherein the specific filtering process of the three-dimensional point cloud data filtering system is based on the three-dimensional point cloud data filtering method according to any one of claims 1-8, characterized in that: It includes a preprocessing module, a feature extraction module, an adaptive clustering and segmentation module, a point cloud scene inconsistency point retrieval module, a building inconsistency point retrieval module, a building contour recognition module, a point cloud interpolation module, a point cloud filtering module, and an edge contour point verification module. The preprocessing module is used to preprocess the 3D point cloud data using a statistical filtering method to obtain the preprocessed point cloud data. The feature extraction module is used to extract point cloud features from the preprocessed point cloud data and obtain point cloud feature data. The adaptive clustering segmentation module is used to perform adaptive clustering segmentation on point cloud feature data and obtain clustering segmentation results; The incongruity point retrieval module in the point cloud scene is used to determine the spatial relationship of each point in the clustering and segmentation results using Delaunay triangulation, thereby obtaining incongruity points in the point cloud scene. The building inconsistency point retrieval module is used to extract and obtain building inconsistency points by performing linear exponential calculation on inconsistency points in the point cloud scene. The building outline recognition module is used to identify building outlines and obtain building point clouds based on clustering segmentation results, incongruity points in the point cloud scene, and building incongruity points; The point cloud interpolation module is used to remove building point clouds from 3D point cloud data and obtain the remaining point cloud data. Then, the remaining point cloud data is filtered by statistical filtering and a planar interpolation model is established. Next, the point cloud of the target scene is interpolated according to the planar interpolation model to obtain the grid plane fitting reference point cloud. The point cloud filtering module is used to perform point cloud filtering on the grid plane fitting reference point cloud using a slope angle grid and obtain filtered three-dimensional point cloud data. The edge contour point verification module is used to verify the edge contour points in the filtered 3D point cloud data and complete the 3D point cloud data filtering operation.
Citation Information
Patent Citations
Line point cloud tree segmentation method based on ground point removal and density-oriented filtering
CN116503419A
Point cloud segmentation method and device and storage medium
CN117523188A