Machining allowance calculation method based on three-dimensional point cloud registration

By using a 3D point cloud registration method, which utilizes decentralization and feature point cloud extraction, combined with α-shape and averaged elevation algorithms for point cloud registration, the problem of low calculation accuracy and low efficiency in the polishing and finishing of curved parts is solved, and efficient and stable machining allowance calculation is achieved.

CN122023482APending Publication Date: 2026-05-12TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-01-26
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing 3D point cloud registration methods have low computational accuracy and low efficiency in the polishing and finishing of curved surface parts. They are particularly prone to registration instability and error accumulation on complex curved surface parts, and their reliance on initial pose parameter adjustment leads to low efficiency in field applications.

Method used

A 3D point cloud registration method is adopted, which obtains feature point clouds through decentralized processing. Combining coarse and fine registration stages, the α-shape algorithm and the average elevation algorithm are used for point cloud registration. A dynamic learning rate strategy and KD-Tree optimization are adopted to decompose global optimization into local optimization, thereby improving registration accuracy and efficiency.

Benefits of technology

It improves the accuracy and efficiency of machining allowance calculation, reduces on-site parameter adjustment time, and achieves stable and reliable point cloud registration, making it suitable for polishing and finishing of complex curved surface parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023482A_ABST
    Figure CN122023482A_ABST
Patent Text Reader

Abstract

The invention discloses a working allowance calculation method based on three-dimensional point cloud registration, and relates to the technical field of machining. The method aims at solving the problems that an existing machining allowance calculation method is low in calculation accuracy and low in efficiency. The method comprises the following steps: acquiring an ideal pose point cloud P of a part and a point cloud Q of a to-be-registered part, and performing coarse registration by using the P and the Q to obtain a coarse registration result; points in the ideal pose point cloud P of the part are divided into boundary local points and non-boundary local points; performing fine registration by using the coarse registration result, the boundary local points and the non-boundary local points to obtain a final point cloud result; and obtaining the machining allowance corresponding to each point in the final point cloud result. The machining allowance of the part curved surface relative to the ideal curved surface is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machining technology, and in particular to a method for calculating machining allowance based on three-dimensional point cloud registration. Background Technology

[0002] Polishing and finishing of curved surfaces is a core process in precision machinery manufacturing to achieve the required surface quality and geometric accuracy for complex curved workpieces. Its applications widely cover key components such as aerospace engine blades, precision optical lenses, mold cavities, and medical device joint components. To ensure polishing quality and surface consistency during the polishing and finishing process of curved surfaces, it is usually necessary to accurately assess the geometric deviations and machining allowances between the workpiece surface and the design model before polishing.

[0003] Currently, the main method for obtaining workpiece surface point cloud data is through 3D scanning and other means. The measured point cloud data is then registered with the CAD model or nominal point cloud using the Iterative Closest Point (ICP) method to calculate the distance from the workpiece surface to the designed curved surface, which is then used as the machining allowance. However, since the objects to be polished are mostly free-form or complex curved parts, the measured point clouds often contain noise, local missing data, uneven density, and large curvature variations. Traditional point cloud registration methods based on ICP are highly sensitive to initial pose and data quality, easily leading to registration instability or local error accumulation, resulting in low accuracy in machining allowance calculation. Furthermore, large-scale point cloud nearest neighbor search and iterative optimization are time-consuming and highly dependent on the initial pose. In field applications, parameter tuning is still required, and manual parameter tuning increases point cloud registration time, further reducing the efficiency of machining allowance calculation. Summary of the Invention

[0004] This invention aims to address the problems of low accuracy and low efficiency in existing machining allowance calculation methods by proposing a machining allowance calculation method based on 3D point cloud registration.

[0005] A method for calculating machining allowance based on 3D point cloud registration is as follows:

[0006] Step 1: Obtain the ideal pose point cloud P of the part and the point cloud Q of the part to be registered. Use P and Q to perform coarse registration and obtain the coarse registration result.

[0007] Step 2: Divide the points in the ideal pose point cloud P of the part into boundary local points and non-boundary local points;

[0008] Step 3: Using the coarse registration result obtained in Step 1 and the boundary local points and non-boundary local points obtained in Step 2, perform fine registration to obtain the final point cloud result. ;

[0009] Step 4: Obtain the final point cloud results The machining allowance corresponding to each point in the process.

[0010] Further, in step one, the point cloud P of the ideal pose of the part and the point cloud Q of the part to be registered are obtained. Coarse registration is then performed using P and Q to obtain the coarse registration result, specifically as follows:

[0011] Step 11: Obtain the ideal pose point cloud P of the part and the point cloud Q of the part to be registered, specifically as follows:

[0012] The standard part's 3D CAD model is discretized into a point cloud to obtain the ideal pose point cloud P, and the point cloud Q of the part to be registered is obtained using a 3D scanner.

[0013] Steps 1 and 2: Obtain the centroid of the ideal pose point cloud using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. and respectively utilize and The ideal pose point cloud of the part and the point cloud of the part to be registered are decentralized to obtain the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered.

