Robust function-weighted minimization matching algorithm for visual measurement of complex components

CN116718137BActive Publication Date: 2026-09-08CHINA HUBEI LONGZHONG LABORATORY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310608783.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2026-09-08
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

[0003]本发明针对上述问题,提出了一种面向复杂构件视觉测量的鲁棒函数加权方差最小化算法,应用于复杂构件的定位与测量,可有效解决传统算法因大量异常点云存在导致的匹配失真问题

Benefits of technology

[0061] This invention fully considers the problem of matching distortion caused by a large number of complex abnormal point clouds. It applies a robust weight function to the algorithm's objective function and changes the weight function curve during the iteration process to gradually weaken the influence of abnormal point clouds on registration. This can improve registration accuracy and avoid the occurrence of matching tilt. Compared with traditional registration algorithms, this invention can quickly and accurately obtain the optimal solution in the presence of a large number of abnormal point clouds, and is not prone to getting trapped in local optima. It can effectively solve the problem of matching distortion in traditional algorithms under this condition. It is suitable for fine registration of complex workpieces with a large number of abnormal point clouds and has the characteristics of strong stability and strong resistance to abnormal interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116718137B_ABST
    Figure CN116718137B_ABST
Patent Text Reader

Abstract

The application discloses a robust function weighted minimization matching algorithm for complex component visual measurement, and first constructs and inputs target point cloud P and source point cloud Q; the target point cloud and the source point cloud are matched and divided into positive and negative measuring points; the normal distance of the point pairs is calculated, the function deformation parameter a is input, and the weight scale factor c is set; the robust function is constructed, the measuring points are divided into normal measuring points and abnormal measuring points according to the point pair distance, and different degrees of weight values are respectively applied; the target function is established, the rigid body conversion matrix of accurate registration is solved, the calculated rigid body conversion matrix is used to act on the source point cloud to update the source point cloud position; the error evaluation function is defined; the point pairs are recalculated, then the above process is iterated once, and the value of c is updated once every K iterations until the convergence condition is reached, and finally the rigid body conversion matrix T of accurate registration is obtained. The application can perform accurate registration with high efficiency and good precision under the condition that a large number of abnormal point clouds exist.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of integrated manufacturing of measurement and processing of complex components. Specifically, it relates to a point cloud fine registration algorithm, and particularly to a robust function weighted minimization matching algorithm (RFWVM) for visual measurement of complex components. Background Technology

[0002] Aero-engine and gas turbine blades typically feature thin leading and trailing edges with significant curvature variations, distorted profiles, and difficult-to-machine materials. The quality of their surface machining has a decisive impact on engine performance. During robotic grinding and polishing, over-grinding (excessive material removal) is prone to occur in high-curvature areas such as the leading and trailing edges, while under-grinding (insufficient material removal) is likely to occur in low-curvature areas. Blade machining requires multiple grinding and polishing operations, necessitating error correction and determination of machining allowances. This relies on precise registration between measured point clouds and model point clouds. Faced with complex structures, uneven allowance distribution, and numerous anomalous point clouds, existing point cloud registration algorithms struggle to achieve effective registration and obtain accurate information about the machining allowances during the workpiece process. The paper "A method for registration of 3-D shapes" (IEEE Transactions on Pattern Analysis and Machine Intelligence, 14(1992) 239-256) proposes an Iterative Closest Point (ICP) algorithm, which completes the precise registration of point clouds by iteratively calculating and minimizing the sum of squared point-to-point distances. However, this algorithm does not consider the case of a large amount of residual point cloud, which can lead to matching distortion when used for the aforementioned complex workpieces. The authorized invention patent with application number CN201510226138.8 proposes a workpiece point cloud matching algorithm based on minimizing the distance variance. This algorithm can achieve good matching results even with partial point cloud defects and uneven point cloud density. However, for workpieces with a large amount of uneven residual and structural deviation, this algorithm will also result in matching distortion. The authorized invention patent with application number CN202110573411.X proposes an optical measurement method for complex workpieces based on a weighted positive and negative margin variance minimization algorithm. This algorithm can suppress some matching distortion caused by uneven margins. However, when the degree of structural deviation is not large but the number of deviation points is large, the structural deviation point cloud that should be suppressed is regarded as the normal margin point cloud and participates in the registration calculation, causing the algorithm to fall into a local optimum and fail to register effectively. Summary of the Invention

[0003] To address the aforementioned problems, this invention proposes a robust function-weighted variance minimization algorithm for visual measurement of complex components. This algorithm can be applied to the localization and measurement of complex components and effectively solves the matching distortion problem caused by the presence of a large number of abnormal point clouds in traditional algorithms.

[0004] The purpose of this invention is to provide a robust function weighted variance minimization (RFWVM) algorithm for visual measurement of complex components. It establishes a robust weight function that can effectively suppress structural deviation point clouds and uneven margin point clouds, making it less prone to matching distortion when faced with a large number of abnormal point clouds. The algorithm exhibits strong robustness and can suppress the influence of a large number of uneven margin point clouds on precise registration, making it particularly suitable for the positioning and measurement of complex components. The effectiveness of the algorithm is verified through the measurement and positioning of complex components.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] A robust function-weighted minimization matching algorithm for visual measurement of complex components includes the following steps:

