Three-dimensional point cloud reduction method
By dividing the original point cloud into sub-point clouds and building feature and uniformity loss functions, and jointly optimizing the solution of the resampling matrix, the feature loss and over-simplification of the point cloud streamlining method in the existing technology are solved, and efficient and accurate point cloud streamlining is achieved.
Patent Information
- Application Number
- CN202211640618.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-12-20
AI Technical Summary
The existing three-dimensional point cloud streamlining method is difficult to take into account both the original point cloud features and point cloud uniformity, resulting in a large deviation between the point cloud data and the original data after streamlining, especially when the model surface is complex, there are problems such as feature loss and over-simplification of non-feature regions.
The original point cloud is divided into several sub-point clouds, and the normal vector parameters of each point cloud are obtained and the feature loss function and uniformity loss function are constructed, and the resampling matrix is jointly optimized to achieve point cloud simplification.
By solving the resampling matrix in a classified manner, the accuracy and efficiency of streamlining point clouds are ensured, feature loss and over-simplification of non-feature regions are avoided, and the accuracy and efficiency of streamlining point clouds are improved.
Smart Images

Figure CN115761293B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data processing, and in particular relates to a three-dimensional point cloud simplification method. Background Art
[0002] A point cloud is a data set of points in a certain coordinate system. The points contain rich information, including three-dimensional coordinates X, Y, Z, color, classification value, intensity value, time, etc. The point cloud can atomize the real world, and the high-precision point cloud data can restore the real world. Usually, the data scale of three-dimensional point clouds is large. In order to meet the real-time requirements of subsequent point cloud processing such as feature extraction, target recognition, positioning and scene understanding, the three-dimensional point cloud needs to be streamlined.
[0003] In the prior art, three-dimensional point cloud simplification methods are mainly divided into point cloud simplification methods based on grids and point cloud simplification methods based on scattered point clouds; among them, Chen Y et al. proposed a point cloud simplification method based on triangular grids, which converts point clouds into triangular grids, determines their weights by comparing the normal vectors of adjacent triangular grids, and deletes triangular grids to achieve point cloud simplification. Due to the high computational complexity of point cloud triangular gridding, the point cloud simplification efficiency of this method is low; Yuan Xiaocui et al. proposed a point cloud simplification method based on clustering methods, which uses K-means clustering to classify point clouds, uses principal component analysis to perform normal analysis on point clouds, selects and retains feature points of each clustering space to achieve three-dimensional point cloud simplification; Zhu Yu et al. proposed a point cloud simplification method based on principal curvature Hausdorff distance, which uses principal curvature Hausdorff distance values to select point cloud feature points and compress non-feature points to improve point cloud simplification efficiency, but this method may result in feature point loss and other situations.
[0004] In summary, it is difficult for existing point cloud simplification methods to take into account both the original point cloud features and the point cloud uniformity. When the model surface is complex, there are problems such as feature loss and over-simplification of non-feature areas, which leads to a large deviation between the simplified point cloud data and the original data. Therefore, it is urgent to improve the defects in the existing technology. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a three-dimensional point cloud simplification method. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] In a first aspect, the present invention provides a three-dimensional point cloud simplification method, comprising:
[0007] Obtain the original point cloud and divide it into several sub-point clouds;
[0008] Get the normal vector parameters of each point cloud in the sub-point cloud, and divide the sub-point cloud into several categories according to the normal vector parameters;
[0009] According to the category of the sub - point cloud, construct a feature loss function and a uniformity loss function for each category, and add the feature loss function and the uniformity loss function corresponding to each category as the loss function corresponding to each category;
[0010] Solve the loss function of each category to obtain the resampling matrix corresponding to each category, and obtain the thinned point cloud of this category;
[0011] Merge the thinned point clouds of each category to obtain the thinned point cloud corresponding to the sub - point cloud;
[0012] Merge the thinned point cloud corresponding to the sub - point cloud to obtain the thinned point cloud corresponding to the original point cloud.
[0013] Optionally, use the K - means clustering algorithm to divide the original point cloud into several sub - point clouds.
[0014] Optionally, the process of obtaining the normal vector parameters of each point cloud in the sub - point cloud and dividing the sub - point cloud into several categories according to the normal vector parameters includes:
[0015] Use the weighted plane fitting method to obtain the normal vectors of each point cloud y i in the sub - point cloud Y ij , and its expression is:
[0016] n ij = p(y ij );
[0017] where i is the i - th sub - point cloud and j is the j - th point cloud;
[0018] Use the k - nearest neighbor algorithm to obtain the k - nearest neighbors knn(y ij ) corresponding to each point cloud y ij , and obtain the normal vector parameter r ij corresponding to each point cloud, and its expression is:
[0019]
[0020] where y ij is the j - th point cloud in the i - th sub - point cloud Y i , |<p(y ij ), p(q l )>| is the absolute value of the dot product of the normal vectors p( yij ) and p(q l ), p(q l ) is the normal vector of point q l , k is the value of k for selecting k - nearest neighbors, q l is the k - nearest neighbor of y ij , and q l ∈ knn(y ij );
[0021] According to each point cloud y ij The normal vector parameter r ij The value of is used to divide the sub-point cloud into several categories, and its expression is:
[0022]
[0023] in, is the i-th sub-point cloud Y i Category V, is the i-th sub-point cloud Y i The category corresponding to the j-th point cloud in, is the i-th sub-point cloud Y i Category V The number of points, v is the number of categories included in the sub-point cloud.
[0024] Optionally, the sub-point cloud categories include seven categories; respectively: if 0≤r ij <0.003, set as the first category; if 0.003≤r ij <0.004, set as the second category; if 0.004≤r ij <0.008, set as the third category; if 0.008≤r ij <0.016, set to the fourth category; if 0.016≤r ij <0.032, set as the fifth category; if 0.032≤r ij <0.064, set as the sixth category; if 0.064≤r ij ≤1, set as the seventh category.
[0025] Optionally, the process of constructing the feature loss function includes:
[0026] For each sub-point cloud Y i Category V The set of point clouds is taken as the vertex set
[0027] According to the category of the sub-point cloud, get the matrix Its expression is:
[0028]
[0029] in, for Middle points;
[0030] For the jth vertex Use KNN algorithm to obtain its k nearest neighbor points Get Vertex Set The corresponding adjacency matrix and the weighted adjacency matrix Their expressions are respectively:
[0031]
[0032]
[0033] Among them, is the element in the \(a\)-th row and \(b\)-th column of the adjacency matrix ; \(v_b\) is the \(b\)-th point in ; \(N_k(v_a)\) is the set of \(k\) nearest neighbors of the \(a\)-th point in ; ; ;
[0034]
[0035]
[0036] Among them, \(\sigma\) is the weight parameter, \(\|\cdot\|_2\) is the Euclidean norm, is the element in the \(a\)-th row and \(b\)-th column of the weighted adjacency matrix ;
[0037] Normalize the adjacency matrix to obtain the normalized weighted adjacency matrix
[0038] According to the normalized weighted adjacency matrix normalize the vertex set to obtain the normalized Laplacian matrix \(I\) is the -order identity matrix;
[0039] Use the normalized Laplacian matrix to extract the features of the \(v\)-th class in the sub-point cloud \(Y\) i to obtain
[0040] Resample the \(v\)-th class in the sub-point cloud \(Y\) i to obtain the resampling matrix which satisfies:
[0041]
[0042] Among them, is the element in the \(g\)-th row and \(h\)-th column of the resampling matrix ; \(tr(\mathbf{R})\) is the trace of the resampling matrix ; \(\alpha\) is the reduction rate; ;
[0043] For the matrix Resampling is performed to obtain the features of the simplified point cloud and the feature loss function is obtained Its expression is as follows:
[0044]
[0045] where, ||·||2 is the Euclidean norm
[0046] Optionally, the process of constructing the uniformity loss function includes:
[0047] According to the resampling matrix the point cloud in the v-th category i in the sub-point cloud Y is simplified to obtain its adjacency matrix
[0048] According to the adjacency matrix the uniformity loss function is obtained Its expression is as follows:
[0049]
[0050] where, c = (1, 1,..., 1) T , is the number of k-nearest neighbors of each point cloud in the simplified point cloud of the v-th category i of the sub-point cloud Y
[0051] Optionally, the feature loss function and the uniformity loss function corresponding to each category are added to obtain the loss function corresponding to each category Its expression is as follows:
[0052]
[0053] where, λ is a hyperparameter, 0 ≤ λ ≤ 1
[0054] Optionally, the loss function corresponding to each category is solved to obtain the resampling matrix i of the v-th category of the sub-point cloud Y Its expression is as follows:
[0055]
[0056] If
[0057] If g ≠ h
[0058]
[0059] Optionally, simplify the loss function corresponding to each category, and its expression is:
[0060]
[0061] where the resampling vector is set Set the diagonal matrix Set the vector is the resampling vector the s-th dimension of
[0062] Advantages of the present invention:
[0063] A three-dimensional point cloud reduction method provided by the present invention first divides the original point cloud into several sub-point clouds, and then divides each sub-point cloud into several categories according to the normal vector parameters of each point cloud. By establishing a point cloud reduction optimization model for different categories, the resampling matrices of different categories are obtained by solving. After merging the reduced point clouds of each category of each sub-point cloud, the reduced point cloud of the original point cloud is obtained, which can ensure the accuracy and efficiency of the reduced point cloud.
[0064] The following will further describe the present invention in detail with reference to the drawings and embodiments. Description of the Drawings
[0065] Figure 1 is a flowchart of a three-dimensional point cloud reduction method provided by an embodiment of the present invention. Detailed Embodiments
[0066] The following will further describe the present invention in detail with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0067] Aiming at the problems existing in the prior art, the present invention proposes a three-dimensional point cloud reduction method, which simultaneously constructs a feature loss function and a uniformity loss function, jointly optimizes them, and classifies and solves them by a feature classification method to improve the accuracy and efficiency of point cloud reduction at the same time.
[0068] Please refer to Figure 1 , Figure 1 is a flowchart of a three-dimensional point cloud reduction method provided by an embodiment of the present invention. A three-dimensional point cloud reduction method provided by the present invention includes:
[0069] S101. Obtain the original point cloud and divide the original point cloud into several sub-point clouds;
[0070] S102. Obtain the normal vector parameters of each point cloud in the sub-point cloud, and divide the sub-point cloud into several categories according to the normal vector parameters;
[0071] S103. According to the categories of the sub-point clouds, construct a feature loss function and a uniformity loss function for each category, and add the feature loss function and the uniformity loss function corresponding to each category as the loss function corresponding to each category;
[0072] S104. Solve the loss function of each category to obtain the resampling matrix corresponding to each category, and obtain the thinned point cloud of this category;
[0073] S105. Merge the thinned point clouds of each category to obtain the thinned point cloud corresponding to the sub-point cloud;
[0074] S106. Merge the thinned point clouds corresponding to the sub-point clouds to obtain the thinned point cloud corresponding to the original point cloud.
[0075] Specifically, for a three-dimensional point cloud thinning method provided in this embodiment, first divide the original point cloud into several sub-point clouds, then divide each sub-point cloud into several categories according to the normal vector parameters of each point cloud, and solve to obtain the resampling matrices of different categories through the point cloud thinning and optimization models established for different categories. After merging the thinned point clouds of each category of each sub-point cloud, the thinned point cloud of the original point cloud is obtained, which can ensure the accuracy and efficiency of the thinned point cloud.
[0076] In an optional embodiment of the present invention, the K-means clustering algorithm is used to divide the original point cloud into several sub-point clouds.
[0077] Specifically, in this embodiment, for the original point cloud the K-means clustering algorithm is used to divide it into several sub-point clouds. The number of points in the original point cloud X is N. Let the number of points in the sub-point cloud be p, then the number of sub-point clouds divided from the original point cloud X is where, is the floor function; use the K-means algorithm to divide the original point cloud into m sub-point clouds
[0078] In an optional embodiment of the present invention, the process of obtaining the normal vector parameters of each point cloud in the sub-point cloud and dividing the sub-point cloud into several categories according to the normal vector parameters includes:
[0079] Use the weighted plane fitting method to obtain the normal vectors of each point cloud y i in the sub-point cloud Y ij , and its expression is:
[0080] n ij = p(y ij );
[0081] where, i is the i-th sub-point cloud, and j is the j-th point cloud;
[0082] Use the k-nearest neighbors (KNN) algorithm to obtain each point cloud y ij The corresponding k-nearest neighbor points knn(y ij ), and obtain the normal vector parameter r corresponding to each point cloud ij , and its expression is:
[0083]
[0084] Among them, y ij is the j-th point cloud in the i-th sub-point cloud Y i . |<p(y ij ), p(q l )>| is the absolute value of the dot product of the normal vectors p(y ij ) and p(q l ). p(q l ) is the normal vector of point q l . k is the value of k for selecting k-nearest neighbor points. q l is a k-nearest neighbor point of y ij . q l ∈knn(y ij );
[0085] According to the value of the normal vector parameter r of each point cloud y ij , divide the sub-point cloud into several categories, and its expression is: ij Among them,
[0086]
[0087] where, is the v-th category of the i-th sub-point cloud Y i . is the category corresponding to the j-th point cloud in the i-th sub-point cloud Y i . is the number of points in the v-th category i of the i-th sub-point cloud Y . v is the number of categories included in the sub-point cloud.
[0088] In an alternative embodiment of the present invention, the categories of the sub-point cloud include seven categories; specifically: if 0 ≤ r ij < 0.003, it is set as the first category; if 0.003 ≤ r ij < 0.004, it is set as the second category; if 0.004 ≤ r ij < 0.008, it is set as the third category; if 0.008 ≤ r ij < 0.016, it is set as the fourth category; if 0.016 ≤ r ij < 0.032, it is set as the fifth category; if 0.032 ≤ r ij< 0.064, it is set as the sixth category; if 0.064 ≤ r ij ≤ 1, it is set as the seventh category.
[0089] In an optional embodiment of the present invention, the process of constructing the feature loss function includes:
[0090] For each sub - point cloud Y i of the v - th category Take the set composed of its respective point clouds as the vertex set
[0091] According to the category of the sub - point cloud, obtain the matrix Its expression is:
[0092]
[0093] Wherein, is the th point in;
[0094] For the j - th vertex Use the KNN algorithm to obtain its k nearest neighbor points Obtain the vertex set corresponding adjacency matrix and weighted adjacency matrix Their expressions are respectively:
[0095]
[0096]
[0097] Wherein, is the element in the a - th row and b - th column of the adjacency matrix is the b - th point in, is the set of k nearest neighbor points of the a - th point in;
[0098]
[0099]
[0100] Wherein, σ is the weight parameter, ||·||2 is the Euclidean norm, is the element in the a - th row and b - th column of the weighted adjacency matrix
[0101] Normalize the adjacency matrix to obtain the normalized weighted adjacency matrix Wherein, each element in the normalized weighted adjacency matrix is:
[0102]
[0103] According to the normalized weighted adjacency matrix the vertex set is normalized to obtain the normalized Laplacian matrix I is the identity matrix of order;
[0104] Using the normalized Laplacian matrix extract the features of the v-th class i in to obtain
[0105] Resample the v-th class i in the sub-point cloud Y to obtain the resampling matrix which satisfies:
[0106]
[0107] where is the element in the g-th row and h-th column of the resampling matrix and is the trace of the resampling matrix and α is the reduction rate;
[0108] Resample the matrix to obtain the features of the simplified point cloud and obtain the feature loss function whose expression is:
[0109]
[0110] where ||·||2 is the Euclidean norm.
[0111] In an alternative embodiment of the present invention, the process of constructing the uniformity loss function includes:
[0112] According to the resampling matrix simplify the point cloud in the v-th class i in the sub-point cloud Y to obtain its adjacency matrix
[0113] According to the adjacency matrix obtain the uniformity loss function whose expression is:
[0114]
[0115] where c = (1, 1,..., 1)T , is the v-th class of the sub-point cloud Y i of the number of k-nearest neighbors of each point cloud in the downsampled point cloud.
[0116] In an alternative embodiment of the present invention, the feature loss function and the uniformity loss function corresponding to each category are added to obtain the loss function corresponding to each category The expression thereof is:[[]]
[0117]
[0118] where λ is a hyperparameter, 0 ≤ λ ≤ 1.
[0119] In an alternative embodiment of the present invention, the loss function corresponding to each class is minimized to obtain a resampling matrix, and the loss function corresponding to each category is solved to obtain the sub-point cloud Y i of the v-th class resampling matrix The expression thereof is:[[]]
[0120]
[0121] If
[0122] If g ≠ h
[0123]
[0124] In an alternative embodiment of the present invention, the loss function corresponding to each category is simplified, and the expression thereof is:[[]]
[0125]
[0126]
[0127]
[0128] element.
[0129] Considering that the simplified loss function model has a quadratic objective function and linear constraint conditions, the Lagrange multiplier method is used to solve it; each element of the simplified obtained is used as the confidence of the points to be retained, and the points with the highest confidence are retained points, and the remaining points are discarded, so as to obtain each sub-point cloud Y i each class of sub-point clouds downsampled point cloud.
[0130] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant are intended to cover non-exclusive inclusion, so that an article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the article or device comprising said element. Words such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The orientation or positional relationship indicated by "above", "below", "left", "right", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
[0131] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification.
[0132] The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can be made, and all should be regarded as belonging to the protection scope of the present invention.
Claims
1. A three-dimensional point cloud reduction method, characterized in that Including: Obtain the original point cloud and divide the original point cloud into a number of sub-point clouds; Obtain the normal vector parameters of each point cloud in the sub-point clouds, and divide the sub-point clouds into several categories according to the normal vector parameters; According to the categories of the sub-point clouds, construct a feature loss function and a uniformity loss function for each category, and add the feature loss function and the uniformity loss function corresponding to each category as the loss function corresponding to each category; The process of constructing the feature loss function includes: For each sub-point cloud the class is taken as the vertex set by using the set formed by all its point clouds ; Obtain a matrix according to the category of the sub-point cloud , and its expression is: ; Among them, is the th point; For the th vertex , , use the KNN algorithm to obtain its nearest neighbor points , obtain the vertex set corresponding adjacency matrix and weighted adjacency matrix , and their expressions are respectively: ; ; Among them, is the adjacency matrix the a -th row and b -th column element, is the b -th point in and is the a -th point's set of nearest neighbor points; ; ; Among them, is the weight parameter, is the Euclidean norm, is the weighted adjacency matrix in the a row and the b column element; The adjacency matrix is normalized to obtain a normalized weighted adjacency matrix ; According to the normalized weighted adjacency matrix , the vertex set is normalized to obtain the normalized Laplacian matrix , where is the identity matrix of order Using the normalized Laplacian matrix Extract sub-point clouds in the class features to obtain ; Resample the sub-point cloud in the category to obtain a resampling matrix , which satisfies: ; Among them, is the element in the th g row and h th column of the resampling matrix, is the trace of the resampling matrix , is the simplification rate; Resample the matrix to obtain the features of the downsampled point cloud and obtain the feature loss function whose expression is: ; Among them, is the Euclidean norm; The process of constructing the uniformity loss function includes: According to the resampling matrix , simplify the point cloud in the category and obtain its adjacency matrix ; According to the adjacency matrix , the uniformity loss function is obtained, and its expression is: ; Among them, , , is the ith class of the sub-point cloud in the downsampled point cloud, and the number of nearest neighbors of each point cloud in the downsampled point cloud is; Solve the loss function of each category, obtain the resampling matrix corresponding to each category, and obtain the thinned point cloud of this category; Merge the thinned point clouds of each category to obtain the thinned point cloud corresponding to the sub-point cloud; Merge the thinned point clouds corresponding to the sub-point clouds to obtain the thinned point cloud corresponding to the original point cloud.
2. The three-dimensional point cloud reduction method according to claim 1, characterized in that Use the K-means clustering algorithm to divide the original point cloud into a number of sub-point clouds.
3. The three-dimensional point cloud reduction method according to claim 2, wherein The process of obtaining the normal vector parameters of each point cloud in the sub-point clouds and dividing the sub-point clouds into several categories according to the normal vector parameters includes: Use the weighted plane fitting method to obtain the sub-point cloud in each point cloud The normal vector is expressed as: ; Among them, is the sub-point cloud, is the point cloud; Use the nearest neighbor algorithm to obtain each point cloud corresponding nearest neighbor points , and obtain the normal vector parameters corresponding to each point cloud , and its expression is: ; Among them, is the th sub - point cloud in the th point cloud, is the absolute value of the dot product of the and normal vectors, is the normal vector of the point ; is the value for selecting k neighboring points, is the th neighboring point, ; According to the normal vector parameters of each point cloud and the value of , the sub-point cloud is divided into several categories, and its expression is: ; Among them, is the sub-point cloud of the category, is the sub-point cloud in the category corresponding to the point cloud, is the sub-point cloud category of the number of points, is the number of categories included in the sub-point cloud.
4. The three-dimensional point cloud thinning method according to claim 3, wherein The categories of the sub-point clouds include seven categories, namely: if , it is set as the first category; if , it is set as the second category; if , it is set as the third category; if , it is set as the fourth category; if , it is set as the fifth category; if , it is set as the sixth category; if , it is set as the seventh category.
5. The three-dimensional point cloud reduction method according to claim 4, wherein Add the feature loss function and the uniformity loss function corresponding to each category to obtain the loss function corresponding to each category , and its expression is: ; Among them, is a hyperparameter, .
6. The three-dimensional point cloud thinning method according to claim 5, wherein Solve the loss function corresponding to each category to obtain the sub-point cloud The th resampling matrix of the category, and its expression is: 。 7. The three-dimensional point cloud thinning method according to claim 6, wherein Simplify the loss function corresponding to each category, and its expression is: ; Among them, a resampling vector is set , , a diagonal matrix is set , a vector is set , is the resampling vector is the -th dimension of the resampling vector