[0014] Step 13: Obtain ideal feature point clouds using the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered, respectively. and the feature point cloud to be registered ;

[0015] Step 14: Utilizing Ideal Feature Point Clouds and the feature point cloud to be registered Obtain coarse matching results.

[0016] Furthermore, in steps one and two, the centroid of the ideal pose point cloud is obtained using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. and respectively utilize and The point clouds of the ideal pose of the part and the point clouds of the part to be registered are decentralized to obtain decentralized point clouds of the ideal pose of the part and decentralized point clouds of the part to be registered, specifically as follows:

[0017] Step 121: Obtain the centroid of the ideal pose point cloud using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. Specifically:

[0018]

[0019]

[0020] in, It represents the number of points in the ideal pose point cloud of the part. It is the label of the midpoint in the ideal pose point cloud of the part. It represents the number of points in the point cloud of the part to be registered. These are the labels of the points in the point cloud of the part to be registered. It is the first in the ideal pose point cloud of the part One point, It is the first in the point cloud of the part to be registered One point;

[0021] Steps 1 and 2: Utilize respectively and The point clouds of the ideal pose of the part and the point clouds of the part to be registered are decentralized to obtain decentralized point clouds of the ideal pose of the part and decentralized point clouds of the part to be registered, specifically as follows:

[0022]

[0023]

[0024] in, It is decentralized , It is decentralized .

[0025] Furthermore, in steps one and three, ideal feature point clouds are obtained respectively from the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered. and the feature point cloud to be registered Specifically:

[0026] Step 131: Obtain the distance between points and the centroid in the decentralized ideal pose point cloud of the part. and spatial local density Specifically:

[0027]

[0028]

[0029] in, yes Distance to the center of mass It is the modulus symbol. It is the first in the ideal pose point cloud of the part One point, It is the local density of points in the decentralized ideal pose point cloud of the parts. It is the minimum value;

[0030] Step 1, Step 3, Step 2: Obtain the distance between points and centroids in the decentralized point cloud of the part to be registered. and spatial local density Specifically:

[0031]

[0032]

[0033] in, yes Distance to the center of mass It is the first in the point cloud of the part to be registered One point;

[0034] Step 133, Utilize , , and Obtaining the ideal feature point cloud and the feature point cloud to be registered Specifically:

[0035] First, and The sum of the points in the ideal pose point cloud of the decentralized components is the first... The scores of each point are sorted from largest to smallest in the centered ideal pose point cloud of the part. The points corresponding to each score form an ideal feature point cloud. ;

[0036] Then, and The sum of the points in the decentralized point cloud of the parts to be registered is the first. The scores of each point are sorted from largest to smallest in the centered point cloud of the part to be registered. The points corresponding to each score form a feature point cloud to be registered. .

[0037] Furthermore, in step one four, the ideal feature point cloud is utilized. and the feature point cloud to be registered The coarse matching result is obtained as follows:

[0038] Step 141: Obtain the ideal feature point cloud center of mass and the feature point cloud to be registered center of mass and utilize and Decentralize the feature points in the ideal feature point cloud and the feature points in the feature point cloud to be registered to obtain the decentralized ideal feature point cloud and the decentralized feature point cloud to be registered.

[0039] The decentralized ideal feature points and the decentralized feature points to be registered are obtained through the following method:

[0040]

[0041]

[0042]

[0043]

[0044] in, It is the first after decentralization An ideal feature point, It is the first An ideal feature point, It is an ideal feature point cloud The center of mass, It is a feature point cloud to be registered. The center of mass, It is the first after decentralization One feature point to be registered It is the first One feature point to be registered It is the total number of feature points. These are feature point labels;

[0045] Step 142: Obtain the decentralized ideal feature matrix using the decentralized ideal feature point cloud and the decentralized feature point cloud to be registered. and the decentralized feature matrix to be registered ,use and Constructing the covariance matrix Then, singular value decomposition is performed on the covariance matrix to obtain the left singular vector matrix. and right singular vector matrix ;

[0046] The decentralized ideal feature matrix The middle row represents the coordinates of a point in the ideal feature cloud after decentralization;

[0047] The decentralized feature matrix to be registered The middle row represents the coordinates of a point in the decentralized feature point cloud to be registered;

[0048] The use of the decentralized ideal feature matrix and the decentralized feature matrix to be registered Constructing the covariance matrix Specifically:

[0049]

[0050] in, It is transpose;

[0051] The singular value decomposition of the covariance matrix is ​​specifically as follows:

[0052]

[0053] in, It is a left singular vector matrix. It is a right singular vector matrix. It is a singular value matrix;

[0054] Step 143: Using the left singular vector matrix and right singular vector matrix Obtain the coarse registration rotation matrix And coarse registration translation matrix Specifically:

[0055]

[0056]

[0057] Step 144: Using the coarse registration rotation matrix And coarse registration translation matrix The point cloud Q of the part to be registered is transformed to obtain the coarse registration result, specifically:

[0058]

[0059] in, It is the point cloud of the part to be registered after coarse registration.