[0007] Step 1: Construct and input the target point cloud P and the source point cloud Q;

[0008] Step 2: Use the KD-Tree algorithm to search for the set of nearest neighbor pairs in the target point cloud and the source point cloud. For a measurement point p in the target point cloud... i With the source point cloud and the measurement point p i The nearest point q j Form a pair of nearest neighbor points, and divide the points in the target point cloud into positive and negative measurement points based on the positional relationship of the point pairs;

[0009] Step 3: Calculate p in each pair of points in the nearest neighbor set. i to q j The normal distance, the input function deformation parameter α, and the weight scale factor c are set;

[0010] Step 4: Construct a robust function to classify points in the target point cloud Q into normal measurement points and abnormal point clouds based on the distance between point pairs, and apply different weight values ​​to the distance between point pairs through the robust function.

[0011] Step 5: Establish an objective function that minimizes the robust weighted variance based on the point-to-point normal distance and the robust function;

[0012] Step 6: Solve for the rigid body transformation matrix between the source point cloud Q and the target point cloud P based on the objective function of minimizing the robust weighted variance. Apply the calculated rigid body transformation matrix to the source point cloud to update its position.

[0013] Step 7: Define the error evaluation function for point clouds with uneven margins and point clouds with structural deviations;

[0014] Step 8: Repeat steps 2-7, and update the value of c every K iterations until the convergence condition is met, finally obtaining the perfectly registered rigid body transformation matrix T.

[0015] Furthermore, in step 1, the source point cloud Q is constructed as follows:

[0016] The source point cloud Q is discretized using the CAD model, and the normal vectors of the source point cloud are estimated using the NormalEstimation function in the PCL library. The centroid is set as the viewpoint, and the direction of each normal vector is calculated to be consistent with the centroid and outward, thus completing the normal vector orientation.

[0017] The target point cloud P was obtained by scanning the workpiece using a structured light 3D scanner.

[0018] Furthermore, in step 2, the method for distinguishing between positive and negative measurement points is as follows: the vector obtained by subtracting the position of the nearest neighbor point in the source point cloud from the position of the measurement point in the target point cloud is multiplied by the normal vector of the corresponding point in the source point cloud. If the value is greater than 0, it is a positive residual measurement point; if it is less than 0, it is a negative residual measurement point.

[0019] Furthermore, step 3 specifically includes the following steps:

[0020] Step 3.1, Point-to-normal distance d iT The distance from the midpoint to the plane includes the distance d from the positive measuring point to the normal. kT and the distance d between the negative measuring point and the normal direction sT ,i∈[1,m+n],i is the ordinal index,d iT This represents the point-to-normal distance of the i-th measuring point, where m is the total number of positive measuring points and n is the total number of negative measuring points.

[0021] Define δ∈R 3 , t∈R 3 These are the rotation vector and the translation vector, respectively, R 3 Representing a three-dimensional vector space, a point-to-normal distance function is established, as shown in formula (1):

[0022]

[0023] Where, p i Let p represent the i-th measurement point in the target point cloud P. i+ For measuring point p i After single-step conversion, the measurement point q j In the source point cloud Q, the relationship between p and i The points that form nearest neighbor pairs, where F is the distance function, and n j Represents the j-th source point cloud q j The normal vector at point n iT =n j , It is a transformation vector;

[0024] Step 3.2: Based on the point cloud structure features, input the deformation parameter α value of the function and set the weight scaling factor c value.

[0025] Furthermore, in step 4, the abnormal point cloud is divided into controllable abnormal measurement points and completely abnormal measurement points, and the weight of completely abnormal measurement points is assigned to 0. The following calculations and judgments are made based on positive and negative measurement points respectively:

[0026] For the forward measuring point, the distance robustness function for the forward measuring point is constructed as shown in formula (2):

[0027]

[0028] Where w k Let w be the distance weight function for the k-th positive measurement point. k <0 is corrected to w k =0,d kT The distance from the k-th positive measuring point to the plane is... It is the average distance from all positive measurement points to the plane after a single-step transformation. If it is the transformation vector ξ = 0 in the first iteration... 6×1 m is the total number of positive measurement points, k∈[1,m], α∈R is the deformation parameter controlling the robustness of the weight function; c∈(0,∞] is the weight scaling factor controlling the zero-point value of the weight function; d 0+ This represents the zero point of the positive measurement point weight curve;

[0029] For negative measuring points, a distance robustness function for negative measuring points is constructed as shown in formula (3):

[0030]

[0031] Where w s Let w be the distance weight function for the s-th negative measurement point. s <0 is corrected to w s =0,d sT Let be the distance from the s-th negative measuring point to the plane. It is the mean distance from the negative measurement point to the plane after a single-step transformation. If it is the transformation vector of the first iteration, ξ = 0. 6×1 n is the total number of negative measurement points, s∈[1,n], α∈R is the deformation parameter controlling the robustness of the weight function; d 0- This indicates the zero point of the negative measurement point weight curve.

