A real-time fitting method and system for three-coordinate measurement data of an automobile stamping product

By calculating the local surface curvature and initial geometric feature degree of automotive stamping products, constructing a spatial index and optimizing the iteration process, the problems of single data feature extraction and inflexible iteration convergence in the existing technology of coordinate measuring machine measurement of automotive stamping products are solved, and efficient real-time fitting and accurate pose matching are achieved.

CN123139433APending Publication Date: 2026-11-20HEBEI JIANGJIN HARDWARE PROD LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611246048.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing coordinate measuring technology cannot effectively distinguish the contribution of different geometric features when dealing with automotive stamping products. This makes the iterative process susceptible to local deformation and noise interference, failing to meet the cycle time requirements of real-time detection, and the pose accuracy and algorithm stability cannot be guaranteed.

Method used

By calculating the local surface curvature and initial geometric characteristics of the measurement points, a spatial index is constructed. The corresponding points are determined by combining the Euclidean distance and the cosine of the angle between the normal vectors. A weighted point-to-surface error minimization objective function is constructed. The incremental rigid body transformation matrix is ​​solved using the Gauss-Newton optimization scheme. A convergence threshold is scientifically set to terminate the iteration.

Benefits of technology

It improves the stability and accuracy of data matching, reduces invalid calculations, enhances the convergence efficiency and real-time fitting performance of the algorithm, and ensures high alignment accuracy and detailed fit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123139433A_ABST
    Figure CN123139433A_ABST
Patent Text Reader

Abstract

The application provides a real-time fitting method and system for three-coordinate measurement data of automobile stamping products, and the method comprises the following steps: collecting a stamping part measurement point cloud and a standard CAD model, solving an initial geometric feature degree through local curvature of the measurement point, discretely sampling the CAD model and calculating model point normal and curvature, and building a space index; in an iterative alignment stage, only the source point cloud is screened according to the initial geometric feature degree in the first round, and in the subsequent rounds, the comprehensive confidence of the measurement point is calculated by combining the feature degree and the residual error of the last round to select the point subset; the space index is relied on to match the measurement point with the candidate corresponding point of the model, the fitting weight is generated by fusing the normal angle cosine and the curvature gain factor, the weighted point-plane error minimization objective function is constructed to solve the incremental rigid body transformation, and the point cloud pose is updated; the convergence threshold is set according to the inverse ratio of the weight mean value, the transformation and error change reach the standard, the iteration is stopped, the cumulative transformation matrix is output to complete the pose fitting, and the fitting accuracy and the operation real-time performance are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of automotive stamping products, and in particular relates to a real-time fitting method and system for coordinate measuring data of automotive stamping products. Background Technology

[0002] In modern automobile manufacturing, stamping is widely used in the production of body panels and structural components. The geometric dimensions and form and position tolerances of these stamped products determine the assembly quality and safety of the entire vehicle. To control the quality of stamped products, coordinate measuring machine (CMM) technology has become the primary means of obtaining the three-dimensional surface topography of the product. In the actual inspection process, the core step is to spatially align and match the discrete point cloud data obtained by the CMM with the product's nominal CAD model; this process is known as three-dimensional fitting of the measurement data. Automotive stamped products typically contain numerous free-form surfaces, chamfers, and folds, and are subject to deformation, springback, and surface noise interference during processing and measurement. Existing point cloud matching methods, when faced with massive amounts of data containing varying topologies, usually employ indiscriminate distance or angle optimization calculations for all measurement points, failing to distinguish the contribution of different geometric features to spatial matching. This coarse alignment mechanism is easily affected by local deformation regions and outlier noise, causing the iteration process to deviate from the true pose and get stuck in local optima. It also leads to huge computational redundancy and cannot meet the requirements of real-time processing of coordinate measuring data on modern industrial production lines.

[0003] Existing fitting techniques, during iterative calculations, offer higher geometric constraint value for regions with curved surface features when locking spatial degrees of freedom poses compared to flat regions. However, traditional methods cannot integrate the confidence level of these geometric features and the fitting quality into the point cloud sampling and error optimization cycle. When dealing with measurement data of different accuracy levels or different types of stamped parts, this can easily lead to underfitting or getting stuck in meaningless iterative loops, compromising pose accuracy and algorithm stability. For application scenarios involving complex automotive stamped parts with variable inspection environments, a novel real-time measurement data fitting mechanism is urgently needed to address the technical problems of single data feature extraction, lack of confidence assessment, and inflexible iterative convergence at the global strategy level, achieving highly efficient matching between 3D inspection data and the nominal model. Summary of the Invention

[0004] According to one aspect of the present invention, a real-time fitting method for coordinate measuring machine (CMM) data of automotive stamping products is proposed to address the technical problems of limited data feature extraction, lack of confidence assessment, and inflexible iterative convergence from a global strategy perspective. The method includes the following steps:

[0005] Acquire the measurement point cloud and nominal CAD model of automotive stamping products, calculate the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud, perform discrete sampling on the nominal CAD model, calculate the model point normal vector and surface curvature, and construct a spatial index; Enter the iterative alignment process. Each iteration executes the following: calculate the comprehensive confidence of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, select a subset of measurement points as the current source point cloud based on the confidence degree, and select the points based only on the initial geometric feature degree in the first iteration. For each point in the current source point cloud, search for candidate points in the nominal CAD model using the spatial index, and determine the corresponding points based on the Euclidean distance and the cosine of the angle between the normal vectors. The fitting weights are obtained by multiplying the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point. A weighted point-to-surface error minimization objective function is constructed based on the corresponding point pairs and the fitting weights. The incremental rigid body transformation matrix is ​​obtained by solving the incremental rigid body transformation matrix. The pose of the measured point cloud is updated by applying the incremental rigid body transformation matrix. The change in the transformation matrix and the change in error are calculated. A convergence threshold is set according to the mean of the fitting weights. The convergence threshold is inversely proportional to the mean of the fitting weights. The iteration is terminated when the change in the transformation matrix and the change in error are lower than the convergence threshold. The cumulative rigid body transformation matrix is ​​output as the final pose.

[0006] Optionally, the calculation of the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud includes: The covariance matrix eigenvalues ​​of the neighborhood point set of the measurement point are extracted by principal component analysis. The local surface curvature is calculated by dividing the minimum eigenvalue by the sum of all eigenvalues. The local surface curvature is then divided by the maximum local surface curvature among all points in the measurement point cloud to generate a normalized coefficient as the initial geometric eigenvalue of the measurement point.