[0060] Furthermore, in step two, the division of points in the ideal pose point cloud P of the part into boundary local points and non-boundary local points is achieved using the α-shape algorithm.

[0061] Furthermore, in step three, the coarse registration result obtained in step one and the boundary local points and non-boundary local points obtained in step two are used for fine registration to obtain the final point cloud result. Specifically:

[0062] Step 3.1 Initialize the number of iterations Initialize the rotation matrix Initialize the translation matrix Initialize the registration matrix Initialize the learning rate ;

[0063] in, It is a constant;

[0064] The Based on a preset initial unit quaternion Specifically, the acquisition is as follows:

[0065]

[0066] in, It is a preset initial unit quaternion. It is the element value in the preset unit quaternion. It is the initial rotation matrix;

[0067] The based on Specifically, the acquisition is as follows:

[0068]

[0069]

[0070] in, It is the initial registration matrix. It is the initial translation matrix;

[0071] Step 32: Using KD-Tree to search midpoint exist The corresponding point in , obtain normal vector and curvature ,use , , and Obtain the averaged elevation function value ;

[0072] Step 33, Utilize Obtain the loss function value , loss function Compared with the preset target loss function value Comparison, will With maximum number of iterations In comparison, if and Then use the learning rate Update the rotation and translation matrices to obtain the updated rotation matrix. and the updated translation matrix Then proceed to steps three and four; otherwise, directly obtain the registration matrix. ,make Output the final point cloud result. ;

[0073] Steps 3 and 4: Utilize the updated rotation matrix and the updated translation matrix Obtain the updated registration matrix Specifically:

[0074]

[0075] Step 35, Judgment Is it an integer? If it is an integer, then let Then let And return to step 32; otherwise, let Then let And return to step three two;

[0076] in, .

[0077] Furthermore, the utilization in step three two... , , and Obtain the averaged elevation function value Specifically:

[0078]

[0079]

[0080]

[0081]

[0082]

[0083] in, It is the length of the mold. It is an absolute value. and These are weighting coefficients. It is a point Radial distance to local sea level, It is a point Time The Euclidean distance.

[0084] Furthermore, the utilization in step three is... Obtain the loss function value Specifically:

[0085]

[0086] The use of learning rate Update the rotation and translation matrices to obtain the updated rotation matrix. and the updated translation matrix Specifically:

[0087] The updated rotation matrix Based on the updated quaternion get;

[0088] The updated quaternion Obtained through the following methods:

[0089]

[0090] in, It is a quaternion gradient, It is the first Quaternions in round iterations It is the first Quaternions in round iterations;

[0091] The updated translation matrix It can be obtained through the following methods:

[0092]

[0093] in, It is a translation gradient. It is the first The translation matrix of the round of iterations, It is the first The translation matrix for each iteration.

[0094] Furthermore, in step four, the final point cloud result is obtained. The machining allowance corresponding to each point is as follows:

[0095] Step 41: In the final point cloud result Manual pickup For each pick point, obtain the reference external normal vector. Specifically:

[0096]

[0097]

[0098]

[0099] in, It is the first Each pick-up point references the outer normal vector. , It is the label of the pickup point. It is the total number of pick points. It is the first The normal vector of each pick point It is the first Each pickup point points to The reference vector, It is the first The coordinates of each pickup point The final cloud result The geometric center coordinates of the bounding box. yes The minimum x-coordinate among all the coordinates of a point. yes The maximum x-coordinate among all the coordinates of a point. yes The minimum value of the ordinate among all the coordinates of a point. yes The maximum value of the ordinate among all the coordinates of a point. yes The minimum vertical coordinate among all the coordinates of a point. yes The maximum vertical coordinate among all the coordinates of a point;

[0100] Step 42: Use the PCA algorithm to obtain The normal vectors of all points except the picking point are obtained. The angle between the normal vectors of all points except the picking point and the nearest external reference normal vector is calculated. If the angle between the current point's normal vector and the nearest external reference normal vector is greater than a preset angle, the current point's normal vector is reversed, and the reversed current point normal vector is marked and added to the set. Otherwise, directly mark the normal vector of the current point and add the normal vector of the current point to the set. ;

[0101] Step 43, based on The direction of the normal vector is obtained. The perpendicular distance from a point in the standard part to the surface of the 3D CAD model. ,Will This is the machining allowance at the current point.

[0102] The beneficial effects of this invention are as follows:

[0103] This invention proposes a method for calculating machining allowance in curved surface polishing and finishing scenarios. The invention acquires point clouds of a standard part and the part to be registered, and decenters the point clouds to eliminate overall translational deviations. Feature points of the part's point cloud are obtained based on point cloud density characteristics. Coarse registration of the point cloud is achieved based on these feature points, followed by fine registration. The fine registration process employs an elevation averaging algorithm combined with a KD-Tree to decompose global optimization into local optimizations, effectively avoiding local optima. Furthermore, the invention uses a region-based optimization method for the point cloud, improving convergence speed while ensuring registration accuracy, achieving stable and reliable point cloud registration and enhancing the accuracy of machining allowance calculation. This invention does not rely on the initial pose of the point cloud, avoiding parameter tuning in field applications, reducing point cloud registration time, and improving the efficiency of machining allowance calculation. Attached Figure Description