[0032] Furthermore, in step 5, the objective function of the robust function weighted variance minimization algorithm is established as shown in formula (4):

[0033]

[0034] in, The weighted normal distance deviation of the positive robust function of the k-th positive measuring point satisfies the following condition: The negative robust function weighted normal distance deviation of the s-th negative measurement point satisfies the following condition: The mean of the weighted normal distances of the robust function for all positive measurement points. The mean of the weighted normal distances of the robust function for all negative measurement points; d kT For the positive measuring point relative to the normal direction, d sT This represents the negative distance between the measuring point and the normal direction.

[0035] Considering anomalous point clouds, equation (4) can be rewritten as equation (5):

[0036]

[0037] in, and The value of is 1, representing the weight of the positive and negative measurement points within the normal range; m1 and m2 represent the total number of normal positive measurement points and the total number of abnormal positive measurement points, respectively; n1 and n2 represent the total number of normal negative measurement points and the total number of abnormal negative measurement points, respectively. D is the weighted sum of squared distance deviations for all outlier measurement points, including both positive and negative outlier measurement points. f The weighted distance deviation of the f-th outlier measuring point; the mean of the weighted normal distance of all positive measuring points using the robust function. The calculation is shown in formula (6):

[0038]

[0039] Where, m 21 and m 20 These represent the total number of controllable abnormal measuring points and the total number of completely abnormal measuring points, respectively. For the fth 1+ Robust function weights for controllable anomaly measurement points For the fth 0+ Robust function weights for completely anomalous test points For the fth 1+ The point-to-normal distance corresponding to each controllable anomaly measurement point For the fth 0+ The normal distance between point pairs corresponding to each completely anomalous measurement point is obtained from the robust weight function established in step 5. With Substituting into formula (6), we get formula (7):

[0040]

[0041] Furthermore, step 6 specifically includes the following steps:

[0042] Step 6.1: Simplify the sum of squared weighted normal distance deviations of the robust function at the forward measuring points, as shown in formula (10):

[0043]

[0044] In the above formula, E + It is a 6×6 matrix, F + It is a 6×1 matrix, D + It is a scalar;

[0045] Step 6.2: Simplify the weighted normal distance deviation sum of the robust function of the negative measurement points in the same way, as shown in formula (11):

[0046]

[0047] Among them, E - It is a 6×6 matrix, F - It is a 6×1 matrix, D - It is a scalar;

[0048] Step 6.3: Based on the objective function G(R,t) shown in formula (4), differentiate the objective function with respect to the transformation vector ξ and solve for it, as shown in formula (12):

[0049]

[0050] In the above formula, A k A s Both are 1×6 matrices. Mean distance between all positive measurement points It is the point-to-point distance of the kth positive measurement point without single-step transformation; Mean distance between all negative measurement points It is the point-to-point distance of the s-th negative measurement point without single-step conversion; Robust function weighted negative average vector Robust function weighted positive average vector;

[0051] Therefore, the rotation matrix and translation matrix are obtained as shown in formula (13):

[0052]

[0053] where e is the natural base and t is the translation vector. Let be the antisymmetric matrix of the rotation vector δ;

[0054] Step 6.4: Apply R and T to the source point cloud to update the source point cloud position.

[0055] Furthermore, in step 7, the error evaluation function As in formula (14):

[0056]

[0057] In formula (14), p i This indicates that the distance between the midpoint pairs of the registered measurement points is less than the average distance between the midpoint pairs. The measuring point, q j This indicates the nearest point found from the source point cloud Q.

[0058] Furthermore, in step 8, the value of K ranges from 2 to 8.

[0059] Furthermore, in step 8, the convergence condition is that the number of iterations M is greater than a set value M. max Or the difference between the error evaluation function values ​​of two consecutive iterations is less than the set threshold G.

[0060] The beneficial effects of this invention are:

[0061] This invention fully considers the problem of matching distortion caused by a large number of complex abnormal point clouds. It applies a robust weight function to the algorithm's objective function and changes the weight function curve during the iteration process to gradually weaken the influence of abnormal point clouds on registration. This can improve registration accuracy and avoid the occurrence of matching tilt. Compared with traditional registration algorithms, this invention can quickly and accurately obtain the optimal solution in the presence of a large number of abnormal point clouds, and is not prone to getting trapped in local optima. It can effectively solve the problem of matching distortion in traditional algorithms under this condition. It is suitable for fine registration of complex workpieces with a large number of abnormal point clouds and has the characteristics of strong stability and strong resistance to abnormal interference. Attached Figure Description

[0062] Figure 1 Flowchart of the robust function weighted variance minimization algorithm for fine registration.