[0007] Optionally, the step of discretizing the nominal CAD model, calculating the model point normal vectors and surface curvature, and constructing a spatial index includes: The nominal CAD model is discretized using a 3D voxel downsampling algorithm to obtain a set of model points. The principal normal vector and local surface curvature of each model point are calculated. A Kd tree is constructed using the 3D coordinates of the model points to complete the spatial index creation. The corresponding principal normal vector and local surface curvature are bound to each tree node.

[0008] Optionally, the step of calculating the comprehensive confidence level of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, and selecting a subset of measurement points as the current source point cloud based on the confidence level, with the first iteration selecting only based on the initial geometric feature degree, includes: The Euclidean fitting residuals of the corresponding points from the previous iteration, after being dimensionlessly processed by the reference length, are substituted into a negative exponential function with the base being the natural constant to calculate the residual decay factor. The residual decay factor is then multiplied by the initial geometric characteristic of the point to obtain the updated comprehensive confidence level. All measurement points are sorted in descending order of comprehensive confidence level, and the top 30% of measurement points are selected to form the source point cloud subset for the current iteration.

[0009] Optionally, the step of searching for candidate points in the nominal CAD model using the spatial index for each point in the current source point cloud, and determining the corresponding point based on the Euclidean distance and the cosine of the angle between the normal vectors, includes: Using the set upper limit of Euclidean distance and the lower limit of the cosine of the angle between the normal vectors as the judgment criteria, when the Euclidean distance from the source point to the first nearest candidate point in space is less than the above-mentioned upper limit of Euclidean distance, and the cosine of the angle between the normal vectors of the two is greater than the above-mentioned lower limit requirement, the candidate point is confirmed to be retained as the corresponding point, and the corresponding point pair is obtained.

[0010] Optionally, the step of multiplying the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weights includes: The inner product of the normal vectors of the two points in the corresponding point pair is taken as the cosine of the angle between the normal vectors. The local surface curvature bound to the tree node where the corresponding point is located in the nominal CAD model space index is read. The local surface curvature is substituted into a positive exponential function with the natural constant as the base to calculate the curvature gain factor. The cosine of the angle between the normal vectors is multiplied with the curvature gain factor to obtain a real number result, which is used as the fitting weight of the corresponding point pair.

[0011] Optionally, the step of constructing a weighted point-to-surface error minimization objective function based on corresponding point pairs and fitting weights, and solving for the incremental rigid body transformation matrix, includes: The residual vector is obtained by subtracting the coordinates of the measurement point from the corresponding model point. The residual vector is then projected onto the principal normal vector of the corresponding model point to obtain the normal distance. The square of the normal distance is multiplied by the fitting weight as the error cost. The error costs of all corresponding point pairs are summed to form the objective function. The objective function is solved using the Gauss-Newton optimization scheme to obtain the incremental rigid body transformation matrix containing three-dimensional translation offset and three-dimensional rotation angle.

[0012] Optionally, the calculation of the change in the transformation matrix and the change in error involves setting a convergence threshold based on the mean of the fitting weights, wherein the convergence threshold is inversely proportional to the mean of the fitting weights, including: The sum of the absolute differences of the rotation parameters of the rigid body transformation between the current iteration and the previous iteration, and the sum of the absolute differences of the translation parameters after dimensionless processing of the feature length, are added as the change in the transformation matrix. The absolute value of the difference between the weighted root mean square error of the current iteration and the error of the previous iteration is calculated, and after dimensionless processing of the feature length, it is used as the change in error. The preset constant is divided by the mean of the fitting weights of all corresponding point pairs in the current iteration to obtain the set convergence threshold.

[0013] According to another aspect of the present invention, a real-time fitting system for coordinate measuring machine data of automotive stamping products is proposed, comprising the following modules: The calculation module is used to acquire the measurement point cloud and nominal CAD model of automotive stamping products, calculate the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud, perform discrete sampling on the nominal CAD model, calculate the model point normal vector and surface curvature, and construct a spatial index. The determination module is used to enter the iterative alignment process. Each iteration executes the following: calculate the comprehensive confidence of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, select a subset of measurement points as the current source point cloud based on the confidence degree, and select the points based only on the initial geometric feature degree in the first iteration. For each point in the current source point cloud, search for candidate points in the nominal CAD model using the spatial index, and determine the corresponding points based on the Euclidean distance and the cosine of the angle between the normal vectors. The output module is used to multiply the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weights. Based on the corresponding point pairs and the fitting weights, a weighted point-to-surface error minimization objective function is constructed, and the incremental rigid body transformation matrix is ​​obtained by solving it. The incremental rigid body transformation matrix is ​​applied to update the pose of the measured point cloud, and the change in the transformation matrix and the change in error are calculated. A convergence threshold is set according to the mean of the fitting weights. The convergence threshold is inversely proportional to the mean of the fitting weights. The iteration is terminated when the change in the transformation matrix and the change in error are lower than the convergence threshold, and the cumulative rigid body transformation matrix is ​​output as the final pose.

[0014] Preferably, the calculation of the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud includes: The covariance matrix eigenvalues ​​of the neighborhood point set of the measurement point are extracted by principal component analysis. The local surface curvature is calculated by dividing the minimum eigenvalue by the sum of all eigenvalues. The local surface curvature is then divided by the maximum local surface curvature among all points in the measurement point cloud to generate a normalized coefficient as the initial geometric eigenvalue of the measurement point.

[0015] Preferably, the step of discretizing the nominal CAD model, calculating the model point normal vectors and surface curvature, and constructing a spatial index includes: The nominal CAD model is discretized using a 3D voxel downsampling algorithm to obtain a set of model points. The principal normal vector and local surface curvature of each model point are calculated. A Kd tree is constructed using the 3D coordinates of the model points to complete the spatial index creation. The corresponding principal normal vector and local surface curvature are bound to each tree node.

[0016] Preferably, the step of calculating the comprehensive confidence level of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, and selecting a subset of measurement points as the current source point cloud based on the confidence level, wherein the first iteration selects points based solely on the initial geometric feature degree, includes: The Euclidean fitting residuals of the corresponding points from the previous iteration, after being dimensionlessly processed by the reference length, are substituted into a negative exponential function with the base being the natural constant to calculate the residual decay factor. The residual decay factor is then multiplied by the initial geometric characteristic of the point to obtain the updated comprehensive confidence level. All measurement points are sorted in descending order of comprehensive confidence level, and the top 30% of measurement points are selected to form the source point cloud subset for the current iteration.

