A clustering and boundary feature preservation method for calculating the volume of car trunk point cloud
By processing point cloud data using the KD tree algorithm and clustering technology, the difficulty and accuracy problems of calculating the volume of the car trunk were solved, and efficient and accurate volume calculation was achieved.
Patent Information
- Application Number
- CN202210666910.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-06-13
AI Technical Summary
In the existing technology, the method of calculating the volume of a car trunk based on point cloud data is difficult to calculate and its accuracy is difficult to guarantee.
The k-neighborhood of the point cloud data is obtained through the kd-tree algorithm, the covariance matrix is calculated to obtain the normal vector and curvature, denoising and simplification are performed, the clustering algorithm is used to retain the boundaries and feature points, and finally the slicing method is used to calculate the volume.
The amount of point cloud data is reduced, the influence of noise is eliminated, the calculation speed and accuracy are improved, and the accuracy of the calculation results is guaranteed.
Smart Images

Figure CN115131424B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features. Background Art
[0002] Car trunk volume is a key indicator of a vehicle's luggage carrying capacity, directly impacting the user experience and a key concern for buyers. With the continuous advancement of science and technology, non-contact measurement methods, such as 3D laser scanning, are rapidly gaining popularity in the field of volume measurement due to their accuracy, efficiency, non-destructive properties, and adaptability to complex scenarios. These methods utilize a high-frequency laser to perform a comprehensive scan of an object. The reflected laser signal is then received and recorded, and the 3D coordinates of a dense point cloud on the object's surface and contours are calculated to determine the object's volume.
[0003] However, calculating the volume of car trunk point cloud data acquired through 3D laser scanning is difficult due to its large data volume and irregular shape. Traditional methods for calculating the volume of irregular object point clouds require reverse modeling of the 3D point cloud to obtain a closed triangular facet model. A computer then calculates the volume of the volume elements formed by each facet and the center point and sums them to obtain the final point cloud data volume. This method requires reverse modeling, which is highly complex, and the calculation accuracy is significantly affected by the number of triangular facets. Summary of the Invention
[0004] The main purpose of the present invention is to provide a method and system for calculating the point cloud volume of a car trunk by clustering and preserving boundary features, aiming to solve the technical problems in the existing technology of calculating the volume of a car trunk based on point cloud data, such as the difficulty in calculation and the difficulty in ensuring accuracy.
[0005] In a first aspect, the present invention provides a method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features, the method comprising:
[0006] Scan the inner surface of the car trunk to obtain point cloud data;
[0007] Get each point in the point cloud data and its corresponding k neighborhood through the kd tree algorithm;
[0008] Based on each point and its corresponding k-neighborhood, the covariance matrix of each point is obtained;
[0009] Obtain the normal vector and curvature of each point according to the covariance matrix of each point;
[0010] De-noising the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data;
[0011] Simplify the new point cloud data to obtain simplified point cloud data;
[0012] The volume of the car trunk is calculated based on the simplified point cloud data.
[0013] Optionally, the step of obtaining the normal vector and curvature of each point according to the covariance matrix of each point includes:
[0014] Perform eigendecomposition on the covariance matrix of each point to obtain the three eigenvalues corresponding to the covariance matrix of each point;
[0015] The eigenvector corresponding to the minimum eigenvalue among the three eigenvalues is taken as the normal vector of the corresponding point;
[0016] The ratio of the minimum eigenvalue to the sum of the three eigenvalues is taken as the curvature of the corresponding point.
[0017] Optionally, the step of performing denoising on the point cloud data based on the normal vector and curvature of each point includes:
[0018] Feature partitioning of point cloud data based on the curvature of each point;
[0019] Orthogonal least squares method is used to denoise the point cloud data in flat areas, and improved bilateral filtering is used to denoise the point cloud data in feature areas based on the normal vector of each point.
[0020] Optionally, before the step of performing denoising on the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data, the method further includes:
[0021] Large-scale noise in point cloud data is removed by density peak clustering algorithm.
[0022] Optionally, the step of streamlining the new point cloud data includes:
[0023] Identify boundary points based on the angle between the vector formed by each point and its neighboring points and the reference vector of each point;
[0024] Identify feature points based on the curvature of each point;
[0025] The k-means clustering algorithm is used to cluster the new point cloud data. The clusters obtained by clustering are distinguished. The clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas.
[0026] For the clusters in the feature area, the k-means clustering algorithm is used to cluster the clusters according to the number of boundary points and feature points they contain. The boundary points and feature points are retained, and the remaining points are replaced by cluster center points.
[0027] For clusters in non-feature areas, secondary feature points are extracted and retained. Secondary feature points are judged by the distance between each point in the cluster and its k-neighbor fitting plane, and the remaining points are replaced by cluster center points.
[0028] In a second aspect, the present invention further provides a system for calculating the volume of a car trunk point cloud with clustering and boundary feature preservation, the system comprising:
[0029] A scanning module is used to scan the inner surface of the car trunk to obtain point cloud data;
[0030] The k-neighborhood construction module is used to obtain each point in the point cloud data and its corresponding k-neighborhood through the kd-tree algorithm;
[0031] The topological information calculation module is used to obtain the covariance matrix of each point based on each point and its corresponding k-neighborhood; and obtain the normal vector and curvature of each point according to the covariance matrix of each point;
[0032] The denoising module is used to denoise the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data;
[0033] The streamlining module is used to perform streamlining processing on the new point cloud data to obtain the streamlined point cloud data;
[0034] The volume calculation module is used to calculate the volume of the car trunk based on the simplified point cloud data.
[0035] Optionally, the topology information calculation module is used to:
[0036] Perform eigendecomposition on the covariance matrix of each point to obtain the three eigenvalues corresponding to the covariance matrix of each point;
[0037] The eigenvector corresponding to the minimum eigenvalue among the three eigenvalues is taken as the normal vector of the corresponding point;
[0038] The ratio of the minimum eigenvalue to the sum of the three eigenvalues is taken as the curvature of the corresponding point.
[0039] Optionally, the denoising module is used to:
[0040] Feature partitioning of point cloud data based on the curvature of each point;
[0041] Orthogonal least squares method is used to denoise the point cloud data in flat areas, and improved bilateral filtering is used to denoise the point cloud data in feature areas based on the normal vector of each point.
[0042] Optionally, the clustering and boundary feature preservation car trunk point cloud volume calculation system also includes a coarse denoising module for:
[0043] Large-scale noise in point cloud data is removed by density peak clustering algorithm.
[0044] Optional, streamlined modules for:
[0045] Identify boundary points based on the angle between the vector formed by each point and its neighboring points and the reference vector of each point;
[0046] Identify feature points based on the curvature of each point;
[0047] The k-means clustering algorithm is used to cluster the new point cloud data. The clusters obtained by clustering are distinguished. The clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas.
[0048] For the clusters in the feature area, the k-means clustering algorithm is used to cluster the clusters according to the number of boundary points and feature points they contain. The boundary points and feature points are retained, and the remaining points are replaced by cluster center points.
[0049] For clusters in non-feature areas, secondary feature points are extracted and retained. Secondary feature points are judged by the distance between each point in the cluster and its k-neighbor fitting plane, and the remaining points are replaced by cluster center points.
[0050] In the present invention, the inner surface of a car trunk is scanned to obtain point cloud data; each point in the point cloud data and its corresponding k-neighborhood are obtained using a kd-tree algorithm; a covariance matrix of each point is obtained based on the point and its corresponding k-neighborhood; the normal vector and curvature of each point are obtained based on the covariance matrix of each point; the point cloud data is denoised based on the normal vector and curvature of each point to obtain new point cloud data; the new point cloud data is streamlined to obtain streamlined point cloud data; and the volume of the car trunk is calculated based on the streamlined point cloud data. By denoising and streamlining the point cloud data, the present invention reduces the amount of point cloud data and eliminates the effects of noise, thereby increasing the speed of calculating the car trunk volume based on the point cloud data and minimizing feature loss, thereby ensuring the accuracy of the calculation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic flow chart of an embodiment of a method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features according to the present invention;
[0052] Figure 2 Schematic diagram of the functional modules of an embodiment of the car trunk point cloud volume calculation system with clustering and boundary feature preservation of the present invention.
[0053] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0055] In a first aspect, an embodiment of the present invention provides a method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features.
[0056] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of a method for calculating the volume of a car trunk point cloud with clustering and boundary feature preservation according to the present invention. Figure 1 As shown in FIG, the clustering and boundary feature preservation method for calculating the volume of the car trunk point cloud includes:
[0057] Step S10, scanning the inner surface of the car trunk to obtain point cloud data;
[0058] In this embodiment, a three-dimensional laser scanning device is used to scan the inner surface of the car trunk to collect its point cloud data, and the original car trunk point cloud data containing a large number of noise points and redundant points is obtained.
[0059] Step S20, obtaining each point in the point cloud data and its corresponding k-neighborhood by using a kd-tree algorithm;
[0060] Step S30, based on each point and its corresponding k-neighborhood, obtaining the covariance matrix of each point;
[0061] Step S40, obtaining the normal vector and curvature of each point according to the covariance matrix of each point;
[0062] In this embodiment, the topological relationship of the point cloud data is established, including: constructing the point cloud k-neighborhood through the kd-tree algorithm; estimating the point cloud normal vector using the principal component analysis method; and replacing the curvature with the variational approximation of the point cloud surface. These three parts are implemented to ensure the efficiency and accuracy of subsequent point cloud data denoising and streamlining.
[0063] Furthermore, in one embodiment, step S40 includes:
[0064] Perform eigendecomposition on the covariance matrix of each point to obtain the three eigenvalues corresponding to the covariance matrix of each point; use the eigenvector corresponding to the minimum eigenvalue among the three eigenvalues as the normal vector of the corresponding point; and use the ratio of the minimum eigenvalue to the sum of the three eigenvalues as the curvature of the corresponding point.
[0065] In this embodiment, based on steps S20 to S30, point p is obtained. i (any point in the point cloud data) and the corresponding k-neighborhood N(p i )={p j ,j∈1,2,...k} to get its covariance matrix:
[0066]
[0067] Point p i The covariance matrix C is decomposed to obtain eigenvalues λ1, λ2, and λ3. Let λ1<λ2<λ3, then the eigenvector α1 corresponding to the minimum eigenvalue λ1 is the point p i The normal vector of each point can be obtained by analogy.
[0068] The surface variation r is used to approximate the point cloud curvature R to characterize the geometric features of the local area. The curvature R at point p is calculated based on the eigenvalues λ1, λ2, and λ3 of the covariance matrix C of each point:
[0069]
[0070] Step S50, performing denoising processing on the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data;
[0071] In this embodiment, the point cloud data is partitioned based on the curvature of each point, and different regions are denoised using different denoising methods, thereby obtaining new point cloud data.
[0072] Furthermore, in one embodiment, step S50 includes:
[0073] Feature partitioning of point cloud data based on the curvature of each point;
[0074] Orthogonal least squares method is used to denoise the point cloud data in flat areas, and improved bilateral filtering is used to denoise the point cloud data in feature areas based on the normal vector of each point.
[0075] In this embodiment, based on the shape characteristics of the trunk, the flat area of the trunk point cloud and the feature area containing concave and convex structures are feature-divided using point curvature and its standard deviation.
[0076] The curvature of the known point pi is Ri, and the average curvature in its neighborhood is
[0077]
[0078] The standard deviation of the neighborhood point curvature is
[0079]
[0080] Then define the characteristic judgment value e:
[0081]
[0082] Where: Rm is the curvature threshold, δ is the standard deviation threshold.
[0083] The feature area is divided by the feature judgment value e. If e=3, it means that the curvature of the representative point pi and its neighborhood points are small, and the curvature dispersion of the neighborhood points is small, then pi is judged to be a flat area point. On the contrary, if e<3, then pi is a feature area point.
[0084] Improved bilateral filtering is used to denoise the point cloud data in the feature area. Specifically:
[0085] Improved bilateral filtering uses point neighborhood information to move the normal vector direction of the point cloud data to correct the point coordinate position to achieve a smoothing effect. The formula is as follows:
[0086] p′=p+α·n
[0087] Where: α is the bilateral filter factor. The original coordinate p is adjusted according to α and the normal vector n to obtain the new coordinate p′. The calculation formula of α is as follows:
[0088]
[0089]
[0090]
[0091] Where: k is the number of points in the neighborhood of sampling point p, p i is the neighborhood point, ω c ,ω s are the smoothing filtering weight function and the feature preserving weight function, σ c and σ s They correspond to the smoothness and feature preservation of bilateral filtering respectively.
[0092] Usually, σc takes the neighborhood radius:
[0093] σ c =max||pp i ||
[0094] When σc is determined, the value of σs has a greater impact on the smoothing effect. The larger σs is, the larger the normal correction distance of p is and the greater the smoothing degree is. Therefore, let
[0095] σ s =t·σ c
[0096]
[0097] Where t is the feature preservation weight, R is the curvature of point p, is the average curvature of the neighborhood of p. The value of t is determined by the curvature of point p and its neighborhood, so that t is proportional to the feature preservation degree, thereby realizing adaptive adjustment of feature preservation parameters.
[0098] Orthogonal least squares method is used to denoise the point cloud data in flat areas. Specifically:
[0099] The orthogonal global least squares method calculates the distance di from each point to the fitting plane and sets a threshold to remove noise, d i The calculation formula is as follows:
[0100]
[0101] Among them, a, b, and c are fitting plane parameters. are the average coordinates of the neighborhood points.
[0102] Furthermore, in one embodiment, before step S50, the following steps are further included:
[0103] Large-scale noise in point cloud data is removed by density peak clustering algorithm.
[0104] In this embodiment, the local density ρ of the point cloud is first calculated. i The distance δ from the nearest high-density point i .
[0105] Local density ρ i and the distance δ from the nearest high density point i The calculation formula is as follows:
[0106]
[0107]
[0108] in: d ij For point p i To point p j The distance, d c is the cutoff distance.
[0109] Then for ρ i and δ i Arrange in descending order, set the noise judgment threshold s according to the noise level, s is 80~90, and δ i In the top s% and ρ i The points in the last s% are marked as noise points and removed to obtain coarse denoised data.
[0110] That is, a coarse denoising process is performed before step S50 , and step S50 further performs denoising process based on the point cloud data that has undergone the coarse denoising process.
[0111] Step S60, simplifying the new point cloud data to obtain simplified point cloud data;
[0112] In this embodiment, new point cloud data is obtained after denoising processing, and then the new point cloud data is streamlined to obtain streamlined point cloud data.
[0113] Furthermore, in one embodiment, step S60 includes:
[0114] Boundary points are identified based on the angle between the vector formed by each point and its neighborhood points and the reference vector of each point; feature points are identified based on the curvature of each point; the new point cloud data are clustered using the k-means clustering algorithm, and the clusters obtained by clustering are distinguished. Clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas; for clusters in feature areas, the k-means clustering algorithm is used to cluster the clusters according to the number of boundary points and feature points they contain, and the boundary points and feature points are retained, and the remaining points are replaced by cluster center points; for clusters in non-feature areas, secondary feature points are extracted and retained, where secondary feature points are judged by the distance from each point in the cluster to its k-neighborhood fitting plane, and the remaining points are replaced by cluster center points.
[0115] In this embodiment, firstly use point p i The k-neighborhood of the p i Project each point in its neighborhood onto the fitting plane, and connect p i A vector set is obtained by summing up the neighboring points, and then any vector in the vector set is selected as the reference vector, and the angle between each vector and the reference vector is calculated.
[0116] Set the angle threshold θ s , generally take 2 / 3π, and take the maximum angle θ between each vector and the reference vector max With threshold θ s Compare, if θ max >θ s , then it is considered that point p i is the boundary point.
[0117] The feature point determination method is the same as the detailed embodiment of the above step S50 and will not be described in detail here.
[0118] After determining the boundary points and feature points, the clustering process is as follows:
[0119] 1. Set the number of clusters k according to the target reduction rate. Assuming the reduction rate is g and the total number of point clouds is N, then k = N*(1-g).
[0120] 2. According to the size of the number of clusters k, find the layer with the number of nodes closest to the k value in the kd tree, and use all the corresponding nodes in the layer as the initial cluster centers.
[0121] 3. Calculate the distance between all points and each cluster center, determine the distance between each point and each cluster center in turn, and assign each point to the cluster with the nearest cluster center.
[0122] 4. Calculate the distance between each point in the cluster and the cluster center to find the point closest to the center. This point is the cluster centroid. Use it as the new cluster center and cluster again. Repeat the above steps until the cluster center does not change. Clustering is complete.
[0123] Then, the clusters after clustering are distinguished, and the clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas:
[0124] For the clusters in the feature area, the clusters are further subdivided by the improved k-means clustering according to the number of boundary points and feature points they contain. The number of subdivided clusters is k'=ns, where ns is the total number of feature points.
[0125] For clusters in non-feature areas, the secondary feature points are extracted and retained. The secondary feature points are calculated by the distance d from each point in the cluster to its k-neighborhood fitting plane. i Make a judgment, distance d i The calculation formula is the same as that of the detailed embodiment of step S50 above, and will not be described in detail here.
[0126] Finally, after the boundary points, feature points, and secondary feature points are confirmed, they are retained, and the remaining points in each cluster are replaced by the cluster center points. This completes the simplification of the trunk point cloud while retaining the boundary feature information.
[0127] Step S70: Calculate the volume of the car trunk based on the simplified point cloud data.
[0128] In this embodiment, the point cloud volume calculation is performed after the point cloud data is denoised and streamlined to improve the calculation efficiency and ensure the accuracy of the calculation results. Due to the characteristic of the car trunk point cloud contour changing smoothly, the slicing method is used to calculate the point cloud data volume. The specific steps are as follows:
[0129] 1. Set the point cloud slice spacing h according to the point cloud model height H. The number of point cloud slice layers n = H / h. The height of the remaining part that cannot be sliced is h. s =Hn*h.
[0130] 2. After slicing, use the α-shape algorithm to identify the point cloud contour boundary. Specifically:
[0131] Project the slice layer point cloud onto the XOY plane to obtain a two-dimensional point set P0. Pick any point p1 from P0 as the center of the circle, build a range circle with a radius of 2α, and define the point set composed of all points in the circle as P 01 .
[0132] In P 01Take any point p2, construct a new range circle with points p1 and p2 and radius α, and calculate the center of the new circle p o (p o x,p o y) and P 01 The remaining points to p o The distance, the center coordinate po is calculated as follows:
[0133]
[0134] If the distances between all points are greater than α, then p1 and p2 are judged to be contour points, and the above steps are repeated for the remaining unjudged points in P0 until all points in P0 are judged; otherwise, the above steps are repeated for the remaining unjudged points in P01 until P 01 All points have been judged.
[0135] After all points in P0 are judged, the point cloud contour extraction of the slice layer is realized.
[0136] 3. After extracting the contour boundary, use the polygon determinant formula to calculate the polygon area Si enclosed by the point cloud of each slice layer.
[0137] Assume that the contour point set P of the i-th layer point cloud slice i The coordinates of each point in is p j (x j ,y j )(j=0,1...m), p0=p m , then the formula for calculating the polygon area determinant is:
[0138]
[0139] 4. After calculating the area of the point cloud data slices, the volume of each part is accumulated to obtain the volume V of the entire point cloud, that is, the volume of the car trunk. Here, based on the characteristics of the trunk space, each cut segment is regarded as a platform, and the last unsliced part is regarded as a cylinder. The calculation formula is as follows:
[0140]
[0141] Where: V is the point cloud volume, n is the number of slice layers, h is the slice spacing, Si is the area of the i-th slice, and hs is the remaining height of the slice.
[0142] In this embodiment, the inner surface of the car trunk is scanned to obtain point cloud data; each point in the point cloud data and its corresponding k-neighborhood are obtained through the kd-tree algorithm; based on each point and its corresponding k-neighborhood, the covariance matrix of each point is obtained; the normal vector and curvature of each point are obtained according to the covariance matrix of each point; the point cloud data is denoised based on the normal vector and curvature of each point to obtain new point cloud data; the new point cloud data is streamlined to obtain streamlined point cloud data; and the volume of the car trunk is calculated based on the streamlined point cloud data. Through this embodiment, the point cloud data is denoised and streamlined, which means that while maintaining feature information, the amount of point cloud data is reduced and the influence of noise is eliminated, thereby improving the speed of calculating the volume of the car trunk based on point cloud data and ensuring the accuracy of the calculation results.
[0143] In a second aspect, an embodiment of the present invention further provides a car trunk point cloud volume calculation system with clustering and boundary feature preservation.
[0144] In one embodiment, referring to Figure 2 , Figure 2 This is a functional module diagram of an embodiment of a car trunk point cloud volume calculation system with clustering and boundary feature preservation according to the present invention. Figure 2 As shown, the car trunk point cloud volume calculation system with clustering and boundary feature preservation includes:
[0145] Scanning module 10, used to scan the inner surface of the car trunk to obtain point cloud data;
[0146] A k-neighborhood construction module 20 is used to obtain each point in the point cloud data and its corresponding k-neighborhood through a kd-tree algorithm;
[0147] The topology information calculation module 30 is used to obtain the covariance matrix of each point based on each point and its corresponding k-neighborhood; and obtain the normal vector and curvature of each point according to the covariance matrix of each point;
[0148] A denoising module 40 is used to perform denoising on the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data;
[0149] A simplification module 50 is used to perform simplification processing on the new point cloud data to obtain simplified point cloud data;
[0150] The volume calculation module 60 is used to calculate the volume of the car trunk based on the simplified point cloud data.
[0151] Furthermore, in one embodiment, the topology information calculation module 30 is configured to:
[0152] Perform eigendecomposition on the covariance matrix of each point to obtain the three eigenvalues corresponding to the covariance matrix of each point;
[0153] The eigenvector corresponding to the minimum eigenvalue among the three eigenvalues is taken as the normal vector of the corresponding point;
[0154] The ratio of the minimum eigenvalue to the sum of the three eigenvalues is taken as the curvature of the corresponding point.
[0155] Furthermore, in one embodiment, the denoising module 40 is configured to:
[0156] Feature partitioning of point cloud data based on the curvature of each point;
[0157] Orthogonal least squares method is used to denoise the point cloud data in flat areas, and improved bilateral filtering is used to denoise the point cloud data in feature areas based on the normal vector of each point.
[0158] Furthermore, in one embodiment, the clustering and boundary feature-preserving automobile trunk point cloud volume calculation system further includes a coarse denoising module for:
[0159] Large-scale noise in point cloud data is removed by density peak clustering algorithm.
[0160] Furthermore, in one embodiment, the streamlining module 50 is configured to:
[0161] Identify boundary points based on the angle between the vector formed by each point and its neighboring points and the reference vector of each point;
[0162] Identify feature points based on the curvature of each point;
[0163] The k-means clustering algorithm is used to cluster the new point cloud data. The clusters obtained by clustering are distinguished. The clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas.
[0164] For the clusters in the feature area, the k-means clustering algorithm is used to cluster the clusters according to the number of boundary points and feature points they contain. The boundary points and feature points are retained, and the remaining points are replaced by cluster center points.
[0165] For clusters in non-feature areas, secondary feature points are extracted and retained. Secondary feature points are judged by the distance between each point in the cluster and its k-neighborhood fitting plane, and the remaining points are replaced by cluster center points.
[0166] Among them, the functional implementation of each module in the above-mentioned clustering and boundary feature-preserving automobile trunk point cloud volume calculation system corresponds to the various steps in the above-mentioned clustering and boundary feature-preserving automobile trunk point cloud volume calculation method embodiment, and its functions and implementation processes will not be repeated here one by one.
[0167] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0168] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0169] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to execute the methods described in various embodiments of the present invention.
[0170] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features, characterized in that: The point cloud data processing and volume calculation method for clustering and boundary feature preservation includes: Scan the inner surface of the car trunk to obtain point cloud data; Get each point in the point cloud data and its corresponding k neighborhood through the kd tree algorithm; Based on each point and its corresponding k-neighborhood, the covariance matrix of each point is obtained; Obtain the normal vector and curvature of each point according to the covariance matrix of each point; De-noising the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data; Simplify the new point cloud data to obtain simplified point cloud data; The volume of the car trunk is calculated based on the simplified point cloud data; The step of performing denoising on the point cloud data based on the normal vector and curvature of each point includes: Feature partitioning of point cloud data based on the curvature of each point; Orthogonal least squares method is used to denoise the point cloud data in flat areas, and improved bilateral filtering is used to denoise the point cloud data in feature areas based on the normal vector of each point. The step of streamlining the new point cloud data includes: Identify boundary points based on the angle between the vector formed by each point and its neighboring points and the reference vector of each point; Identify feature points based on the curvature of each point; The k-means clustering algorithm is used to cluster the new point cloud data. The clusters obtained by clustering are distinguished. The clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas. For the clusters in the feature area, the k-means clustering algorithm is used to cluster the clusters according to the number of boundary points and feature points they contain. The boundary points and feature points are retained, and the remaining points are replaced by cluster center points. For clusters in non-feature areas, secondary feature points are extracted and retained. Secondary feature points are judged by the distance between each point in the cluster and its k-neighbor fitting plane, and the remaining points are replaced by cluster center points.
2. The method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features according to claim 1, wherein: The step of obtaining the normal vector and curvature of each point according to the covariance matrix of each point includes: Perform eigendecomposition on the covariance matrix of each point to obtain the three eigenvalues corresponding to the covariance matrix of each point; The eigenvector corresponding to the minimum eigenvalue among the three eigenvalues is taken as the normal vector of the corresponding point; The ratio of the minimum eigenvalue to the sum of the three eigenvalues is taken as the curvature of the corresponding point.
3. The method for calculating the volume of a car trunk point cloud by clustering and preserving boundary features according to claim 1, wherein: Before the step of performing denoising on the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data, the method further includes: Large-scale noise in point cloud data is removed by density peak clustering algorithm.
4. A car trunk point cloud volume calculation system based on clustering and boundary feature preservation, characterized in that: The clustering and boundary feature preservation automobile trunk point cloud volume calculation system includes: A scanning module is used to scan the inner surface of the car trunk to obtain point cloud data; The k-neighborhood construction module is used to obtain each point in the point cloud data and its corresponding k-neighborhood through the kd-tree algorithm; The topological information calculation module is used to obtain the covariance matrix of each point based on each point and its corresponding k-neighborhood; and obtain the normal vector and curvature of each point according to the covariance matrix of each point; The denoising module is used to denoise the point cloud data based on the normal vector and curvature of each point to obtain new point cloud data; The streamlining module is used to perform streamlining processing on the new point cloud data to obtain the streamlined point cloud data; Volume calculation module, used to calculate the volume of the car trunk based on the simplified point cloud data; The denoising module is used to: Feature partitioning of point cloud data based on the curvature of each point; Orthogonal least squares method is used to denoise the point cloud data in flat areas, and improved bilateral filtering is used to denoise the point cloud data in feature areas based on the normal vector of each point. The Lite module is used to: Identify boundary points based on the angle between the vector formed by each point and its neighboring points and the reference vector of each point; Identify feature points based on the curvature of each point; The k-means clustering algorithm is used to cluster the new point cloud data. The clusters obtained by clustering are distinguished. The clusters containing boundary points and feature points are regarded as feature areas, and the rest are non-feature areas. For the clusters in the feature area, the k-means clustering algorithm is used to cluster the clusters according to the number of boundary points and feature points they contain. The boundary points and feature points are retained, and the remaining points are replaced by cluster center points. For clusters in non-feature areas, secondary feature points are extracted and retained. Secondary feature points are judged by the distance between each point in the cluster and its k-neighbor fitting plane, and the remaining points are replaced by cluster center points.
5. The car trunk point cloud volume calculation system with clustering and boundary feature preservation according to claim 4, characterized in that: The topology information calculation module is used to: Perform eigendecomposition on the covariance matrix of each point to obtain the three eigenvalues corresponding to the covariance matrix of each point; The eigenvector corresponding to the minimum eigenvalue among the three eigenvalues is taken as the normal vector of the corresponding point; The ratio of the minimum eigenvalue to the sum of the three eigenvalues is taken as the curvature of the corresponding point.
6. The car trunk point cloud volume calculation system with clustering and boundary feature preservation according to claim 4, characterized in that: The car trunk point cloud volume calculation system with clustering and boundary feature preservation also includes a coarse denoising module for: Large-scale noise in point cloud data is removed by density peak clustering algorithm.