[0063] Figure 2 This is a graph showing the variation of the robust function weights of the positive and negative residual points with the number of iterations in an embodiment of the present invention. Figure 2 In the middle (a), the weight change curve of the positive measuring point is shown. Figure 2 In the middle (b), the curve of the negative measurement point weight change is shown.

[0064] Figure 3 Blade CAD point cloud and simulated measurement of the initial position of the blade point cloud after offsetting 25.8% of the points by 2mm.

[0065] Figure 4 Comparison of global registration errors between RFWVM and WPMAVM algorithms.

[0066] Figure 5 Chromatograms of blade registration errors for different algorithms, among which Figure 5 (a) is a chromatogram of the global registration error of the blades in the ICP algorithm. Figure 5 (b) is a chromatogram of the global registration error of the blades in the WPMAVM algorithm. Figure 5 (c) is a chromatogram of the global registration error of the blades in the RFWVM algorithm.

[0067] Figure 6 This is a global registration and positioning error diagram of the ICP, WPMAVM, and RFWVM algorithms in this embodiment of the invention.

[0068] Figure 7 Vehicle body scan point cloud and initial position map of vehicle body CAD point cloud.

[0069] Figure 8 This is a chromatogram of the global registration error of different algorithms on stamped car body parts in embodiments of the present invention, wherein... Figure 8 (a) is a chromatogram of the global registration error of the vehicle body parts in the ICP algorithm. Figure 8 (b) is a chromatogram of the global registration error of the vehicle body workpiece in the WPMAVM algorithm. Figure 8 (c) is a chromatogram of global registration error of the vehicle body workpiece in the RFWVM algorithm. Detailed Implementation

[0070] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.

[0071] like Figure 1 As shown, this invention provides a robust function-weighted minimization matching algorithm for visual measurement of complex components, comprising the following steps:

[0072] Step 1: Construct and input the target point cloud P and the source point cloud Q.

[0073] For example, the source point cloud Q construction method is as follows:

[0074] The source point cloud Q is discretized using the CAD model, and the normal vectors of the source point cloud are estimated using the NormalEstimation function in the PCL library. The centroid is set as the viewpoint, and the direction of each normal vector is calculated to be consistent with the centroid and outward, thus completing the normal vector orientation.

[0075] An exemplary target point cloud P is obtained by scanning the workpiece with a structured light 3D scanner to obtain a measurement point cloud, which is then used as the target point cloud P.

[0076] Step 2: Use the KD-Tree algorithm to search for the set of nearest neighbor pairs in the target point cloud and the source point cloud. For a measurement point p in the target point cloud... i With the source point cloud and the measurement point pi The nearest point q j Form a pair of nearest neighbor points, and divide the points in the target point cloud into positive and negative measurement points based on the positional relationship of the point pairs.

[0077] Furthermore, in step 2, the method for distinguishing between positive and negative measurement points is as follows: The vector obtained by subtracting the position of the nearest neighbor point in the source point cloud from the position of the measurement point in the target point cloud is multiplied by the normal vector of the corresponding point in the source point cloud. If the value is greater than 0, it is a positive residual measurement point; if it is less than 0, it is a negative residual measurement point. The calculation formula is as follows:

[0078] If the measuring point p i satisfy, Then the measuring point p i For positive measurement points, Source point cloud q j The normal vector at that location;

[0079] If the measuring point p i satisfy, Then the measuring point p i This is a negative measurement point.

[0080] Step 3: Calculate the normal distance from P to Q in each point pair in the nearest neighbor pair set, input the function deformation parameter α, and set the weight scale factor c.

[0081] For example, step 3 specifically includes the following steps:

[0082] Step 3.1, Point-to-normal distance d iT The distance from the midpoint of the point pair to the plane (in the point pair corresponding to the i-th measuring point, measuring point p) i To source point cloud q j The distance between the tangent planes (hereinafter referred to as the point-to-plane distance or point-to-normal distance), including the positive distance d between the measured point and the normal. kT and the distance d between the negative measuring point and the normal direction sT ,i∈[1,m+n],i is the ordinal index,d iT This represents the point-to-normal distance of the i-th measuring point, where m is the total number of positive measuring points and n is the total number of negative measuring points.

[0083] Define δ∈R 3 , t∈R 3 These are the rotation vector and the translation vector, respectively, R 3 Representing a three-dimensional vector space, establish a point-to-point normal distance function (measured point p). i To the corresponding source point cloud q j The distance between the tangent planes is shown in formula (1):

[0084]

[0085] Where, p i Let p represent the i-th measurement point in the target point cloud P. i+ For measuring point p i After single-step conversion, the measurement point q j In the source point cloud Q, the relationship between p and i The points that form nearest neighbor pairs, where F is the distance function, and n j Represents the j-th source point cloud q j The normal vector at point n iT =n j , It is the transformation vector. In the first iteration, the transformation vector ξ = 0. 6×1 ;

[0086] Step 3.2: Based on the point cloud structure features, input the deformation parameter α value of the function and set the weight scaling factor c value.

[0087] To control the deformation parameters of the weighting function's robustness, it is better to set α to a negative number when the noise of the input target point cloud is high, and better to set α to 0 when the noise of the input target point cloud is low. Generally, α is set to -2.