[0104] Figure 1 This is a flowchart of the present invention;

[0105] Figure 2 To visualize point cloud maps. Detailed Implementation

[0106] Specific implementation method one: as follows Figure 1 As shown, the specific process of the machining allowance calculation method based on 3D point cloud registration in this embodiment is as follows:

[0107] Step 1: Obtain the ideal pose point cloud P of the part and the point cloud Q of the part to be registered. Use P and Q to perform coarse registration to obtain the coarse registration result, specifically:

[0108] Step 11: Obtain the ideal pose point cloud P of the part and the point cloud Q of the part to be registered. Use P and Q to form a point cloud database. Specifically:

[0109] The ideal pose point cloud P is obtained by discretizing the 3D CAD model of the standard part and obtaining the measured point cloud Q of the part to be registered by a 3D scanner. The two are then used to construct a point cloud database.

[0110] Steps 1 and 2: Obtain the centroid of the ideal pose point cloud using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. and respectively utilize and The point clouds of the ideal pose of the part and the point clouds of the part to be registered are decentralized to obtain decentralized point clouds of the ideal pose of the part and decentralized point clouds of the part to be registered, specifically as follows:

[0111] Step 121: Obtain the centroid of the ideal pose point cloud using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. Specifically:

[0112]

[0113]

[0114] in, It represents the number of points in the ideal pose point cloud of the part. It is the label of the midpoint in the ideal pose point cloud of the part. It represents the number of points in the point cloud of the part to be registered. These are the labels of the points in the point cloud of the part to be registered. It is the first in the ideal pose point cloud of the part One point, It is the first in the point cloud of the part to be registered One point;

[0115] Steps 1 and 2: Utilize respectively and The point clouds of the ideal pose of the part and the point clouds of the part to be registered are decentralized to obtain decentralized point clouds of the ideal pose of the part and decentralized point clouds of the part to be registered, specifically as follows:

[0116]

[0117]

[0118] in, It is decentralized , It is decentralized ;

[0119] Step 13: Select the ideal feature point cloud and the feature point cloud to be registered from the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered, respectively. Specifically:

[0120] Step 131: Obtain the distance between points and the centroid in the decentralized ideal pose point cloud of the part. and spatial local density Specifically:

[0121]

[0122]

[0123] in, yes The modulus length represents Distance to the center of mass It is the first in the ideal pose point cloud of the part One point, It is the local density of points in the decentralized ideal pose point cloud of the parts. It is the minimum value;

[0124] Step 1, Step 3, Step 2: Obtain the distance between points and centroids in the decentralized point cloud of the part to be registered. and spatial local density Specifically:

[0125]

[0126]

[0127] in, yes The modulus length represents Distance to the center of mass It is the first in the point cloud of the part to be registered One point.

[0128] Step 133, Utilize , , and Obtaining the ideal feature point cloud and the feature point cloud to be registered Specifically:

[0129] First, and The sum of the points in the ideal pose point cloud of the decentralized components is the first... The scores of each point are sorted from largest to smallest in the centered ideal pose point cloud of the part. The points corresponding to each score form an ideal feature point cloud. ;

[0130] Then, and The sum of the points in the decentralized point cloud of the parts to be registered is the first. The scores of each point are sorted from largest to smallest in the centered point cloud of the part to be registered. The points corresponding to each score form a feature point cloud to be registered. ;

[0131] In this step, Take 1000.

[0132] The decentralization process in this step is used to eliminate the overall translational deviation of the point cloud. It uses the distance from a point to its own centroid and the local density of the point as features. Based on the principle that points farther away are more likely to be edges or vertices of the part, and points that are sparser are more likely to be points with obvious features, matching feature points are automatically extracted.

[0133] Step 14: Utilizing Ideal Feature Point Clouds Combined with the feature points to be registered The coarse matching result is obtained as follows:

[0134] Step 141: Obtain the ideal feature point cloud center of mass and the feature point cloud to be registered center of mass and utilize and Decentralize the feature points in the ideal feature point cloud and the feature points in the feature point cloud to be registered to obtain the decentralized ideal feature points and the decentralized feature points to be registered, thus obtaining the decentralized ideal feature point cloud and the decentralized feature point cloud to be registered.

[0135] The centered ideal feature points and the decentralized feature points to be registered are specifically as follows:

[0136]

[0137]

[0138]

[0139]

[0140] in, It is the first after decentralization An ideal feature point, It is the first An ideal feature point, It is an ideal feature point cloud The center of mass, It is a feature point cloud to be registered. The center of mass, It is the first after decentralization One feature point to be registered It is the first One feature point to be registered It is the total number of feature points. These are feature point labels;

[0141] Step 142: Obtain the decentralized ideal feature matrix using the decentralized ideal feature point cloud and the decentralized feature point cloud to be registered. and the decentralized feature matrix to be registered ,use and Constructing the covariance matrix Then, singular value decomposition is performed on the covariance matrix to obtain the left singular vector matrix. and right singular vector matrix ;

