A method for calculating the distance between rigid point cloud surfaces with high efficiency and accuracy
Through the ICP iterative registration method of area division and improved point clouds, the problems of low accuracy and high complexity in three-dimensional point cloud measurement are solved, and efficient and high-precision point cloud surface distance calculation is realized, meeting the high-precision measurement needs of industrial production.
Patent Information
- Application Number
- CN202111534451.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-12-15
AI Technical Summary
The prior art has problems such as low measurement accuracy, high computational complexity, and misregistration in three-dimensional point cloud measurement, which cannot meet the high-precision measurement requirements, especially in industrial production.
By dividing the point clouds in regions, the improved ICP iterative registration method based on point cloud uncertainty is adopted to register the point clouds in non-wearing areas and the reference point clouds in high-precision surface distance calculations, and the distance between point cloud surfaces is obtained.
It realizes efficient and high-precision point cloud surface distance calculation, solves the problems of low measurement accuracy and high calculation complexity, improves registration accuracy, avoids misregistration, and meets the high-precision measurement needs of industrial production.
Smart Images

Figure CN114266783B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a method for calculating the distance between rigid point cloud surfaces with high efficiency and high precision. Background Art
[0002] With the rapid development of computer vision technology, especially three-dimensional stereo vision technology, the demand for three-dimensional point cloud measurement is increasing. The application areas of three-dimensional point clouds include various fields such as vehicle autonomous navigation, industrial automation, and drone spatial positioning. Since the acquisition of point clouds may come from different sensors, their reference coordinate systems are different. How to quickly unify their coordinate systems has important guiding significance for subsequent target recognition and posture estimation. In addition, in actual industrial production with more precise requirements, it is sometimes necessary to measure the changes in the shape of the same target. However, the current measurement methods still have problems such as low measurement accuracy, high computational complexity, and misalignment. They cannot meet the requirements of high-precision measurement and bring serious safety hazards to subsequent industrial production. Therefore, a fast and high-precision point cloud surface distance calculation method is urgently needed.
[0003] The main technologies for distance measurement design of point cloud surfaces are point cloud registration and point cloud computing. In terms of point cloud registration, the commonly used method is to register two rigid point clouds. The commonly used point cloud registration often uses ICP iteration to perform point cloud registration. Since ICP iteration uses Euclidean distance as the optimization target and does not consider the uncertainty of point distribution in the point cloud, the registration accuracy may not be ideal. In addition, since the measured point cloud and the target point cloud are not completely consistent, there are morphological changes in certain positions, which will lead to a decrease in registration accuracy. There is a large amount of measurement noise in the measured point cloud, which will also interfere with the registration, causing the registration to fall into a local solution or even fail to converge. Finally, the optimization method has strict requirements on the initialization angle and position. A large range of angle and position changes will cause registration failure.
[0004] In terms of point cloud measurement, existing methods are mostly applicable to the same point cloud density, and the measurement accuracy will decrease when the target point cloud is sparse. In addition, point cloud measurement is only based on the distance between the nearest corresponding points of the target point cloud and the measurement point cloud, and the measurement accuracy is low, which cannot meet the requirements of higher accuracy.
[0005] Chinese invention patent, publication number CN107123134A, patent name is a feature-based dangerous rock mass landslide monitoring method, which discloses a method for calculating the deformation variable of point cloud data by a local surface fitting method. The general local plane fitting method is adopted, and the deformation variable is determined by calculating the distance between the point in the reference point cloud data and the center of gravity of the point cloud data to be measured in the cylinder.
[0006] Chinese invention patent, publication number CN113160129A, patent name is a fast registration method for combined simplified point cloud data, which discloses judging feature areas and non-feature areas by Gaussian curvature of non-boundary points, and then performing PCA rough registration and ICP fine registration of non-feature areas.
[0007] The Chinese invention patent, publication number CN113205486A, is titled "Surface defect detection method, device and storage medium based on three-dimensional point cloud". It discloses an improved method for the coarse registration of four coplanar points, but does not optimize the ICP fine matching.
[0008] However, the above patent cannot achieve high-precision calculation of the distance between rigid point cloud surfaces. Summary of the invention
[0009] In order to solve the technical problems existing in the prior art, the purpose of the present invention is to provide a method for calculating the distance between rigid point cloud surfaces with high efficiency and high precision.
[0010] In order to achieve the above purpose and the above technical effect, the technical solution adopted by the present invention is:
[0011] A method for calculating the distance between rigid point cloud surfaces efficiently and accurately includes the following steps:
[0012] S1. Point cloud area division
[0013] Divide the point cloud into regions to obtain point clouds in the worn area and point clouds in the non-worn area; process the point cloud to obtain a pure point cloud to be tested;
[0014] S2. Registration of point cloud with reference point cloud
[0015] The point cloud of the non-wear area and the reference point cloud are registered with high precision through the improved ICP iterative registration based on point cloud uncertainty: the uncertainty coefficient and uncertainty of the point cloud of the non-wear area are used to perform weighted summation on the Euclidean distance of the ICP iterative point cloud, thereby reducing the interference of noise points on the registration and improving the registration accuracy;
[0016] S3. By calculating the surface distance between high-precision point clouds, the distance between point cloud surfaces is finally obtained.
[0017] In step S2, in the improved ICP iterative registration based on point cloud uncertainty, the point cloud is downsampled by 2 L times as the initial value of the iteration, and each downsampling is 2 i The point cloud to be tested and the reference point cloud are saved. As the iteration progresses, 2 are used for every 10*i iterations. L-iThe downsampling result is used as the registered point cloud set until the actual point cloud set size is restored to speed up the point cloud registration time. At the same time, in each iteration process, the noise with low confidence is removed to improve the registration accuracy.
[0018] Furthermore, in the improved ICP iterative registration based on point cloud uncertainty, during the 10*jth iteration, the point cloud of the non-wear area to be measured is expressed as in,
[0019] Assuming the total number of point clouds is N, the total number of point clouds after downsampling is N / 2 (L-j) ;
[0020] The reference point cloud of the non-wear area is expressed as Q = {q i},in,
[0021] Furthermore, in the improved ICP iterative registration based on point cloud uncertainty, the uncertainty of the point cloud to be registered in the non-wear area is determined in each iteration process. The confidence of the reliable points is high, and the noise is eliminated due to the low confidence. The Euclidean distance of the point cloud is obtained as follows:
[0022]
[0023] T f =[R f |t f ]=arg min E(R f |t f )
[0024] in, q j is the corresponding nearest point; ∑ k represents the covariance matrix composed of uncertainties; R f ,t f They represent the best rotation matrix and translation matrix obtained in each ICP iterative registration, respectively, and are obtained by solving the minimum value of the formula E(R|t).
[0025] Furthermore, the uncertainty of the point cloud to be registered in the non-wear area is obtained by the following steps:
[0026] The point cloud of the non-wear area is sampled by the farthest point sampling method to obtain the K key points q closest to the point cloud surface. K ;
[0027] Select any two points from the point cloud to be registered by Ransac method, and calculate the relationship between the two points and the key point q K The intersection of the two unit vectors is point U K,iRepeat the above steps N times to obtain the uncertain point set {U K,i |i=1,...,N}, and then get the uncertainty coefficient:
[0028]
[0029] Where q represents one of the points in the point cloud set Q of the reference point cloud in the non-wear area, ρ represents the trust threshold, the closer the unit vectors of the uncertain point set are, the larger the coefficient of uncertainty is, and the higher the confidence is;
[0030] Then we get the key point q K The three-dimensional spatial distribution of the key point q K The mean value u k and uncertainty
[0031]
[0032]
[0033] In step S3, the point cloud to be measured and the reference point cloud are projected, and the index of the relevant points of the reference point cloud corresponding to the neighborhood of the projected point cloud to be measured is calculated; the local plane normal vector of the neighborhood reference point cloud is calculated by the index value, so as to obtain the distance measurement result from the point cloud to be measured to the reference surface; the remaining point cloud noise is removed by the moving least squares algorithm and point cloud resampling, so as to obtain the point cloud of the high-precision three-dimensional point cloud surface.
[0034] In step S3, the high-precision wear measurement specifically includes the following steps:
[0035] (1) Obtain the index set of neighborhood related points:
[0036] Project the wear area point cloud to be tested and the reference area point cloud along the height direction into a two-dimensional point cloud, take the projected wear point to be tested as the center point, search for all points of the left and right reference wear area point clouds with r as the radius, and store the corresponding index combination;
[0037] (2) Determine the plane normal vector of the reference point cloud; according to the two-dimensional reference point set Q′ i Corresponding index set I, get the corresponding Q i = {q ij}, q ij ∈R 3×L , L represents the point set Q′ i The length of the plane is fitted using the Ransac algorithm, and the corresponding normal vector s = [a i ,b i ,c i ] T , the corresponding point set that satisfies the Ransac algorithm is L' represents the point set The collection length of
[0038] (3) Calculate the distance between the surfaces of two point clouds:
[0039] Calculate the centroid of the neighborhood fitting point set, and the surface distance is expressed as the distance from the point in the test area to the plane passing through the centroid and with the plane normal vector s;
[0040] Calculation point set The centroid of Then the distance d between the point cloud planes i Indicated as the wear point to be measured p i Passed the centroid The distance to the plane whose normal vector is s:
[0041]
[0042]
[0043]
[0044] in, and Respectively represent point p i The three components of and Represents the centroid The three components of i , b i 、c i They represent the three components of the fitted local plane normal vector s, obtained by Ransac plane fitting of the local plane; l i represents the equation of the plane passing through the center of mass, d i Represents the calculated distance between two surfaces, achieved by fitting local planes;
[0045] (4) Point cloud resampling and smoothing:
[0046] The moving least squares method is applied to smooth the point cloud and resample the point cloud to obtain the distance between the surfaces of the final two point clouds.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention discloses a method for calculating the distance between rigid point cloud surfaces with high efficiency and high precision, comprising the following steps: S1, division of point cloud regions: dividing the point cloud into regions to obtain wear regions and non-wear regions; processing the point cloud to be measured to obtain a pure point cloud to be measured; S2, registration of the point cloud to be measured and the reference point cloud: rigidly registering the point cloud to be measured in the non-wear region and the reference point cloud using an ICP iterative registration method based on point cloud uncertainty to obtain the uncertainty coefficient and uncertainty of the point cloud to be measured in the non-wear region; S3, finally obtaining the distance between point cloud surfaces through high-precision wear measurement. The method for calculating the distance between rigid point cloud surfaces with high efficiency and high precision provided by the present invention solves the following three problems: first, solving the problem of how to perform high-precision registration when there is a difference in morphology between the measured point cloud and the target point cloud; second, solving the problem of how to ensure that the registration does not fall into a local solution and reaches the global optimum when the measured point cloud and the target point cloud are registered; third, solving the problem of low measurement accuracy in current point cloud measurement and inability to meet high-precision measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0050] The present invention is described in detail below so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0051] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be given later.
[0052] like Figure 1 As shown, a method for calculating the distance between rigid point cloud surfaces with high efficiency and accuracy includes the following steps:
[0053] S1. Division of point cloud area: The point cloud is divided into regions to obtain point clouds in the wear area and point clouds in the non-wear area. The point cloud to be tested is segmented by radius point cloud, most of the noise point clouds are removed, and RANSAC local surface fitting is performed to obtain a relatively pure point cloud to be tested.
[0054] S2. Registration of the test point cloud and the reference point cloud: The test point cloud in the non-wear area and the reference point cloud are rigidly registered by using the ICP iterative registration method based on point cloud uncertainty. The registration adopts the improved ICP iterative registration. The main improvements are as follows:
[0055] a. Downsample the point cloud 2 L times as the initial value of the iteration, and each downsampling is 2 i The point cloud to be tested and the reference point cloud are saved. As the iteration progresses, 2 L-i The downsampling result is used as the point cloud set for registration until the actual point cloud set size is restored. The advantage of this is that it can speed up the point cloud registration time, reduce unnecessary redundant calculations, and thus reduce the computational complexity;
[0056] b. ICP point cloud registration based on point cloud uncertainty. In each iteration, we need to determine the uncertainty of the point cloud to be matched. Reliable points have high confidence, while noise points will be removed due to low confidence, thereby improving the accuracy and stability of the final matching result.
[0057] Step S2 specifically includes the following steps:
[0058] (1) In the ICP iteration, according to the above improvement a, in the 10*jth iteration, the point cloud of the non-wear area to be measured is expressed as in, Among them, the total number of point clouds is N, so the total number of point clouds after downsampling is N / 2 (L-j) Similarly, the reference point cloud of the non-wear area is expressed as Q = {q i},in,
[0059] (2) According to improvement b, the Euclidean distance of the ICP optimization objective function is improved as follows:
[0060]
[0061] T f =[R f |t f ]=arg min E(R f |t f )
[0062] in, q j is the corresponding nearest point; ∑ k represents the covariance matrix composed of uncertainties; R f ,t f They represent the best rotation matrix and translation matrix obtained in each ICP iterative registration, which are obtained by solving the minimum value of the formula E(R|t);
[0063] (3) Calculation uncertainty
[0064] The farthest point sampling method is used to sample the point cloud to be registered, and the K key points q closest to the point cloud surface are obtained.K ; Select any two points from the point cloud to be registered by RANSAC, and calculate the relationship between the two points and the corresponding key point q K The unit vector of the two vectors is obtained as point U K,i , repeat N times to get the uncertain point set {U K,i |i=1,...,N}, and then get the uncertainty coefficient of this point:
[0065]
[0066] Among them, q represents one of the points in the point cloud set Q of the reference point cloud in the non-wear area, and ρ represents the trust threshold. Therefore, this function is an indicative function. The closer the unit vectors of the uncertain point set are, the larger the coefficient of uncertainty is, and the higher the credibility is.
[0067] Therefore, we can get the key point q K The three-dimensional spatial distribution of the point is obtained by k And uncertainty:
[0068]
[0069]
[0070] By improving b, the registration accuracy of the point cloud can be effectively improved.
[0071] S3. High-precision wear measurement, calculate the distance between point clouds. Use the z-axis of the point cloud to represent the height direction, project the point cloud to be tested and the reference point cloud, and calculate the index of the relevant points of the reference point cloud corresponding to the neighborhood of the projected point cloud to be tested; then, calculate the local plane normal vector of the neighborhood reference point cloud through the index value, so as to obtain the distance measurement result from the point cloud to be tested to the reference surface; finally, remove the remaining point cloud noise through the moving least squares algorithm and point cloud resampling, and obtain the point cloud of the high-precision three-dimensional point cloud surface.
[0072] Step S3 specifically includes the following steps:
[0073] (1) Obtain the index set of neighborhood related points. Project the point cloud of the wear area to be tested and the point cloud of the reference area along the height direction into a two-dimensional point cloud. Take the projected wear point to be tested as the center point, search for all points of the left and right reference wear area point clouds with r as the radius, and store the corresponding index combination;
[0074] (2) Determine the plane normal vector of the reference point cloud; according to the two-dimensional reference point set Q′ i Corresponding index set I, get the corresponding Q i = {q ij}, q ij ∈R 3×L, L represents the point set Q′ i The length of the plane is fitted using the Ransac algorithm, and the corresponding normal vector s = [a i ,b i ,c i ] T , the corresponding point set that satisfies the Ransac algorithm is L' represents the point set The collection length of
[0075] (3) Calculate the distance between the surfaces of the two point clouds. Calculate the centroid of the neighborhood fitting point set, and the surface distance can be expressed as the distance from the point in the test area to the plane passing through the centroid and with the plane normal vector s. Calculate the point set The centroid of Then the distance d between the point cloud planes i Indicated as the wear point to be measured p i Passed the centroid The distance to the plane whose normal vector is s:
[0076]
[0077]
[0078]
[0079] in, and Respectively represent point p i The three components of and Represents the centroid The three components of i , b i 、c i They represent the three components of the fitted local plane normal vector s, obtained by Ransac plane fitting of the local plane; l i represents the equation of the plane passing through the center of mass, d i Represents the calculated distance between two surfaces, achieved by fitting local planes;
[0080] (4) Point cloud resampling and smoothing. Since the normal vector directions of the point cloud to be measured are inconsistent due to the noise point cloud, the moving least squares method is used to smooth the point cloud and resample the point cloud to obtain the distance between the surfaces of the final two point clouds.
[0081] Compared with the invention patent with publication number CN107123134A, the local plane fitting of the present invention is determined by the radius after projection in the z direction, and a different deformation determination method is adopted to first determine the local plane from the point cloud to be measured to the reference point cloud. The plane passes through the centroid of the point cloud within the projection radius, and the normal vector parameters are equal to the normal vector parameters of the plane fitted by the point within the projection radius of the reference point cloud. The improvement of the distance measurement of the point cloud surface of the present invention is mainly in point cloud registration and point cloud computing.
[0082] Parts or structures not specifically described in the present invention may adopt existing technologies or existing products and will not be described in detail here.
[0083] The above descriptions are merely 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 specification 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 distance between rigid point cloud surfaces with high efficiency and high precision, characterized in that: The following steps are involved: S1. Point cloud area division Divide the point cloud into regions to obtain point clouds in the worn area and point clouds in the non-worn area; Process the point cloud to obtain a pure point cloud to be tested; S2. Registration of point cloud with reference point cloud The point cloud of the non-wear area and the reference point cloud are registered with high precision through the improved ICP iterative registration based on point cloud uncertainty: the uncertainty coefficient and uncertainty of the point cloud of the non-wear area are used to perform weighted summation on the Euclidean distance of the ICP iterative point cloud, thereby reducing the interference of noise points on the registration and improving the registration accuracy; S3, finally obtaining the distance between point cloud surfaces through high-precision point cloud surface distance calculation; In step S2, in the improved ICP iterative registration based on point cloud uncertainty, the point cloud is downsampled by 2 L times as the initial value of the iteration, and each downsampling is 2 i The point cloud to be tested and the reference point cloud are saved. As the iteration progresses, 2 are used for every 10*i iterations. L-i The downsampling result is used as the point cloud set for registration until the actual point cloud set size is restored to speed up the point cloud registration time. At the same time, in each iteration process, the noise with low confidence is removed to improve the registration accuracy. In the improved ICP iterative registration based on point cloud uncertainty, the uncertainty of the point cloud to be registered in the non-wear area is determined in each iteration. The confidence of reliable points is high, and the noise is eliminated due to low confidence. The Euclidean distance of the point cloud is obtained as follows: T f =[R f t f ]=arg min E(R f |t f ) in, q j is the corresponding nearest point; ∑ k represents the covariance matrix composed of uncertainties; R f ,t f They represent the best rotation matrix and translation matrix obtained in each ICP iterative registration, which are obtained by solving the minimum value of the formula E(R|t); The uncertainty of the point cloud to be registered in the non-worn area is obtained by the following steps: The point cloud of the non-wear area is sampled by the farthest point sampling method to obtain the K key points q closest to the point cloud surface. K ; Select any two points from the point cloud to be registered by Ransac method, and calculate the relationship between the two points and the key point q K The intersection of the two unit vectors is point U K,i Repeat the above steps N times to obtain the uncertain point set {U K,i |i=1,...N}, and then get the uncertainty coefficient: Where q represents one of the points in the point cloud set Q of the reference point cloud in the non-wear area, ρ represents the trust threshold, the closer the unit vectors of the uncertain point set are, the larger the coefficient of uncertainty is, and the higher the confidence is; Then we get the key point q K The three-dimensional spatial distribution of the key point q K The mean value u k and uncertainty In step S3, the high-precision wear measurement specifically includes the following steps: (1) Obtain the index set of neighborhood related points: Project the wear area point cloud to be tested and the reference area point cloud along the height direction into a two-dimensional point cloud, take the projected wear point to be tested as the center point, search for all points of the left and right reference wear area point clouds with r as the radius, and store the corresponding index combination; (2) Determine the plane normal vector of the reference point cloud; according to the two-dimensional reference point set Q′ i Corresponding index set I, get the corresponding Q i = {q ij }, q ij ∈R 3×L , L represents the point set Q′ i The length of the plane is fitted using the Ransac algorithm, and the corresponding normal vector s = [a i ,b i ,c i ] T , the corresponding point set that satisfies the Ransac algorithm is L′≤L, L' represents the point set The collection length of (3) Calculate the distance between the surfaces of two point clouds: Calculate the centroid of the neighborhood fitting point set, and the surface distance is expressed as the distance from the point in the test area to the plane passing through the centroid and with the plane normal vector s; Calculation point set The centroid of Then the distance d between the point cloud planes i Indicated as the wear point to be measured p i Passed the centroid The distance of the plane whose normal vector is s; in, and Respectively represent point p i The three components of and Represents the centroid The three components of i , b i 、c i They represent the three components of the fitted local plane normal vector s, obtained by Ransac plane fitting of the local plane; l i represents the equation of the plane passing through the center of mass, d i Represents the calculated distance between two surfaces, achieved by fitting local planes; (4) Point cloud resampling and smoothing: The moving least squares method is applied to smooth the point cloud and resample the point cloud to obtain the distance between the surfaces of the final two point clouds.
2. The method for calculating the distance between rigid point cloud surfaces with high efficiency and high precision according to claim 1, characterized in that: In the improved ICP iterative registration based on point cloud uncertainty, during the 10*jth iteration, the point cloud of the non-wear area to be measured is expressed as in, Assume the total number of point clouds is N, L represents the point set Q′ i The length of the downsampled point cloud is N / 2. (L-j ); The reference point cloud of the non-wear area is expressed as Q = {q i },in, 3. The method for calculating the distance between rigid point cloud surfaces with high efficiency and high precision according to claim 1, characterized in that: In step S3, point cloud projection is performed on the point cloud to be measured and the reference point cloud, and the index of the relevant point of the reference point cloud corresponding to the neighborhood of the point cloud to be measured after projection is calculated; The local plane normal vector of the neighborhood reference point cloud is calculated through the index value, thereby obtaining the distance measurement result from the point cloud to be measured to the reference surface; the remaining point cloud noise is removed by the moving least squares algorithm and point cloud resampling to obtain a high-precision point cloud of the three-dimensional point cloud surface.
Citation Information
Patent Citations
Dangerous rock body landslide monitoring method based on characteristics
CN107123134A
Quick registration method for combined simplified point cloud data
CN113160129A
Three-dimensional point cloud-based surface defect detection method and device and storage medium
CN113205486A
Point cloud registration method based on feature extraction
CN110335297A
Cuckoo optimization-based three-dimensional point cloud data registration method
CN111415379A