[0088] The initial value of the weight scaling factor is generally set to 0, i.e., c = 10. Then, every 4 iterations, the c value is annealed once, i.e., c = c / 2. When c < 0.5, c = 0.5 is taken. The smaller the c value, the fewer outlier point clouds participate in the calculation. In the later stage of the iteration, the c value should be kept at a small value.

[0089] Step 4: Construct a robust function to classify points in the target point cloud Q into normal measurement points and abnormal point clouds based on the distance between point pairs, and apply different weight values ​​to the distance between point pairs through the robust function.

[0090] As an example, step 4 is specifically described below:

[0091] In step 4, the anomalous point cloud is divided into controllable anomalous measurement points and completely anomalous measurement points, and the judgment method is as follows:

[0092] Calculate the ratio of normal distance to average normal distance;

[0093] When this ratio is less than or equal to 1, it is judged as a normal measurement point, and the weight is assigned a value of 1, i.e., w. k =1;

[0094] When the ratio is greater than 1 but less than or equal to the zero point of the weight curve, it is judged as a controllable abnormal measurement point, and a value is assigned according to the weight of the degree of abnormal deviation.

[0095] When this ratio is greater than the zero point of the weight curve, it is a completely abnormal measurement point, and the weight of the completely abnormal measurement point is assigned to 0.

[0096] The specific calculation formula is as follows:

[0097] For the forward measuring point, the distance robustness function for the forward measuring point is constructed as shown in formula (2):

[0098]

[0099] Where w k Let w be the distance weight function for the k-th positive measurement point. k <0 is corrected to w k =0,d kT The distance from the k-th positive measuring point to the plane is... It is the average distance from all positive measurement points to the plane after a single-step transformation. If it is the first iteration, the transformation vector ξ = 0. 6×1 m is the total number of positive measurement points, k∈[1,m], α∈R is the deformation parameter controlling the robustness of the weight function; c∈(0,∞] is the weight scaling factor controlling the zero-point value of the weight function; d 0+ Indicates the zero point of the positive measurement point weight curve, such as Figure 2 As shown in (a), the intersection of the weight curve of each positive measurement point with the horizontal axis is a zero point;

[0100] For negative measuring points, a distance robustness function for negative measuring points is constructed as shown in formula (3):

[0101]

[0102] Where w s Let w be the distance weight function for the s-th negative measurement point. s <0 is corrected to w s =0,d sT Let be the distance from the s-th negative measuring point to the plane. This is the mean distance from the negative measurement point to the plane after a single-step transformation. If it is the first iteration, then the transformation vector ξ = 0. 6×1 n is the total number of negative measurement points, s∈[1,n], α∈R is the deformation parameter controlling the robustness of the weight function; d 0- Indicates the zero point of the negative measurement point weight curve, such as Figure 2 As shown in (b), the intersection of the weight curve of each negative measurement point with the horizontal axis is zero.

[0103] Step 5: Establish an objective function that minimizes the robust weighted variance based on the point-to-point normal distance and the robust function.

[0104] Example: The objective function of the robust function weighted variance minimization algorithm is established as shown in formula (4):

[0105]

[0106] in, The weighted normal distance deviation of the positive robust function of the k-th positive measuring point satisfies the following condition: The negative robust function weighted normal distance deviation of the s-th negative measurement point satisfies the following condition: The mean of the weighted normal distances of the robust function for all positive measurement points. The mean of the weighted normal distances of the robust function for all negative measurement points; d kT For the positive measuring point relative to the normal direction, d sT This represents the negative distance between the measuring point and the normal direction.

[0107] Considering anomalous point clouds, equation (4) can be rewritten as equation (5):

[0108]

[0109] in, and The value of is 1, representing the weight of the positive and negative measurement points within the normal range; m1 and m2 represent the total number of normal positive measurement points and the total number of abnormal positive measurement points, respectively; n1 and n2 represent the total number of normal negative measurement points and the total number of abnormal negative measurement points, respectively. D is the weighted sum of squared distance deviations for all outlier measurement points, including both positive and negative outlier measurement points. f The weighted distance deviation of the f-th outlier measuring point; the mean of the weighted normal distance of all positive measuring points using the robust function. The calculation is shown in formula (6):

[0110]

[0111] Where, m 21 and m 20 These represent the total number of controllable abnormal measuring points and the total number of completely abnormal measuring points, respectively. For the fth 1+ Robust function weights for controllable anomaly measurement points For the fth 0+ Robust function weights for completely anomalous test points For the first f1+ The point-to-normal distance corresponding to each controllable anomaly measurement point For the fth 0+ The normal distance between point pairs corresponding to each completely anomalous measurement point is obtained from the robust weight function established in step 5. With Substituting into formula (6), we get formula (7):

[0112]

[0113] The robustness of the above objective function is verified as follows:

[0114] Formula (7) is the actual The expression, assuming the ideal positive weighted distance mean. And calculate and The difference is shown in formula (8):