[0142] The decentralized ideal feature matrix The middle row represents the coordinates of a point in the ideal feature cloud after decentralization;

[0143] The decentralized feature matrix to be registered The middle row represents the coordinates of a point in the decentralized feature point cloud to be registered;

[0144] The use of the decentralized ideal feature matrix and the decentralized feature matrix to be registered Constructing the covariance matrix Specifically:

[0145]

[0146] in, It is transpose;

[0147] The singular value decomposition of the covariance matrix specifically involves:

[0148]

[0149] in, It is a left singular vector matrix. It is a right singular vector matrix. It is a singular value matrix;

[0150] Step 143: Using the left singular vector matrix and right singular vector matrix Obtain the coarse registration rotation matrix And coarse registration translation matrix Specifically:

[0151]

[0152]

[0153] Step 144: Using the coarse registration rotation matrix And coarse registration translation matrix The point cloud Q of the part to be registered is transformed to obtain the coarse registration result, specifically:

[0154]

[0155] in, It is the point cloud of the part to be registered after coarse registration.

[0156] In this step, the point cloud is roughly aligned, solving the problem of large initial pose deviations.

[0157] Step 2: Use the α-shape algorithm to divide the midpoints of the ideal pose point cloud P of the part into boundary local points and non-boundary local points;

[0158] In this step, the ideal pose point cloud P of the part is meshed, and then the nearest point is obtained using KD-Tree. All points, using the nearest point as All points constitute a subspace , That is The local location.

[0159] Step 3: Based on the dynamic learning rate strategy, fine registration is performed using the coarse registration results obtained in Step 1 and the boundary local points and non-boundary local points obtained in Step 2 to obtain the final point cloud result, specifically:

[0160] Step 3.1 Initialize the number of iterations Initialize the rotation matrix Initialize the translation matrix Initialize the registration matrix Initialize the learning rate ;

[0161] In this step It is a constant, take ;

[0162] The rotation matrix Preset quaternion The corresponding rotation matrix;

[0163] The Specifically:

[0164]

[0165]

[0166] in, It is the element value in the preset unit quaternion. It is a predefined unit quaternion The corresponding initial rotation matrix, , It is the initial translation matrix. It is the initial registration matrix;

[0167] In this invention, the following is set ,but ;

[0168] Step 32: Using KD-Tree to search midpoint exist The corresponding point in , obtain normal vector and curvature ,use , , and Obtain the averaged elevation function value Specifically:

[0169] First, using , , and Acquisition Points radial distance to local sea level Specifically:

[0170]

[0171] in, It is the length of the mold. It is an absolute value;

[0172] Then, obtain the point. Time European distance Specifically:

[0173]

[0174] Finally, using and Obtain the averaged elevation function value Specifically:

[0175]

[0176]

[0177]

[0178] in, and It is the weighting coefficient.

[0179] In this step, the local sea level is obtained as follows: the midpoint of point P is calculated using the PCA algorithm. normal direction and curvature, through by For the direction of the law The local surface formed by the radius of curvature is called the local sea level;

[0180] Step 33, Utilize Obtain the loss function value , loss function Compared with the preset target loss function value Comparison, will With maximum number of iterations In comparison, if and Then use the Adam optimizer to update the quaternion. And utilize the updated quaternion and learning rate Get the updated rotation matrix Simultaneously update the translation matrix to obtain the updated translation matrix. Then proceed to steps three and four; otherwise, directly obtain the registration matrix. and order Output the final point cloud result. ;

[0181] The use of Obtain the loss function value Specifically:

[0182]

[0183] Update quaternions using the Adam optimizer Specifically:

[0184]

[0185] in, It is a quaternion gradient, It is the static learning rate. It is the first Quaternions in round iterations It is the first Quaternions in round iterations;

[0186] Update translation matrix The following formula is used:

[0187]

[0188] in, It is a translation gradient. It is the first The translation matrix of the round of iterations, It is the first The translation matrix for each iteration;

[0189] The quaternion gradient Translation gradient Obtained through calculation using the chain method (MATLAB DeepLearning Toolbox);

[0190] Steps 3 and 4: Utilize the updated rotation matrix and the updated translation matrix Obtain the updated registration matrix Specifically:

[0191]

[0192] Step 35, Judgment Is it an integer? If it is an integer, then let Then let And return to step 32; otherwise, let Then let Then return to step three two.

[0193] In this step of fine registration, a dynamic learning rate strategy is used. The optimal transformation parameters are solved by combining the loss function (Loss) with gradient descent. The optimal transformation parameters are determined when the loss function is less than the target loss value. Or reach the maximum number of iterations The final point cloud result obtained by solving the time-sharing problem is denoted as the registration part point cloud. The Adam optimization algorithm is used to optimize the elevation averaging algorithm. It automatically adjusts the parameter update amount based on the adaptive learning rate, making the gradient descent smoother and more efficient to obtain the target loss function index as soon as possible, and finally obtains the registered point cloud to complete the fine registration of the point cloud.