[0017] Preferably, the step of searching for candidate points in the nominal CAD model using the spatial index for each point in the current source point cloud, and determining the corresponding point based on the Euclidean distance and the cosine of the angle between the normal vectors, includes: Using the set upper limit of Euclidean distance and the lower limit of the cosine of the angle between the normal vectors as the judgment criteria, when the Euclidean distance from the source point to the first nearest candidate point in space is less than the above-mentioned upper limit of Euclidean distance, and the cosine of the angle between the normal vectors of the two is greater than the above-mentioned lower limit requirement, the candidate point is confirmed to be retained as the corresponding point, and the corresponding point pair is obtained.

[0018] Preferably, the step of multiplying the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weight includes: The inner product of the normal vectors of the two points in the corresponding point pair is taken as the cosine of the angle between the normal vectors. The local surface curvature bound to the tree node where the corresponding point is located in the nominal CAD model space index is read. The local surface curvature is substituted into a positive exponential function with the natural constant as the base to calculate the curvature gain factor. The cosine of the angle between the normal vectors is multiplied with the curvature gain factor to obtain a real number result, which is used as the fitting weight of the corresponding point pair.

[0019] Preferably, the step of constructing a weighted point-to-surface error minimization objective function based on corresponding point pairs and fitting weights, and solving for the incremental rigid body transformation matrix, includes: The residual vector is obtained by subtracting the coordinates of the measurement point from the corresponding model point. The residual vector is then projected onto the principal normal vector of the corresponding model point to obtain the normal distance. The square of the normal distance is multiplied by the fitting weight as the error cost. The error costs of all corresponding point pairs are summed to form the objective function. The objective function is solved using the Gauss-Newton optimization scheme to obtain the incremental rigid body transformation matrix containing three-dimensional translation offset and three-dimensional rotation angle.

[0020] Preferably, the calculation of the change in the transformation matrix and the change in error involves setting a convergence threshold based on the mean of the fitting weights, wherein the convergence threshold is inversely proportional to the mean of the fitting weights, including: The sum of the absolute differences of the rotation parameters of the rigid body transformation between the current iteration and the previous iteration, and the sum of the absolute differences of the translation parameters after dimensionless processing of the feature length, are added as the change in the transformation matrix. The absolute value of the difference between the weighted root mean square error of the current iteration and the error of the previous iteration is calculated, and after dimensionless processing of the feature length, it is used as the change in error. The preset constant is divided by the mean of the fitting weights of all corresponding point pairs in the current iteration to obtain the set convergence threshold.

[0021] This invention improves feature recognition capabilities and data retrieval efficiency by calculating the local surface curvature and initial geometric feature degree of measurement points, combined with the nominal CAD model normal vector and curvature to construct a spatial index. During the iterative alignment process, a subset of measurement points is selected based on the comprehensive confidence level calculated from the geometric feature degree and the residual from the previous fitting iteration, removing noise and outlier interference and enhancing the stability of data matching. Corresponding points are determined using Euclidean distance and the cosine of the angle between the normal vectors, and fitting weights are calculated using a curvature gain factor. A weighted point-to-surface error minimization objective function is constructed, strengthening the guiding role of key geometric features such as high curvature in pose calculation and improving overall fitting accuracy and detail fit. A convergence threshold scientifically set inversely proportional to the mean of the fitting weights is used to reasonably control the iteration termination timing, reducing invalid calculations while ensuring high alignment accuracy, thus improving the algorithm's convergence efficiency and real-time fitting performance. Attached Figure Description

[0022] Figure 1 A flowchart of the first embodiment; Figure 2 This is a graph showing the relationship between relative residuals and residual decay factor. Figure 3 A diagram showing the comparison of registration effects for different schemes. Detailed Implementation

[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0024] In the first embodiment, the present invention proposes a real-time fitting method for coordinate measuring machine data of automotive stamping products, such as... Figure 1 It includes the following steps: S1. Obtain the measurement point cloud and nominal CAD model of the automotive stamping product. Calculate the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud. Perform discrete sampling on the nominal CAD model, calculate the model point normal vector and surface curvature, and construct a spatial index.

[0025] The system uses the file reading module in the open-source point cloud library PCL to read PCD or PLY format measurement point cloud data of automotive stamping products, and calls the interface of the OpenCASCADE 3D geometric modeling kernel to read STEP format nominal CAD model files. For the measurement point cloud, a KdTree data structure is constructed using the FLANN module in the PCL library based on fast approximate nearest neighbor search. For each measurement point, the K-nearest neighbor search algorithm is executed to obtain the local neighborhood point set of that measurement point. The covariance matrix of the neighborhood point set is calculated using the principal component analysis (PCA) algorithm, and singular value decomposition is performed to solve for the eigenvalues. The eigenvector corresponding to the minimum eigenvalue is extracted as the principal normal vector of the measurement point. Since the eigenvector obtained by PCA has directional ambiguity, the principal normal vectors of all measurement points are reversed and redirected using the set origin coordinates of the scanning viewpoint or the ray direction outward from the center of the product bounding box. The ratio of the minimum eigenvalue to the sum of all eigenvalues ​​is used as the local surface curvature of the measurement point. The min-max normalization algorithm is used to linearly map the surface curvature of all points to the numerical range of 0 to 1, generating the initial geometric feature degree of each measurement point. The Poisson disk sampling algorithm is called to perform uniform three-dimensional surface mesh discretization on the nominal CAD model surface to generate model point cloud. The principal component analysis (PCA) algorithm is also used to calculate the normal vector and surface curvature of each model point on the model point cloud. The FLANN module is called again to establish a three-dimensional KdTree spatial index structure for the generated model point cloud.

[0026] In an optional embodiment, calculating the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud includes: The covariance matrix eigenvalues ​​of the neighborhood point set of the measurement point are extracted by principal component analysis. The local surface curvature is calculated by dividing the minimum eigenvalue by the sum of all eigenvalues. The local surface curvature is then divided by the maximum local surface curvature among all points in the measurement point cloud to generate a normalized coefficient as the initial geometric eigenvalue of the measurement point.