[0115]

[0116] From formula (8), we can see that assuming all and When the values ​​are very close, The value is close to 0, meaning the actual weighted average distance is very close to the ideal value; if Let m be a midpoint between (0,1). From the above formula, we can see that if there are too many controllable abnormal measurement points, that is, the algorithm treats a large number of deviation point cloud regions with small margins as controllable margins for calculation, m... 21 >>m 20 Even m 21 When m1 is on the same order of magnitude, The value of will be very large, at which point there will be a significant deviation between the ideal positive convergence position and the actual convergence position, leading to matching distortion. The weight function w set in step 5... k The distance range of the controllable margin point cloud will be reduced by the number of iterations to decrease m. 21 The value, while also reducing and The difference between them is now moving towards the actual convergence position. It will gradually converge towards the positive ideal position. Because of their proximity, the RFWVM algorithm (Robust Function Weighted Variance Minimization Algorithm for Visual Measurement of Complex Components) can suppress matching distortion caused by a large number of anomalous point clouds. (The last part, "D," appears to be an unrelated fragment and is left untranslated.) f Controllable abnormal measurement points were eliminated. Assume the RFWVM algorithm makes Similarly, it can be proven that... With Let's put it into perspective In, as in formula (9):

[0117]

[0118] It can be proven from formula (9) that, under the influence of weights, uncontrollable abnormal measurement points will not participate in ξ. RFWVM The solution, and at this time Equivalent to the mean distance of ideal positive and negative margins, then minimize The objective is the same as the registration objective, therefore the objective function is robust.

[0119] Step 6: Solve for the rigid body transformation matrix between the source point cloud Q and the target point cloud P based on the objective function of minimizing the robust weighted variance. Apply the calculated rigid body transformation matrix to the source point cloud to update its position.

[0120] For example, the specific steps are as follows:

[0121] Step 6.1: Simplify the sum of squared weighted normal distance deviations of the robust function at the forward measuring points, as shown in formula (10):

[0122]

[0123] In the above formula, E + It is a 6×6 matrix, F + It is a 6×1 matrix, D + It is a scalar;

[0124] Step 6.2: Simplify the weighted normal distance deviation sum of the robust function of the negative measurement points in the same way, as shown in formula (11):

[0125]

[0126] Among them, E - It is a 6×6 matrix, F - It is a 6×1 matrix, D - It is a scalar;

[0127] Step 6.3: Based on the objective function G(R,t) shown in formula (4), differentiate the objective function with respect to the transformation vector ξ and solve for it, as shown in formula (12):

[0128]

[0129] In the above formula, A k A s Both are 1×6 matrices. Mean distance between all positive measurement points It is the point-to-point distance of the kth positive measurement point without single-step transformation; Mean distance between all negative measurement points It is the point-to-point distance of the s-th negative measurement point without single-step conversion; Robust function weighted negative average vector Robust function weighted positive average vector;

[0130] Therefore, the rotation matrix and translation matrix are obtained as shown in formula (13):

[0131]

[0132] where e is the natural base and t is the translation vector. Let be the antisymmetric matrix of the rotation vector δ;

[0133] When δ = [δx, δy, δz]

[0134] Step 6.4: Apply R and T to the source point cloud to update the source point cloud position.

[0135] Step 7: Define the error evaluation function for point clouds with uneven margins and point clouds with structural deviations.

[0136] Example, error evaluation function As in formula (14):

[0137]

[0138] In formula (14), p i This indicates that the distance between the midpoint pairs of the registered measurement points is less than the average distance between the midpoint pairs. The measuring point, q j This indicates the nearest point found from the source point cloud Q.

[0139] Step 8: Repeat steps 2-7, updating the value of c every 4 iterations until the convergence condition is met, and finally obtain the perfectly registered rigid body transformation matrix T.

[0140] It should be noted that the iteration interval K is not limited to the value of 4 mentioned above. It can be any value between 2 and 8 as needed. The value of 4 is only for the balance between calculation accuracy and algorithm in this embodiment.

[0141] For example, the above convergence condition is that the number of iterations M is greater than a set value M. max Or the difference between the error evaluation function values ​​of two consecutive iterations is less than the set threshold G.

[0142] It should be noted that M max A larger value is better, but considering execution efficiency and required computing power, a value between 100 and 500 is generally acceptable to meet the requirements of this invention. A smaller threshold G results in higher precision, but considering execution efficiency and required computing power, it is generally set at 1×10. -6 Left and right; can be 1×10 -5 ~1×10 -7 .