[0194] Step 4: Obtain the final point cloud results The machining allowance corresponding to each point is as follows:

[0195] Step 41: In the final point cloud result Manual pickup For each pick point, obtain the reference external normal vector. Specifically:

[0196]

[0197]

[0198]

[0199] in, It is the first Each pick-up point references the outer normal vector. , It is the label of the pickup point. It is the total number of pick points. It is the first The normal vector of each pick point It is the first Each pickup point points to The reference vector, It is the first The coordinates of each pickup point The final cloud result The geometric center coordinates of the bounding box. yes The minimum x-coordinate among all the coordinates of a point. yes The maximum x-coordinate among all the coordinates of a point. yes The minimum value of the ordinate among all the coordinates of a point. yes The maximum value of the ordinate among all the coordinates of a point. yes The minimum vertical coordinate among all the coordinates of a point. yes The maximum vertical coordinate among all the coordinates of a point;

[0200] In this step, H is set to 5; based on the final point cloud results... Calculate the geometric center of its bounding box. Manual pickup H points are used as reference points and reference vectors are constructed for each of them. The PCA algorithm is used to calculate the normal vector of the pick point, and the reference outward normal vector of the point is determined based on the dot product. .

[0201] Step 42: Use the PCA algorithm to obtain The normal vectors of all points except the picking point are obtained. The angle between the normal vectors of all points except the picking point and the nearest external reference normal vector is calculated. If the angle between the current point's normal vector and the nearest external reference normal vector is greater than a preset angle of 15°, the current point's normal vector is reversed, and the reversed current point normal vector is marked and added to the set. Otherwise, directly mark the normal vector of the current point and add the normal vector of the current point to the set. ;

[0202] Step 43, based on The direction of the normal vector is obtained. The perpendicular distance from a point in the standard part to the surface of the 3D CAD model. ,Will As the machining allowance at the current point, the machining allowances at all points form a machining allowance cloud map.

[0203] In this step, the processed outward normal vectors and the point cloud registered using the above registration algorithm are utilized. The normal metric value at each point is actually the single-point machining allowance of the part surface relative to the ideal surface under the condition of minimizing the total machining allowance. Ultimately, based on... The machining allowance at all points can be used to form a machining allowance cloud map. Finally, the maximum value of the machining allowance at all points is obtained, and this maximum value is compared with the allowable error threshold. If the maximum value is greater than the allowable error threshold, the current part is considered unqualified. The machining allowance obtained through this invention can determine whether the specific parameters of the currently machined part are within the allowable error range.

[0204] The core idea of ​​this invention is as follows: In the coarse registration stage, principal component analysis is used to achieve rapid attitude initialization and directional pairing to ensure directional constraints; in the fine registration stage, the global optimization is decomposed into local optimizations through mesh generation and an average elevation algorithm, and a dynamic learning strategy is used to achieve high-precision convergence and complete the registration; finally, the machining allowance is calculated and the single-point machining allowance cloud map of the part surface relative to the ideal surface under the condition of minimizing the total machining allowance is displayed. This invention can find the most ideal machining pose of the workpiece and calculate the machining allowance cloud map under that pose. Through weighted direct measurement and normal measurement, when the position error of the cloud to be registered is large, it can quickly narrow it down by direct distance, and when it is close enough, it uses the machining allowance directly as the loss function.

[0205] Example: To verify the beneficial effects of the present invention, the following experiments were conducted:

[0206] This embodiment demonstrates point cloud registration for a stepped shaft component:

[0207] The ideal pose point cloud P is derived from a standard CAD model of a stepped axis, and is obtained after discretization. The point cloud Q of the part to be registered is derived from the measured stepped axis point cloud obtained by a 3D laser scanner, totaling [number missing]. Each point, target loss value Learning rate Maximum number of iterations .

[0208] After constructing the point cloud database, iterate through it. and Calculate each point in center of mass , center of mass The points are sorted according to their distance to the centroid and their local spatial density. The top 1000 points from each sorted group are selected as feature points for feature point pairing. A covariance matrix is ​​constructed based on the paired feature points, and singular value decomposition is performed to obtain the coarse registration rotation matrix. and coarse registration translation matrix After conversion, the point cloud of the part to be coarsely registered is obtained. At this point, the average deviation of the point cloud is 1.2 mm.

[0209] Using KD-tree Spatial mesh generation is performed, and the normal and curvature of each point in P are calculated using the PCA algorithm. The α-shape algorithm is used to determine boundary local points and non-boundary local points. A dynamic learning rate strategy is adopted, while a static learning rate is used. The dynamic learning rate is calculated every 10 rounds. With a 10% decay setting, the loss function (Loss) is iteratively updated. At the 169th iteration, the objective function value is... The convergence condition is met, and the optimal transformation quaternion and translation matrix are obtained. The resulting point cloud of the registration part is then transformed. The average deviation from P is 0.02 mm, and the registration process is complete.

[0210] Pick 5 sets of orientation pairing points, and constrain the outward normal vectors of all pairing points to point outward from the step axis; calculate the correction deviation of the normal vector angle. The point pairs all point outwards from the step axis until the normal direction. Finally, based on the calculated normal metric value, the remaining removable point cloud can be visually displayed in a point cloud diagram, such as... Figure 2 As shown.