[0027] For each measurement point, a neighborhood set is obtained using K-nearest neighbor or radius neighborhood search. Preferably, the number of nearest neighbors K is set to a range of 15 to 30 points, for example, K=20, or the search radius is set to 2.0 mm to 5.0 mm. The centroid of the neighborhood set is calculated, and a 3×3 covariance matrix is ​​constructed. Principal component analysis is performed on the covariance matrix to solve for the eigenvalues ​​and the corresponding three eigenvectors. The eigenvector corresponding to the smallest eigenvalue is taken as the principal normal vector of the measurement point, and the local surface curvature of the measurement point is calculated, i.e., the smallest eigenvalue is divided by the sum of the three eigenvalues. Since automotive stamping products contain flat areas and feature-rich bending or flanged areas, the curvature calculated by the eigenvalues ​​is usually in the range of 0, ideal plane to 0.33, between isotropic points. For example, if the calculated eigenvalues ​​for a measurement point at a sharp flange are 5.0, 3.0, and 1.5 respectively, then the local surface curvature of that point is approximately 0.158.

[0028] The local surface curvature of each point in the measurement point cloud is calculated by traversing all points and identifying the maximum value. Assuming the maximum curvature in the measurement point cloud is 0.215, the initial geometric feature value of each point is calculated by normalizing the curvature of each point by dividing it by this maximum value. This value ranges from 0 to 1. This normalization operation reduces the impact of absolute scale differences on local curvature, allowing points with higher curvature to be assigned a feature value closer to 1 in subsequent weighting. For example, the initial geometric feature value of the point at the flange is approximately 0.735 (0.158 divided by 0.215), guiding the registration process to focus on aligning the product's feature contours rather than flat surfaces.

[0029] In an optional embodiment, the step of discretizing the nominal CAD model, calculating the model point normal vectors and surface curvature, and constructing a spatial index includes: The nominal CAD model is discretized using a 3D voxel downsampling algorithm to obtain a set of model points. The principal normal vector and local surface curvature of each model point are calculated. A Kd tree is constructed using the 3D coordinates of the model points to complete the spatial index creation. The corresponding principal normal vector and local surface curvature are bound to each tree node.

[0030] The input nominal CAD model data is spatially meshed and discretized using a 3D voxel downsampling algorithm. Specifically, the bounding box of the model is divided into 3D voxel grids of equal side lengths. Preferably, for automotive stamping parts typically ranging from 500mm to 1500mm in size, the voxel grid size is set to 1.0mm to 3.0mm, for example, 2.0mm. The geometric center of the internal surface of each voxel is extracted as a representative point, outputting a uniformly distributed set of model points. This process filters out high-density redundant patches and transforms the continuous model into point matrix data that can be used as a reference for registration of discrete point clouds.

[0031] For each discrete model point generated above, a local micro-surface is determined based on nearest neighbor search. Principal component analysis of this micro-surface is used to solve for the eigenvector corresponding to the smallest eigenvalue, which is then used as the principal normal vector of the model point. The direction is uniformly flipped to point towards the external space, and the proportion of the smallest eigenvalue to the sum of all eigenvalues ​​is used as the local surface curvature. For example, the principal normal vector of a discrete model point is [0.0, 0.0, 1.0], and the local curvature is 0.012. After calculating the model point attributes, a binary space partitioning tree is constructed using the three-dimensional Euclidean coordinates of each model point as the key, through recursive partitioning of the spatial dimensions. The corresponding principal normal vector components and the local surface curvature values ​​(a total of four floating-point numbers) are stored as additional attribute structures and bound to the corresponding KdTree leaf nodes and internal nodes, enabling candidate point queries to be performed in logarithmic time complexity during subsequent iterations.

[0032] S2, enter the iterative alignment process. Each iteration executes: calculate the comprehensive confidence of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, select a subset of measurement points as the current source point cloud based on the confidence degree, and select the first iteration based only on the initial geometric feature degree. For each point in the current source point cloud, use the spatial index to search for candidate points in the nominal CAD model, and determine the corresponding point based on the Euclidean distance and the cosine of the angle between the normal vectors.

[0033] A While loop structure based on the Iterative Nearest Point (ICP) algorithm is constructed. In the first iteration, the initial geometric feature values ​​of all measurement points are sorted in descending order, and the top 30% of measurement points are extracted into a separate array to form the current source point cloud. In each subsequent iteration, the Euclidean projection distance between corresponding points calculated in the previous iteration is extracted as the fitting residual. This fitting residual is input into the Huber loss function to transform it into a noise-resistant distance penalty coefficient. The distance penalty coefficient is then linearly weighted and summed point-to-point with the initial geometric feature values ​​to obtain a comprehensive confidence score. A roulette wheel selection algorithm is used to extract high-confidence points based on this comprehensive confidence score to form the current source point cloud. For each source point in the current source point cloud, the nearest neighbor radius search algorithm of the aforementioned KdTree spatial index is used to obtain multiple candidate target points within a specified radius in the nominal CAD model point cloud. The Euclidean distance formula is used to calculate the three-dimensional spatial straight-line distance between the source point and each candidate target point, and the cosine value of the angle between the normal vector of the source point and the normal vector of the candidate target point is calculated using the vector dot product algorithm. By using a logical AND operator, erroneous candidate points that have an Euclidean distance greater than a set distance threshold and a cosine value of the angle between their normal vectors less than 0.8 are removed. Among the remaining candidate points, the point with the smallest Euclidean distance is selected and established as the corresponding point of the current source point.

[0034] In an optional embodiment, the step of calculating the comprehensive confidence level of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, selecting a subset of measurement points as the current source point cloud based on the confidence level, and selecting the points only based on the initial geometric feature degree in the first iteration includes: The Euclidean fitting residuals of the corresponding points from the previous iteration, after being dimensionlessly processed by the reference length, are substituted into a negative exponential function with the base being the natural constant to calculate the residual decay factor. The residual decay factor is then multiplied by the initial geometric characteristic of the point to obtain the updated comprehensive confidence level. All measurement points are sorted in descending order of comprehensive confidence level, and the top 30% of measurement points are selected to form the source point cloud subset for the current iteration.