[0143] Manually offset 25.8% of the points in the leaf point cloud model by 2mm, and perform a certain pose transformation on the source point cloud as the initial position of the two point clouds before registration begins. Figure 3 As shown; using the WPMAVM algorithm for iterative registration of the leaf point cloud, it gets stuck in a local optimum around the 14th iteration, and ultimately its... After replacing the positive and negative residual weights with the robust weight function in the RFWVM algorithm, the algorithm converges normally, and its The error is very close to 0, and the registration is basically globally optimal. The error variation curve is as follows: Figure 4 As shown. Subsequently, the ICP algorithm was added to perform registration calculations on the same leaf point clouds, mapping the nearest neighbor distances from each algorithm's results to a chromatogram, as shown below. Figure 5 As shown, the RFWVM algorithm, except for the manually biased portion, registers all other normal point clouds to the correct positions, demonstrating stronger stability compared to the other two algorithms. value pairs, for example Figure 6 As shown.

[0144] Subsequent point cloud registration experiments were conducted using the model point cloud of the stamped body and the measured point cloud. The initial state is shown in the appendix. Figure 7 The same three algorithms were used for registration, and the final result is as follows: Figure 8 As shown, observe Figure 8 It can be seen that the RFWVM algorithm is more effective in distinguishing which point clouds are abnormal and suppressing them, and its registration effect is more accurate than the other two algorithms.

[0145] It should be noted that the single-step conversion calculation technique used in this invention can be found in CN202110573411.X.

[0146] The above embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Although the invention has been described in detail with reference to the embodiments, those skilled in the art should understand that various combinations, modifications, or equivalent substitutions of the technical solutions of the invention do not depart from the spirit and scope of the invention and should be covered within the scope of the claims of the invention.

Claims

1. A robust function-weighted minimization matching algorithm for visual measurement of complex components, characterized in that, Includes the following steps: Step 1: Construct and input the target point cloud P and Source Cloud Q ; Step 2: Use the KD-Tree algorithm to search for the set of nearest neighbor points in the target point cloud and the source point cloud, and find a measurement point in the target point cloud. p i With the source point cloud and the measuring point p i The closest point q j Form a pair of nearest neighbor points, and divide the points in the target point cloud into positive and negative measurement points based on the positional relationship of the point pairs; Step 3: Calculate the nearest neighbor pair in the set of nearest neighbor pairs. p i arrive q j Normal distance, input function deformation parameters Value, set weight scaling factor value; Step 4: Construct a robust function to convert the target point cloud based on the distance between point pairs. Q The points in the cloud are divided into normal measurement points and abnormal point clouds, and different weight values ​​are applied to the distance between the points using a robust function. Step 5: Establish an objective function that minimizes the robust weighted variance based on the point-to-point normal distance and the robust function; Step 6: Solve for the source point cloud based on the objective function of minimizing the robust weighted variance. Q and target point cloud P The rigid body transformation matrix between the two is precisely registered, and the calculated rigid body transformation matrix is ​​applied to the source point cloud to update the position of the source point cloud; Step 7: Define the error evaluation function for point clouds with uneven margins and point clouds with structural deviations; Step 8: Repeat steps 2-7, and update once every K iterations. The value of M is calculated until the convergence condition is met, ultimately yielding the precisely registered rigid body transformation matrix T; the convergence condition is that the number of iterations M is greater than a set value. Or the difference between the error evaluation function values ​​of two consecutive iterations is less than the set threshold G; Step 3 specifically includes the following steps: Step 3.1, Point-to-normal distance The distance from the midpoint to the plane includes the distance from the positive measuring point to the normal. and negative measurement point relative to normal distance , , i Ordinal subscript, Indicates the first i Point-to-normal distance of each measuring point m This represents the total number of positive measuring points. n This represents the total number of negative measurement points. definition , These are the rotation vector and the translation vector, respectively. Representing a three-dimensional vector space, a point-to-normal distance function is established, as shown in formula (1): Official (1) in, p i Represents the target point cloud P The first in i One measuring point, p i+ For measuring points p i Measurement points after single-step conversion q j Represents source point cloud Q Zhongyu p i The points that form nearest neighbor pairs, where F is a distance function. Indicates the first j Individual point cloud The normal vector at that point, , It is a transformation vector; Step 3.2: Input function deformation parameters based on point cloud structural features. Value, set weight scaling factor value; In step 4, the anomalous point cloud is divided into controllable anomalous measurement points and completely anomalous measurement points, and the weight of completely anomalous measurement points is assigned to 0. The following calculations and judgments are made based on positive and negative measurement points respectively: For the forward measuring point, the distance robustness function for the forward measuring point is constructed as shown in formula (2): Official (2) in For the first k The distance weight function for each positive measurement point, when Time correction , For the first k Distance from each positive measuring point to the plane It is the average distance from all positive measurement points to the plane after a single-step transformation, and the transformation vector of the first iteration. , This is the total number of forward measuring points. , The deformation parameters are used to control the robustness of the weighting function; The weight scaling factor is used to control the zero-point values ​​of the weighting function; d 0+ This indicates the zero point of the positive measurement point weight curve; For negative measuring points, a distance robustness function for negative measuring points is constructed as shown in formula (3): Formula (3) in For the first s The distance weight function for each negative measurement point, when Time correction , For the first s Distance from each negative measuring point to the plane It is the mean distance from the negative measurement point to the plane after a single-step transformation, and the transformation vector of the first iteration. , This is the total number of negative measuring points. , The deformation parameters are used to control the robustness of the weighting function; d 0- This indicates the zero point of the negative measurement point weight curve; In step 8, the value of K ranges from 2 to 8.