Claims

1. A method for calculating machining allowance based on 3D point cloud registration, characterized in that... The specific process of the method is as follows: Step 1: Obtain the ideal pose point cloud P of the part and the point cloud Q of the part to be registered. Use P and Q to perform coarse registration and obtain the coarse registration result. Step 2: Divide the points in the ideal pose point cloud P of the part into boundary local points and non-boundary local points; Step 3: Using the coarse registration result obtained in Step 1 and the boundary local points and non-boundary local points obtained in Step 2, perform fine registration to obtain the final point cloud result. ; Step 4: Obtain the final point cloud results The machining allowance corresponding to each point in the process.

2. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 1, characterized in that: In step one, the ideal pose point cloud P of the part and the point cloud Q of the part to be registered are obtained. Coarse registration is then performed using P and Q to obtain the coarse registration result. Specifically: Step 11: Obtain the ideal pose point cloud P of the part and the point cloud Q of the part to be registered, specifically as follows: The standard part's 3D CAD model is discretized into a point cloud to obtain the ideal pose point cloud P, and the point cloud Q of the part to be registered is obtained using a 3D scanner. Step 1 & 2: Obtain the centroid of the ideal pose point cloud using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. and respectively utilize and The ideal pose point cloud of the part and the point cloud of the part to be registered are decentralized to obtain the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered. Step 13: Obtain ideal feature point clouds using the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered, respectively. and the feature point cloud to be registered ; Step 14: Utilizing Ideal Feature Point Clouds and the feature point cloud to be registered Obtain coarse matching results.

3. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 2, characterized in that: In steps one and two, the centroid of the ideal pose point cloud is obtained using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. and respectively utilize and The point clouds of the ideal pose of the part and the point clouds of the part to be registered are decentralized to obtain decentralized point clouds of the ideal pose of the part and decentralized point clouds of the part to be registered, specifically as follows: Step 121: Obtain the centroid of the ideal pose point cloud using the ideal pose point cloud P of the part. The centroid of the point cloud of the part to be registered is obtained using the point cloud Q. Specifically: in, It represents the number of points in the ideal pose point cloud of the part. It is the label of the midpoint in the ideal pose point cloud of the part. It represents the number of points in the point cloud of the part to be registered. These are the labels of the points in the point cloud of the part to be registered. It is the first in the ideal pose point cloud of the part One point, It is the first in the point cloud of the part to be registered One point; Steps 1 and 2: Utilize respectively and The point clouds of the ideal pose of the part and the point clouds of the part to be registered are decentralized to obtain decentralized point clouds of the ideal pose of the part and decentralized point clouds of the part to be registered, specifically as follows: in, It is decentralized , It is decentralized .

4. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 3, characterized in that: In steps one and three, ideal feature point clouds are obtained from the decentralized ideal pose point cloud of the part and the decentralized point cloud of the part to be registered, respectively. and the feature point cloud to be registered Specifically: Step 131: Obtain the distance between points and the centroid in the decentralized ideal pose point cloud of the part. and spatial local density Specifically: in, yes Distance to the center of mass It is the modulus symbol. It is the first in the ideal pose point cloud of the part One point, It is the local density of points in the decentralized ideal pose point cloud of the parts. It is the minimum value; Step 1, Step 3, Step 2: Obtain the distance between points and centroids in the decentralized point cloud of the part to be registered. and spatial local density Specifically: in, yes Distance to the center of mass It is the first in the point cloud of the part to be registered One point; Step 133, Utilize , , and Obtaining the ideal feature point cloud and the feature point cloud to be registered Specifically: First, and The sum of the points in the ideal pose point cloud of the decentralized components is the first... The scores of each point are sorted from largest to smallest in the centered ideal pose point cloud of the part. The points corresponding to each score form an ideal feature point cloud. ; Then, and The sum of the points in the decentralized point cloud of the parts to be registered is the first. The scores of each point are sorted from largest to smallest in the centered point cloud of the part to be registered. The points corresponding to each score form a feature point cloud to be registered. .

5. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 4, characterized in that: Step one four utilizes ideal feature point clouds and the feature point cloud to be registered The coarse matching result is obtained as follows: Step 141: Obtain the ideal feature point cloud center of mass and the feature point cloud to be registered center of mass and utilize and Decentralize the feature points in the ideal feature point cloud and the feature point cloud to be registered to obtain the decentralized ideal feature point cloud and the decentralized feature point cloud to be registered. The decentralized ideal feature points and the decentralized feature points to be registered are obtained through the following method: in, It is the first after decentralization An ideal feature point, It is the first An ideal feature point, It is an ideal feature point cloud The center of mass, It is a feature point cloud to be registered. The center of mass, It is the first after decentralization One feature point to be registered It is the first One feature point to be registered It is the total number of feature points. These are feature point labels; Step 142: Obtain the decentralized ideal feature matrix using the decentralized ideal feature point cloud and the decentralized feature point cloud to be registered. and the decentralized feature matrix to be registered ,use and Constructing the covariance matrix Then, singular value decomposition is performed on the covariance matrix to obtain the left singular vector matrix. and right singular vector matrix ; The decentralized ideal feature matrix The middle row represents the coordinates of a point in the ideal feature cloud after decentralization; The decentralized feature matrix to be registered The middle row represents the coordinates of a point in the decentralized feature point cloud to be registered; The use of the decentralized ideal feature matrix and the decentralized feature matrix to be registered Constructing the covariance matrix Specifically: in, It is transpose; The singular value decomposition of the covariance matrix is ​​specifically as follows: in, It is a left singular vector matrix. It is a right singular vector matrix. It is a singular value matrix; Step 143: Using the left singular vector matrix and right singular vector matrix Obtain the coarse registration rotation matrix And coarse registration translation matrix Specifically: Step 144: Using the coarse registration rotation matrix And coarse registration translation matrix The point cloud Q of the part to be registered is transformed to obtain the coarse registration result, specifically: in, It is the point cloud of the part to be registered after coarse registration.

6. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 5, characterized in that: In step two, the division of points in the ideal pose point cloud P of the part into boundary local points and non-boundary local points is achieved using the α-shape algorithm.

7. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 6, characterized in that: In step three, the coarse registration result obtained in step one and the boundary local points and non-boundary local points obtained in step two are used for fine registration to obtain the final point cloud result. Specifically: Step 3.1 Initialize the number of iterations Initialize the rotation matrix Initialize the translation matrix Initialize the registration matrix Initialize the learning rate ; in, It is a constant; The Based on a preset initial unit quaternion Specifically, the acquisition is as follows: in, It is a preset initial unit quaternion. It is the element value in the preset unit quaternion. It is the initial rotation matrix; The based on Specifically, the acquisition is as follows: in, It is the initial registration matrix. It is the initial translation matrix; Step 32: Using KD-Tree to search midpoint exist The corresponding point in , obtain normal vector and curvature ,use , , and Obtain the averaged elevation function value ; Step 33, Utilize Obtain the loss function value , loss function Compared with the preset target loss function value Comparison, will With maximum number of iterations In comparison, if and Then use the learning rate Update the rotation and translation matrices to obtain the updated rotation matrix. and the updated translation matrix Then proceed to steps three and four; otherwise, directly obtain the registration matrix. ,make Output the final point cloud result. ; Steps 3 and 4: Utilize the updated rotation matrix and the updated translation matrix Obtain the updated registration matrix Specifically: Step 35, Judgment Is it an integer? If it is an integer, then let Then let And return to step 32; otherwise, let Then let And return to step three two; in, .

8. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 7, characterized in that: The utilization in step three-two , , and Obtain the averaged elevation function value Specifically: in, It is the length of the mold. It is an absolute value. and These are weighting coefficients. It is a point Radial distance to local sea level, It is a point Time The Euclidean distance.

9. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 8, characterized in that: The utilization in step three-three Obtain the loss function value Specifically: The use of learning rate Update the rotation and translation matrices to obtain the updated rotation matrix. and the updated translation matrix Specifically: The updated rotation matrix Based on the updated quaternion get; The updated quaternion Obtained through the following methods: in, It is a quaternion gradient, It is the first Quaternions in round iterations It is the first Quaternions in round iterations; The updated translation matrix It can be obtained through the following methods: in, It is a translation gradient. It is the first The translation matrix of the round of iterations, It is the first The translation matrix for each iteration.

10. The method for calculating machining allowance based on three-dimensional point cloud registration according to claim 9, characterized in that: Step four involves obtaining the final point cloud result. The machining allowance corresponding to each point is as follows: Step 41: In the final point cloud result Manual pickup For each pick point, obtain the reference external normal vector. Specifically: in, It is the first Each pick-up point references the outer normal vector. , It is the label of the pickup point. It is the total number of pick points. It is the first The normal vector of each pick point It is the first Each pickup point points to The reference vector, It is the first The coordinates of each pick point The final cloud result The geometric center coordinates of the bounding box. yes The minimum x-coordinate among all the coordinates of a point. yes The maximum x-coordinate among all the coordinates of a point. yes The minimum value of the ordinate among all the coordinates of a point. yes The maximum value of the ordinate among all the coordinates of a point. yes The minimum vertical coordinate among all the coordinates of a point. yes The maximum vertical coordinate among all the coordinates of a point; Step 42: Use the PCA algorithm to obtain The normal vectors of all points except the picking point are obtained. The angle between the normal vectors of all points except the picking point and the nearest external reference normal vector is calculated. If the angle between the current point's normal vector and the nearest external reference normal vector is greater than a preset angle, the current point's normal vector is reversed, and the reversed current point normal vector is marked and added to the set. Otherwise, directly mark the normal vector of the current point and add the normal vector of the current point to the set. ; Step 43, based on The direction of the normal vector is obtained. The perpendicular distance from a point in the standard part to the surface of the 3D CAD model. ,Will This is the machining allowance at the current point.