[0035] At the beginning of each iteration, the point-to-point Euclidean distance calculated at the end of the previous iteration for each measurement point is extracted as the current fitting residual. For measurement points that were not included in the current source point cloud in the previous iteration and whose Euclidean distance was not calculated, the fitting residual recorded in their most recent iteration is used. If a point has never been included in the calculation, its fitting residual is set to be equal to the upper limit threshold of the Euclidean distance described later. To reduce the influence of size units and the absolute size of parts, the diagonal length or feature dimension of the stamped product's enclosure is used as the reference length. For example, for a door outer panel measurement part, the reference length is set to 1000.0 mm. The fitting residual is dimensionless, and the relative residual is calculated, i.e., the fitting residual divided by the reference length. The relative residual is substituted into a negative exponential function with a decay control coefficient to calculate the residual decay factor. Preferably, the control coefficient is set to a value between 500 and 2000, for example, 1000. If the residual at a certain measurement point is 2.0 mm in the previous round, then the relative residual is 0.002, and the calculated residual attenuation factor is approximately 0.135; if the residual is only 0.1 mm, then the attenuation factor is approximately 0.905. Figure 2 As shown, the residual decay factor decreases exponentially with the increase of the relative fitting residual. The smaller the residual, the closer the residual decay factor is to 1, and the higher the weight of the comprehensive confidence of the measurement point. The larger the residual, the faster the decay factor approaches 0, reducing the interference of outlier residuals on the registration iteration.

[0036] The calculated residual decay factor is multiplied by the initial geometric feature degree retained at that point to obtain an updated comprehensive confidence score that balances the original geometric features and registration quality. After calculation, the measurement points are sorted from largest to smallest based on the comprehensive confidence score. Using the sorted list as a benchmark, the top 30% of measurement points are selected by index. Assuming the original measurement point cloud has 100,000 points, only the top 30,000 points in terms of comprehensive confidence score are retained to form a new subset of measurement points, which is used as the "current source point cloud" in this round of iterative alignment. This strategy is beneficial for aligning stamped parts by relying on points with prominent features such as chamfers or flanges, while reducing interference from outliers that cannot be aligned due to local drawing cracks or springback.

[0037] In an optional embodiment, the step of searching for candidate points in the nominal CAD model using the spatial index for each point in the current source point cloud, and determining the corresponding point based on the Euclidean distance and the cosine of the angle between the normal vectors, includes: Using the set upper limit of Euclidean distance and the lower limit of the cosine of the angle between the normal vectors as the judgment criteria, when the Euclidean distance from the source point to the first nearest candidate point in space is less than the above-mentioned upper limit of Euclidean distance, and the cosine of the angle between the normal vectors of the two is greater than the above-mentioned lower limit requirement, the candidate point is confirmed to be retained as the corresponding point, and the corresponding point pair is obtained.

[0038] For the selected points in the current source point cloud, the previously constructed KdTree index structure is invoked, and the nearest neighbor search algorithm is used to query the first nearest candidate point in the nominal CAD model point set that is closest to the source point in three-dimensional space. After confirming the nearest point, the corresponding relationship determination stage begins. The three-dimensional Euclidean distance between the source point and the candidate point is calculated. An upper limit threshold for the Euclidean distance is set. Considering the initial placement error of the stamped product, preferably, this upper limit of the Euclidean distance is set to 10.0mm to 15.0mm in the early stage of iteration, for example, set to 10.0mm, and can be gradually tightened with iteration.

[0039] Obtain the local principal normal vector calculated from the source point and the principal normal vector corresponding to the candidate point extracted from KdTree. Calculate the cosine of the angle between these two unit vectors by performing an inner product operation. Set a lower limit for the cosine of the angle between the normal vectors. Since the variation of the normal vector on the same surface should not exceed a certain angle, preferably, the angle should be less than 30 degrees, i.e., the corresponding lower limit of the cosine is set to approximately 0.866, for example, 0.85. If the queried distance is 4.5mm and less than 10.0mm, and the angle between the two normal vectors is 15 degrees, making the cosine of this angle approximately 0.966, which is greater than 0.85, both criteria are met. Then, this candidate point is accepted as the corresponding point of the source point on the model and recorded as a source-target corresponding point pair. If any condition is not met, such as opposite normal vectors or distance exceeding the limit, the source point is discarded and not included in the objective function calculation for this round.

[0040] S3, multiply the cosine of the angle between the normal vectors by the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weights. Construct a weighted point-to-surface error minimization objective function based on the corresponding point pairs and the fitting weights, solve for the incremental rigid body transformation matrix, apply the incremental rigid body transformation matrix to update the pose of the measured point cloud, calculate the change in the transformation matrix and the change in error, set a convergence threshold according to the mean of the fitting weights, the convergence threshold is inversely proportional to the mean of the fitting weights, terminate the iteration when the change in the transformation matrix and the change in error are lower than the convergence threshold, and output the cumulative rigid body transformation matrix as the final pose.

[0041] Extract the surface curvature of the corresponding points in the model within the currently determined point pair. Substitute this surface curvature as an independent variable into a positive exponential mapping function with a base of the natural constant to calculate a curvature gain factor whose value is always greater than or equal to 1. Multiply the cosine of the angle between the normal vectors retained in the previous step by this curvature gain factor to obtain the scalar fitting weight for the corresponding point pair. Construct a nonlinear least squares error minimization objective function based on the weighted point-to-surface distance metric formula. Call the Ceres nonlinear optimization solver open-source library and use the Levenberg-Marquardt optimization algorithm to perform Jacobian matrix differentiation and iterative gradient descent optimization on the objective function to solve for a four-by-four incremental rigid body transformation matrix containing a three-dimensional rotation matrix and a three-dimensional translation vector. Call the affine transformation function from the Eigen linear algebra library to left-multiply the incremental rigid body transformation matrix by the homogeneous coordinate matrix of the current measured point cloud to update the matrix spatial pose in the global coordinate system. Use matrix multiplication to accumulate the incremental rigid body transformation matrix into the global cumulative rigid body transformation matrix. The Frobenius norm between the current incremental rigid body transformation matrix and the fourth-order identity matrix is ​​calculated using the matrix norm calculation function as the change in the transformation matrix. The absolute value of the difference between the mean square error of all point pairs in the current round and the mean square error of the previous round is calculated as the change in error. The fitting weights of all point pairs in the current round are accumulated and divided by the total number of valid point pairs to obtain the mean of the fitting weights. The basic convergence constant, which is pre-coded in the program, is divided by the mean of the fitting weights to calculate the convergence threshold of the current round. An If conditional branch statement is used to determine whether the change in the transformation matrix and the change in error are both less than the convergence threshold. If the Boolean logic is true, a Break instruction is triggered to exit the While loop structure and terminate the iteration process. The four-by-four cumulative rigid body transformation matrix stored in memory is written to the disk file as the final pose parameter.