2. The robust function-weighted minimization matching algorithm for visual measurement of complex components according to claim 1, characterized in that, In step 1, the source cloud Q The construction method is as follows: Discretize the source point cloud using a CAD model. Q and through PCL In the library Normal Estimation The function estimates the normal vectors of the source point cloud, sets the centroid as the viewpoint, and calculates the direction of each normal vector to be consistent with the centroid and outward, thus completing the normal vector orientation. The target point cloud P The workpiece was obtained by scanning it using a structured light 3D scanner.

3. The robust function-weighted minimization matching algorithm for visual measurement of complex components according to claim 1, characterized in that, In step 2, the method to distinguish between positive and negative measurement points is as follows: subtract the position of the nearest neighbor point in the source point cloud from the position of the measurement point in the target point cloud and take the dot product with the normal vector of the corresponding point in the source point cloud. If the value is greater than 0, it is a positive residual measurement point; if it is less than 0, it is a negative residual measurement point.

4. The robust function-weighted minimization matching algorithm for visual measurement of complex components according to claim 1, characterized in that, In step 5, the objective function of the robust function weighted variance minimization algorithm is established as shown in formula (4): Official (4) in, For the first k The weighted normal distance deviation of the positive robust function of each positive measuring point satisfies the following condition. , For the first s The negative robust function weighted normal distance deviation of each negative measurement point satisfies the following condition. ; The mean of the weighted normal distances of the robust function for all positive measurement points. The mean of the weighted normal distances to all negative measurement points using the robust function; For the positive measuring point relative to the normal direction, This represents the negative distance between the measuring point and the normal direction. Considering anomalous point clouds, equation (4) can be rewritten as equation (5): Official (5) in, and The weight of the measurement points within the normal range in both positive and negative directions is 1; m 1. m 2 represents the total number of normal positive measuring points and the total number of abnormal positive measuring points, respectively; n 1. n 2 represents the total number of normal negative measuring points and the total number of abnormal negative measuring points, respectively; This is the weighted sum of squared distance deviations for all outlier measurement points, including both positive and negative outlier measurement points. D f For the first f Weighted distance deviation of anomaly measurement points; mean of robust function weighted normal distance of all positive measurement points. The calculation is shown in formula (6): Official (6) in, and These represent the total number of controllable abnormal measuring points and the total number of completely abnormal measuring points, respectively. For the first Robust function weights for controllable anomaly measurement points For the first Robust function weights for completely anomalous test points For the first The point-to-normal distance corresponding to each controllable anomaly measurement point For the first The normal distance between point pairs corresponding to each completely anomalous measurement point is obtained from the robust weight function established in step 5. , and Substituting into formula (6), we get formula (7): Official (7).

5. The robust function-weighted minimization matching algorithm for visual measurement of complex components according to claim 4, characterized in that, Step 6 specifically includes the following steps: Step 6.1: Simplify the sum of squared weighted normal distance deviations of the robust function at the forward measuring points, as shown in formula (10): Official (10) In the above formula, It is a 6×6 matrix. It is a 6×1 matrix. It is a scalar; Step 6.2: Simplify the weighted normal distance deviation sum of the robust function of the negative measurement points in the same way, as shown in formula (11): Official (11) in, It is a 6×6 matrix. It is a 6×1 matrix. It is a scalar; Step 6.3: According to the objective function shown in formula (4) Use the objective function to transform the vector Differentiate and solve, as in formula (12): Official (12) In the above formula, , , , , , Both are 1×6 matrices. Mean distance between all positive measurement points It is the first step without single-step conversion. k The distance between points of a positive measuring point; Mean distance between all negative measurement points It is the first step without single-step conversion. s The point-to-point distance of each negative measuring point; Robust function weighted negative average vector Robust function weighted positive average vector; Therefore, the rotation matrix and translation matrix are obtained as shown in formula (13): Official (13) e The base is the natural number. t It is a translation vector. Rotation vector The antisymmetric matrix; Step 6.4, R and T It operates on the source point cloud and updates the position of the source point cloud.

6. The robust function-weighted minimization matching algorithm for visual measurement of complex components according to claim 5, characterized in that, In step 7, the error evaluation function As in formula (14): Official (14) In formula (14), This indicates that the distance between the midpoint pairs of the registered measurement points is less than the average distance between the midpoint pairs. The measuring points, This indicates the nearest point found from the source point cloud Q.

Citation Information

Patent Citations

  • Distance variance minimization-based workpiece point cloud matching algorithm

    CN104867136A

  • Workpiece optical measurement method based on weighted positive and negative margin variance minimization algorithm

    CN113029049B

  • High-precision point cloud map creation system and method in complex urban environment

    CN112362072A

  • Workpiece point cloud fine registration method based on pseudo-removing weighted variance minimization algorithm

    CN115994931A