[0042] In an optional embodiment, multiplying the cosine of the angle between the normal vectors by a curvature gain factor based on the surface curvature at the corresponding point to obtain the fitting weight includes: The inner product of the normal vectors of the two points in the corresponding point pair is taken as the cosine of the angle between the normal vectors. The local surface curvature bound to the tree node where the corresponding point is located in the nominal CAD model space index is read. The local surface curvature is substituted into a positive exponential function with the natural constant as the base to calculate the curvature gain factor. The cosine of the angle between the normal vectors is multiplied with the curvature gain factor to obtain a real number result, which is used as the fitting weight of the corresponding point pair.

[0043] For the retained valid corresponding point pairs, the principal normal vector of the source point and the principal normal vector of the candidate corresponding point are extracted. The inner product of these two unit vectors is calculated to obtain the cosine of the angle between the normal vectors. The value is between 0.85 and 1.0, which represents the degree of parallelism between the two points on the surface tangent plane. For example, an inner product of 0.98 indicates that the two patches are highly fitted. Utilizing the low time complexity of spatial indexing, the pre-calculated local surface curvature scalar value of the candidate model point is read from the constructed KdTree node memory block.

[0044] To provide a stronger driving force to high-curvature feature regions in the optimization solution, a positive exponential mapping function with a natural constant as the base is established to calculate the curvature gain factor. The exponential term includes a positive real coefficient that adjusts the amplification of the difference between high and low curvature; preferably, this coefficient is set in the range of 5.0 to 15.0, for example, 10.0. When the nominal corresponding point is located in the flat area in the middle of the car hood, the local curvature of that point is, for example, 0.001, and the curvature gain factor is approximately 1.010; while when the point is located at the front bend, the local curvature is, for example, 0.12, and the gain factor will rise to approximately 3.320. Multiplying the calculated normal cosine of the included angle with this positive exponential curvature gain factor yields the fitting weight value for the pair of corresponding points participating in the error matrix solution. For example, the fitting weight for the feature region point is 0.98 multiplied by 3.320, resulting in 3.2536. This mechanism adopts measurement pairs with matching directions in the objective function, increasing the convergence influence of the feature region.

[0045] In an optional embodiment, the step of constructing a weighted point-to-surface error minimization objective function based on corresponding point pairs and fitting weights, and solving for the incremental rigid body transformation matrix, includes: The residual vector is obtained by subtracting the coordinates of the measurement point from the corresponding model point. The residual vector is then projected onto the principal normal vector of the corresponding model point to obtain the normal distance. The square of the normal distance is multiplied by the fitting weight as the error cost. The error costs of all corresponding point pairs are summed to form the objective function. The objective function is solved using the Gauss-Newton optimization scheme to obtain the incremental rigid body transformation matrix containing three-dimensional translation offset and three-dimensional rotation angle.

[0046] For each point pair within the set, consisting of the source measurement point and the corresponding point in the model, coordinate vector subtraction is performed to obtain the three-dimensional residual vector. Since automotive stamping products often possess large-area continuous thin-shell morphologies, point-to-point distances can easily cause surface slippage. The principal normal vector of the microplane containing the corresponding model point is taken, and the principal normal vector of this microplane is projected as a one-dimensional normal distance by calculating the vector dot product. Based on the square of this normal distance, it is multiplied by the previously calculated and associated specific fitting weight for the corresponding point pair, such as the calculated 3.2536 mentioned above, to generate the weighted error cost for a single point pair. The retained matching point pairs are traversed and accumulated to construct a nonlinear least-squares objective function based on the weighted point-to-surface distance.

[0047] To find the minimum of the objective function, the pose increment is defined as a six-dimensional parameter vector containing three Euler rotation angle increments and three translation offset increments. The Jacobian matrix of the objective function relative to this six-dimensional vector is calculated, with each row corresponding to the cross-product calculation result of a measurement point. Combining the weighted diagonal matrix and the error column vector, a system of normal equations is constructed using the Gauss-Newton method. This system of normal equations is solved using singular value decomposition or Cholesky decomposition, outputting the current six-dimensional increment solution. The obtained increment parameter vector is transformed into a corresponding 3×3 rotation matrix and a 3×1 translation vector, which are then assembled to obtain a 4×4 incremental rigid body transformation homogeneous matrix. For example, this solution yields a subtle transformation command containing a 0.25mm translation along the X-axis and a 0.05-degree rotation around the Z-axis.

[0048] In an optional embodiment, the calculation of the change in the transformation matrix and the change in error, and the setting of a convergence threshold based on the mean of the fitting weights, wherein the convergence threshold is inversely proportional to the mean of the fitting weights, includes: The sum of the absolute differences of the rotation parameters of the rigid body transformation between the current iteration and the previous iteration, and the sum of the absolute differences of the translation parameters after dimensionless processing of the feature length, are added as the change in the transformation matrix. The absolute value of the difference between the weighted root mean square error of the current iteration and the error of the previous iteration is calculated, and after dimensionless processing of the feature length, it is used as the change in error. The preset constant is divided by the mean of the fitting weights of all corresponding point pairs in the current iteration to obtain the set convergence threshold.

[0049] After each incremental rigid body transformation matrix solution is completed, three three-dimensional Euler angle increments and three three-dimensional translation increments are extracted from the obtained six-degree-of-freedom parameter vector. The longest boundary or enclosing box diagonal dimension of the automotive stamping part is set as the reference length, for example, 1500.0 mm. The translation parameters are dimensionless, and the change in the transformation matrix is ​​calculated. This change is equal to the sum of the absolute values ​​of the three rotation angles plus the sum of the absolute values ​​of the three translation parameters divided by the reference length. For example, if an iteration produces a total rotation increment of 0.002 rad and a translation increment of 1.5 mm, the change in the transformation matrix is ​​0.003. The global weighted mean square error of the current batch is calculated using the weighted residual algebraic formula. The absolute value of the error difference between the current and previous batches is taken and divided by the same reference length to obtain the dimensionless error change. For example, when the difference is 0.075 mm, the error change is 0.00005.

[0050] When determining the iteration termination criteria, the arithmetic mean of the fitting weights for the matching points used in the current batch is calculated. A preset constant representing the precision limit is input, preferably within the range of 0.00001 to 0.0005, such as 0.0001. Threshold allocation calculation is performed, i.e., the convergence threshold is equal to the preset constant divided by the mean of the fitting weights. If the mean weight of the current batch is too high due to the presence of many sharp stamping flangings and matching pairs, such as a mean of 2.5, the threshold will be automatically tightened to 0.00004 to encourage the iteration to continue seeking a better solution; conversely, if the data is generally flat and the mean weight drops to 0.8, the threshold is relaxed to 0.000125 to prevent frequent oscillations. At the end, it is synchronously checked whether the change in the transformation matrix and the change in the error are both less than the above-assigned convergence threshold. If the condition is met, the loop stops and the rigid body transformation matrix is ​​output.

[0051] The experimental setup used actual measured point clouds and a nominal 3D discrete model of a certain model of automobile door panel as test data. The initial translational deviation was set to 15.0 mm, and the initial rotational deviation to 5.0 degrees. The environment was configured with a 3.0 GHz CPU and 16 GB of RAM. The nominal model voxel downsampling mesh size was uniformly set to 2.0 mm, and the bounding box reference length was set to 1500 mm. The mean square error of the registered points to the surface, the total number of algorithm iterations, and the total registration time were used as the core evaluation indicators.

[0052] The experiment included four control and ablation protocols. The baseline control group used a standard iterative nearest-neighbor registration algorithm with a fixed threshold, achieving a registration mean squared error of 0.95 mm, 48 iterations, and a time of 3.6 seconds. The screening ablation group, in addition to the control group, incorporated a point set screening mechanism based on the top 30% of points with descending overall confidence, reducing the mean squared error to 0.62 mm, 35 iterations, and a time of 2.4 seconds. The gain ablation group, building upon the previous group, incorporated a positive exponential curvature gain factor to construct fitting weights, reducing the mean squared error to 0.38 mm, 26 iterations, and a time of 1.9 seconds. The complete protocol group included all the aforementioned steps and applied a convergence threshold setting mechanism based on the mean of the fitting weights, achieving a mean squared error of 0.24 mm, 22 iterations, and a time of 1.5 seconds. Figure 3 As shown, with the sequential superposition of the point confidence screening, curvature gain weighting, and convergence threshold modules proposed in this invention, the root mean square error of registration continues to decrease, the algorithm calculation time is reduced synchronously, and the complete scheme achieves the highest registration accuracy and optimal calculation efficiency.

[0053] The comprehensive confidence subset screening reduced outlier interference caused by drawing cracks and springback in stamped parts, decreasing registration error by 34% and reducing the scale of components involved in the objective function calculation, thus improving the efficiency of a single iteration. By inputting a positive exponential curvature gain factor, the constraint force in high-feature regions such as flanges and corners is geometrically amplified, reducing tangential slippage caused by large, flat areas in automobiles, further improving accuracy by 38%. Combined with a convergence threshold determination mechanism, the algorithm effectively avoids invalid oscillations and local overfitting in flat and noisy regions when using a fixed threshold. This mechanism automatically tightens the threshold to lock the optimal pose when high curvature features are matched, and loosens the threshold in flat regions to decisively terminate the algorithm. This reduces the number of iterations to 22 while preventing overfitting-induced accuracy degradation, further reducing the final mean square error to 0.24 mm. It also adjusts the iteration stopping condition based on the current feature weights, compressing the overall computation time by 58% compared to the benchmark group, achieving a balance between high registration accuracy and engineering computation timeliness.

[0054] In the second embodiment, the present invention also proposes a real-time fitting system for coordinate measuring machine data of automotive stamping products, comprising the following modules: The calculation module is used to acquire the measurement point cloud and nominal CAD model of automotive stamping products, calculate the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud, perform discrete sampling on the nominal CAD model, calculate the model point normal vector and surface curvature, and construct a spatial index. The determination module is used to enter the iterative alignment process. Each iteration executes the following: calculate the comprehensive confidence of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, select a subset of measurement points as the current source point cloud based on the confidence degree, and select the points based only on the initial geometric feature degree in the first iteration. For each point in the current source point cloud, search for candidate points in the nominal CAD model using the spatial index, and determine the corresponding points based on the Euclidean distance and the cosine of the angle between the normal vectors. The output module is used to multiply the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weights. Based on the corresponding point pairs and the fitting weights, a weighted point-to-surface error minimization objective function is constructed, and the incremental rigid body transformation matrix is ​​obtained by solving it. The incremental rigid body transformation matrix is ​​applied to update the pose of the measured point cloud, and the change in the transformation matrix and the change in error are calculated. A convergence threshold is set according to the mean of the fitting weights. The convergence threshold is inversely proportional to the mean of the fitting weights. The iteration is terminated when the change in the transformation matrix and the change in error are lower than the convergence threshold, and the cumulative rigid body transformation matrix is ​​output as the final pose.

[0055] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0056] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A real-time fitting method for coordinate measuring machine data of automotive stamping products, characterized in that, include: Acquire the measurement point cloud and nominal CAD model of automotive stamping products, calculate the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud, perform discrete sampling on the nominal CAD model, calculate the model point normal vector and surface curvature, and construct a spatial index; Enter the iterative alignment process. Each iteration executes the following: calculate the comprehensive confidence of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, select a subset of measurement points as the current source point cloud based on the confidence degree, and select the points based only on the initial geometric feature degree in the first iteration. For each point in the current source point cloud, search for candidate points in the nominal CAD model using the spatial index, and determine the corresponding points based on the Euclidean distance and the cosine of the angle between the normal vectors. The fitting weights are obtained by multiplying the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point. A weighted point-to-surface error minimization objective function is constructed based on the corresponding point pairs and the fitting weights. The incremental rigid body transformation matrix is ​​obtained by solving the incremental rigid body transformation matrix. The pose of the measured point cloud is updated by applying the incremental rigid body transformation matrix. The change in the transformation matrix and the change in error are calculated. A convergence threshold is set according to the mean of the fitting weights. The convergence threshold is inversely proportional to the mean of the fitting weights. The iteration is terminated when the change in the transformation matrix and the change in error are lower than the convergence threshold. The cumulative rigid body transformation matrix is ​​output as the final pose.

2. The method according to claim 1, characterized in that, The calculation of the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud includes: The covariance matrix eigenvalues ​​of the neighborhood point set of the measurement point are extracted by principal component analysis. The local surface curvature is calculated by dividing the minimum eigenvalue by the sum of all eigenvalues. The local surface curvature is then divided by the maximum local surface curvature among all points in the measurement point cloud to generate a normalized coefficient as the initial geometric eigenvalue of the measurement point.

3. The method according to claim 1, characterized in that, The step of discretizing the nominal CAD model, calculating the model point normal vectors and surface curvature, and constructing a spatial index includes: The nominal CAD model is discretized using a 3D voxel downsampling algorithm to obtain a set of model points. The principal normal vector and local surface curvature of each model point are calculated. A Kd tree is constructed using the 3D coordinates of the model points to complete the spatial index creation. The corresponding principal normal vector and local surface curvature are bound to each tree node.

4. The method according to claim 1, characterized in that, The step of calculating the comprehensive confidence level of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, and selecting a subset of measurement points as the current source point cloud based on the confidence level, with the first iteration selecting only based on the initial geometric feature degree, includes: The Euclidean fitting residuals of the corresponding points from the previous iteration, after being dimensionlessly processed by the reference length, are substituted into a negative exponential function with the base being the natural constant to calculate the residual decay factor. The residual decay factor is then multiplied by the initial geometric characteristic of the point to obtain the updated comprehensive confidence level. All measurement points are sorted in descending order of comprehensive confidence level, and the top 30% of measurement points are selected to form the source point cloud subset for the current iteration.

5. The method according to claim 1, characterized in that, The step of searching for candidate points in the nominal CAD model using the spatial index for each point in the current source point cloud, and determining the corresponding point based on the Euclidean distance and the cosine of the angle between the normal vectors, includes: Using the set upper limit of Euclidean distance and the lower limit of the cosine of the angle between the normal vectors as the judgment criteria, when the Euclidean distance from the source point to the first nearest candidate point in space is less than the above-mentioned upper limit of Euclidean distance, and the cosine of the angle between the normal vectors of the two is greater than the above-mentioned lower limit requirement, the candidate point is confirmed to be retained as the corresponding point, and the corresponding point pair is obtained.

6. The method according to claim 1, characterized in that, The step of multiplying the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weight includes: The inner product of the normal vectors of the two points in the corresponding point pair is taken as the cosine of the angle between the normal vectors. The local surface curvature bound to the tree node where the corresponding point is located in the nominal CAD model space index is read. The local surface curvature is substituted into a positive exponential function with the natural constant as the base to calculate the curvature gain factor. The cosine of the angle between the normal vectors is multiplied with the curvature gain factor to obtain a real number result, which is used as the fitting weight of the corresponding point pair.

7. The method according to claim 1, characterized in that, The objective function for minimizing the weighted point-to-surface error, constructed based on corresponding point pairs and fitted weights, is solved to obtain the incremental rigid body transformation matrix, including: The residual vector is obtained by subtracting the coordinates of the measurement point from the corresponding model point. The residual vector is then projected onto the principal normal vector of the corresponding model point to obtain the normal distance. The square of the normal distance is multiplied by the fitting weight as the error cost. The error costs of all corresponding point pairs are summed to form the objective function. The objective function is solved using the Gauss-Newton optimization scheme to obtain the incremental rigid body transformation matrix containing three-dimensional translation offset and three-dimensional rotation angle.

8. The method according to claim 1, characterized in that, The calculation of the change in the transformation matrix and the change in error involves setting a convergence threshold based on the mean of the fitting weights. This convergence threshold is inversely proportional to the mean of the fitting weights and includes: The sum of the absolute differences of the rotation parameters of the rigid body transformation between the current iteration and the previous iteration, and the sum of the absolute differences of the translation parameters after dimensionless processing of the feature length, are added as the change in the transformation matrix. The absolute value of the difference between the weighted root mean square error of the current iteration and the error of the previous iteration is calculated, and after dimensionless processing of the feature length, it is used as the change in error. The preset constant is divided by the mean of the fitting weights of all corresponding point pairs in the current iteration to obtain the set convergence threshold.

9. A real-time fitting system for coordinate measuring data of automotive stamping products, characterized in that, include: The calculation module is used to acquire the measurement point cloud and nominal CAD model of automotive stamping products, calculate the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud, perform discrete sampling on the nominal CAD model, calculate the model point normal vector and surface curvature, and construct a spatial index. The determination module is used to enter the iterative alignment process. Each iteration executes the following: calculate the comprehensive confidence of the measurement points based on the initial geometric feature degree and the fitting residual of the previous round, select a subset of measurement points as the current source point cloud based on the confidence degree, and select the points based only on the initial geometric feature degree in the first iteration. For each point in the current source point cloud, search for candidate points in the nominal CAD model using the spatial index, and determine the corresponding points based on the Euclidean distance and the cosine of the angle between the normal vectors. The output module is used to multiply the cosine of the angle between the normal vectors and the curvature gain factor based on the surface curvature of the corresponding point to obtain the fitting weights. Based on the corresponding point pairs and the fitting weights, a weighted point-to-surface error minimization objective function is constructed, and the incremental rigid body transformation matrix is ​​obtained by solving it. The incremental rigid body transformation matrix is ​​applied to update the pose of the measured point cloud, and the change in the transformation matrix and the change in error are calculated. A convergence threshold is set according to the mean of the fitting weights. The convergence threshold is inversely proportional to the mean of the fitting weights. The iteration is terminated when the change in the transformation matrix and the change in error are lower than the convergence threshold, and the cumulative rigid body transformation matrix is ​​output as the final pose.

10. The system according to claim 9, characterized in that, The calculation of the initial geometric feature degree based on the local surface curvature of the measurement points in the measurement point cloud includes: The covariance matrix eigenvalues ​​of the neighborhood point set of the measurement point are extracted by principal component analysis. The local surface curvature is calculated by dividing the minimum eigenvalue by the sum of all eigenvalues. The local surface curvature is then divided by the maximum local surface curvature among all points in the measurement point cloud to generate a normalized coefficient as the initial geometric eigenvalue of the measurement point.