Point-by-point weighted normal iterative closest point fine registration method, device, equipment and medium
Patent Information
- Application Number
- CN202410369334.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-03-28
AI Technical Summary
专利ZL202110776115X公开的方法虽然利用了条纹投影相位精度特征量,对不同点对添加不同权重,但对应关系查找仅使用欧氏距离作为筛选条件,并且优化目标为最小化对应点对的欧氏距离,精度有待进一步提高
[0043]本发明采用条纹投影测量过程中得到的相位精度表征信息提高对应点对筛选准确率并且优化损失函数来进行点云配准。所述方法主要包括:在条纹投影测量过程中,得到相位精度表征信息,充分利用相位精度表征信息,以包括点对欧氏距离、法向量夹角、曲率对数差值和相位精度表征信息四个条件进行对应点对的筛选,提高点对筛选的正确率。根据相位精度表征信息为每一对对应点对赋予不同权重值,并且以对应点对的欧氏距离和法向量夹角两个优化变量构建损失函数,对损失函数求解得到最优配准变换矩阵。本发明所公开方法采用相位精度表征信息提高高精度点对的配准权重,有助于提升配准精度,通过多条件筛选提高两片点云对应点对查找准确率,并且以欧氏距离和法向量夹角两个指标作为优化变量,有助于提高点云配准精度和效率。
Smart Images

Figure CN118279357B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision technology, specifically relating to a point-by-point weighted normal iterative nearest point fine registration method, apparatus, device, and medium. Background Technology
[0002] In recent years, with the rapid development of 3D scanning technology, various 3D point cloud data acquisition devices have emerged. However, due to the limited field of view of 3D scanners, a single scan can only acquire partial point cloud information of an object's surface. To obtain the global topography information of the object being measured, multi-view measurements are required, ultimately achieved through point cloud registration.
[0003] Point cloud registration has a wide range of applications, covering multiple aspects such as 3D reconstruction, target recognition, and pose estimation. Scholars both domestically and internationally have conducted a series of studies on point cloud registration technology. Besl et al., in their paper "A method for registration of 3-D shapes," proposed the Iterative Closest Point (ICP) algorithm, which estimates the transformation matrix by iteratively searching for corresponding points and minimizing the overall distance between point pairs. Chen et al., in their paper "Object modelling by registration of multiple range image," extended point-to-point to point-to-surface, obtaining a tangent plane by calculating the normal, and constructing a registration loss function based on the distance from the point to the tangent plane, thus improving the adaptability to point cloud noise during the registration process. Yang et al., in their paper "Solving 3D registration efficiently and globally optimally," combined the local ICP algorithm with global branch and bound, proposing the globally optimized GO-ICP algorithm. This algorithm uses an octree data structure to subdivide the initial space into smaller subspaces, uses branch and bound to remove undesirable spaces, and continues to subdivide spaces that meet the conditions, thereby finding the globally optimal transformation. Patent ZL202110776115.X discloses a fine registration method based on point-by-point weighting of fringe projection phase accuracy feature quantity. The method adds different weights to each point pair by using the phase accuracy feature quantity obtained during the fringe projection measurement process, so as to improve the registration weight of high-precision point pairs.
[0004] The methods described above each have their own advantages in point cloud registration, but they also have some shortcomings. The method proposed by Besl et al. is non-convex, making it prone to getting trapped in local minima, and its registration accuracy is low because the loss function only minimizes the distance between corresponding point pairs. The point-to-surface ICP algorithm proposed by Chen et al. improves accuracy, but it only filters corresponding point pairs based on Euclidean distance, resulting in poor accuracy, and the equal weighting of all point pairs means that the impact on high-precision point pair registration is insufficient. The GO-ICP algorithm proposed by Yang et al., although solving the local minima problem, is still very sensitive to initialization and has low efficiency. The method disclosed in patent ZL202110776115X utilizes the fringe projection phase accuracy feature and adds different weights to different point pairs, but the correspondence lookup only uses Euclidean distance as the filtering condition, and the optimization objective is to minimize the Euclidean distance between corresponding point pairs, so its accuracy needs further improvement. Summary of the Invention
[0005] To address the shortcomings of the aforementioned point cloud fine registration methods, this invention designs a method, apparatus, device, and medium that can effectively utilize the phase accuracy characterization information obtained from fringe projection measurement and perform robust and high-precision point cloud fine registration.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A point-by-point weighted normal iterative nearest point registration method includes the following steps:
[0008] Step 1: Calculate the phase accuracy characterization information based on the original data of the fringe projection measurement, and add the phase accuracy characterization information to each point in the two point clouds to be registered;
[0009] Step 2: Based on the phase accuracy characterization information of each point obtained in Step 1, calculate the weight value of each point in the two point clouds to be registered;
[0010] Step 3: Select the corresponding point pairs based on the Euclidean distance between the two point cloud pairs to be registered, the angle between the normal vectors of the point pairs, the difference in the logarithm of curvature between the point pairs, and the phase accuracy characterization information of each point pair obtained in Step 1.
[0011] Step 4: Construct a loss function with Euclidean distance and the angle between normal vectors as optimization objectives, and add weights to each point pair according to the weight values of each point obtained in Step 2. Substitute the corresponding point pairs obtained in Step 3 into the loss function to solve for the optimal spatial transformation matrix of the source point cloud, and multiply the optimal spatial transformation matrix of the source point cloud by the point cloud data in the source point cloud to update the spatial position of the source point cloud.
[0012] Step 5: Calculate the loss function after updating the spatial position of the source point cloud, obtain the error, and determine whether the error meets the convergence condition. If it does not meet the convergence condition, return to step 3; if it does meet the condition, end the loop and execute step 6.
[0013] Step 6: Multiply the spatial transformation matrices obtained in each iteration to obtain the final spatial transformation matrix. Apply this final spatial transformation matrix to the source point cloud to achieve the optimal spatial position for registration.
[0014] Furthermore, in step 1, the phase accuracy characterization information is a parameter or any combination of the parameters that can characterize the phase accuracy of the fringe pattern.
[0015] Furthermore, the phase accuracy characterization information in step 1 is one or any combination of several of the following: fringe pattern modulation, background term, phase gradient, point cloud density, and phase error.
[0016] Furthermore, in step 2, the method for calculating the weight value of each point in the two point clouds to be registered is as follows: when the phase accuracy representation information value is inversely correlated with the phase accuracy, the weight value of each point in the two point clouds to be registered is inversely correlated with the phase accuracy representation information value; when the phase accuracy representation information value is positively correlated with the phase accuracy, the weight value of each point in the two point clouds to be registered is positively correlated with the phase accuracy representation information value.
[0017] Furthermore, in step 3, point pairs are filtered based on the following four conditions:
[0018] ① The Euclidean distance between corresponding point pairs is less than the Euclidean distance threshold;
[0019] ||p s -p t ||<∈ d
[0020] ② The cosine of the angle between the corresponding point and the normal vector is greater than the threshold value of the cosine of the angle between the normal vectors;
[0021] n t ·n s >∈ n
[0022] ③ The logarithmic difference of curvature for corresponding point pairs is less than the threshold value for logarithmic difference of curvature;
[0023] |logσ s -logσ t |<∈ σ
[0024] ④ The phase accuracy representation information value of the corresponding point pair meets the phase accuracy representation information value threshold;
[0025] When the information content of phase accuracy is positively correlated with phase accuracy: b t >∈ b1 And b s >∈ b1
[0026] When the information content of phase accuracy is inversely correlated with phase accuracy: b t <∈ b2 And b s <∈ b2
[0027] Among them, p in condition ① s p represents the coordinates of a point in the source point cloud. t Let be the coordinates of a point in the target point cloud, ∈ d The Euclidean distance threshold is determined based on actual measurement requirements; in condition ②, n s Let n be the normal vector of the source point cloud. t Let be the normal vector of the target point cloud point, ∈ n The threshold value is the cosine of the angle between the normal vectors, determined according to actual measurement requirements; in condition ③, logσ s Let logσ be the logarithm of the curvature of the source point cloud. t Let the logarithm of the curvature of the target point cloud be ∈ σ The threshold for the logarithmic difference of curvature is determined based on actual measurement requirements; in condition ④, b s b is the phase accuracy characterization value of the source point cloud. t The phase accuracy representation value of the target point cloud points, ∈ b1 ,∈ b2 The threshold value for the phase accuracy characterization information is determined based on the actual measurement requirements.
[0028] Furthermore, the loss function constructed in step 4 is as follows:
[0029]
[0030]
[0031] Among them, E k ω is the error constant of the k-th iteration. i1,j1 It is the registration weight of the point pair, which is the weight ω of the corresponding two points. i1 ω j1 The algebraic combination of M and T, where M represents the number of corresponding point pairs in the source and target point clouds, and T represents the number of corresponding point pairs in the source and target point clouds. k is the spatial transformation matrix of the kth iteration, and is the quantity to be determined; It is a six-dimensional vector containing the three-dimensional coordinates and normal vector of the target point cloud. It is a six-dimensional vector containing the three-dimensional coordinates p of the source point cloud and the normal vector n. T represents k and The operator, R is T k The rotation matrix of T, where t is the rotation matrix of T. k The translation vector.
[0032] Furthermore, in step 5, the optimal transformation matrix obtained in step 4 is substituted into the loss function to obtain the error constant E. k If the error constant E k Greater than the convergence threshold ∈ e If the condition is met, return to step 3; otherwise, end the loop.
[0033] A point-by-point weighted normal iterative nearest point registration device includes:
[0034] Phase accuracy characterization information acquisition module: used to calculate phase accuracy characterization information based on the raw data of fringe projection measurement, and add the phase accuracy characterization information to each point in the two point clouds to be registered;
[0035] Weight calculation module: used to calculate the weight value of each point in the two point clouds to be registered based on the phase accuracy characterization information of each point in step 1;
[0036] Pairing module: Used to filter corresponding point pairs based on the Euclidean distance between the two point cloud point pairs to be registered, the angle between the normal vectors of the point pairs, the difference in the logarithm of curvature between the point pairs, and the phase accuracy characterization information of each point pair;
[0037] Point cloud spatial position update module: Construct a loss function with Euclidean distance and the angle between normal vectors as optimization objectives, add weights to each point pair according to the weight value of each point, substitute the corresponding point pair into the loss function to solve the optimal spatial transformation matrix of the point cloud, and multiply the transformation matrix by the point cloud data to update the point cloud spatial position;
[0038] Judgment module: This module calculates the error by using the loss function after updating the spatial position of the point cloud, and determines whether the error meets the convergence condition. If it does not meet the convergence condition, it continues to filter the corresponding point pairs; if it does meet the condition, it ends the loop.
[0039] The registration module is used to multiply the spatial transformation matrices obtained in each loop to obtain the final spatial transformation matrix, and use the source point cloud of the final spatial transformation matrix to achieve the optimal spatial position for registration.
[0040] An electronic device includes an electrically connected memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor, when executing the computer program, implements the steps of the method described above.
[0041] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described above.
[0042] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0043] This invention utilizes phase accuracy characterization information obtained during fringe projection measurement to improve the accuracy of corresponding point pair selection and optimizes the loss function for point cloud registration. The method mainly includes: obtaining phase accuracy characterization information during fringe projection measurement; fully utilizing this information to select corresponding point pairs based on four conditions: Euclidean distance between point pairs, angle between normal vectors, logarithmic difference of curvature, and phase accuracy characterization information, thereby improving the accuracy of point pair selection; assigning different weight values to each corresponding point pair based on the phase accuracy characterization information; and constructing a loss function using the Euclidean distance and angle between normal vectors as two optimization variables; and solving the loss function to obtain the optimal registration transformation matrix. The method disclosed in this invention uses phase accuracy characterization information to increase the registration weight of high-precision point pairs, which helps improve registration accuracy. It improves the accuracy of finding corresponding point pairs between two point clouds through multi-condition selection, and uses Euclidean distance and angle between normal vectors as optimization variables, which helps improve the accuracy and efficiency of point cloud registration. Attached Figure Description
[0044] Figure 1 For precise registration flowchart;
[0045] Figure 2 The modulation diagram of the Shenzhou-14 model under test;
[0046] Figure 3 Point cloud of the Shenzhou-14 model with modulation values;
[0047] Figure 4 The search results are for corresponding point pairs;
[0048] Figure 5 Point cloud data for two Shenzhou-14 models that are yet to be precisely registered;
[0049] Figure 6 The result of fine registration of two point cloud images;
[0050] Figure 7 This is a schematic diagram of a point-by-point weighted normal iterative nearest-point registration device;
[0051] Figure 8 This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation
[0052] To make the objectives and technical solutions of this invention clearer and easier to understand, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0053] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more. In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0054] Example 1
[0055] Reference Figure 1 A point-by-point weighted normal ICP fine registration method includes the following steps:
[0056] Step 1: Using fringe projection profilometry, the Shenzhou-14 model is measured from multiple perspectives to obtain raw fringe projection measurement data. This raw data includes multiple sets of point clouds and sampled fringe patterns. Phase accuracy characterization values are calculated based on the raw fringe projection measurement data. The phase accuracy characterization information is added to each point in the two point clouds to be registered, denoted as the source point cloud and the target point cloud. The phase accuracy characterization information can be any parameter that can characterize the phase accuracy of the fringe pattern demodulation, such as the fringe pattern modulation value, background term, phase gradient, point cloud density, and phase error, or any combination thereof.
[0057] Without loss of generality, this example uses modulation density as a characterization of phase accuracy, such as Figure 2 The diagram shows the modulation index of the tested Shenzhou-14 model. The modulation index value is calculated using the following formula:
[0058]
[0059] In the formula, b(x,y) represents the modulation value of point (x,y) in the sampled fringe pattern, and f i(x,y) represents the phase-shifted fringe pattern obtained at the i-th step of sampling, where x,y represent pixel coordinates, and δ i The phase of point (x,y) is represented by N, and the number of sampled stripes is represented by N.
[0060] The final point cloud data obtained in this step is a data structure format containing the three-dimensional coordinates of the points and modulation values. One of the resulting point cloud datasets is shown below. Figure 3 As shown.
[0061] Step 2: Calculate the weight value of each point in the point cloud based on the obtained point cloud data with modulation information.
[0062] The weight value is calculated based on the amount of phase precision information represented at each point. Specifically, when the amount of phase precision information is inversely correlated with the phase precision, the weight value ω... i1 The magnitude should be inversely correlated with the value of phase accuracy information; when the value of phase accuracy information is positively correlated with phase accuracy, the weight value ω i1 The magnitude should be positively correlated with the amount of information represented by the phase accuracy.
[0063] The strategy for calculating the weight value of each point is as follows:
[0064]
[0065] Where, ω i1 b is the weight value of the i1th point. i1 It is the modulation value at the i1th point, b max It is the value with the largest phase accuracy representation among all points.
[0066] In addition, there are methods that assign weights to intervals, but these are not as effective as the strategies described above in distinguishing each point and are more conducive to the fine registration process.
[0067] Step 3: Select the correct matching point pairs based on the Euclidean distance between the two point cloud pairs to be registered, the angle between the normal vectors of the point pairs, the logarithmic difference in curvature between the point pairs, and the toning value of each point pair. Correct matching point pairs should be selected based on at least the following four conditions:
[0068] ① The Euclidean distance between corresponding point pairs is less than the Euclidean distance threshold;
[0069] ||p s -p t ||<∈ d
[0070] ② The cosine of the angle between the corresponding point and the normal vector is greater than the threshold value of the cosine of the angle between the normal vectors;
[0071] n t ·n s >∈n
[0072] ③ The logarithmic difference of curvature for corresponding point pairs is less than the threshold value for logarithmic difference of curvature;
[0073] |logσ s -logσ t |<∈ σ
[0074] ④ The relationship between the phase accuracy representation information value and the phase accuracy representation information value threshold of corresponding point pairs must meet the following requirements:
[0075] When the information content of phase accuracy is positively correlated with phase accuracy: b t >∈ b1 And b s >∈ b1
[0076] When the information content of phase accuracy is inversely correlated with phase accuracy: b t <∈ b2 And b s <∈ b2
[0077] When modulation index is used as the phase accuracy characterization information, condition ④ is that the modulation index value of the corresponding point pair is greater than the modulation index threshold:
[0078] b t >∈ b And b s >∈ b
[0079] Among them, condition ①p s p represents the coordinates of a point in the source point cloud. t Let be the coordinates of a point in the target point cloud, ∈ d The Euclidean distance threshold is determined based on actual measurement requirements; in condition ②, n s Let n be the normal vector of the source point cloud. t Let be the normal vector of the target point cloud point, ∈ n The threshold value is the cosine of the angle between the normal vectors, determined according to actual measurement requirements; in condition ③, logσ s Let logσ be the logarithm of the curvature of the source point cloud. t Let the logarithm of the curvature of the target point cloud be ∈ σ The threshold for the logarithmic difference of curvature is determined based on actual measurement requirements; in condition ④, b s b is the modulation value of the source point cloud. t The modulation value of the target point cloud point, ∈ b To adjust the threshold of the system.
[0080] like Figure 4The results shown are the corresponding point pairs determined based on the above search criteria.
[0081] Step 4: Construct a loss function with Euclidean distance and the angle between normal vectors as optimization objectives. Add weights to each point pair based on the point weights calculated using phase accuracy. Substitute the selected correct corresponding point pairs into the loss function to solve for the optimal spatial transformation matrix of the point cloud. The loss function is as follows:
[0082]
[0083] Among them, operators express:
[0084]
[0085] Among them, E k Let R be the error consisting of the Euclidean distance between point pairs and the angle between their normal vectors, where R is the rotation matrix, p is the point coordinates, t is the translation vector, n is the normal vector, M is the total number of corresponding point pairs, and ω is the normal vector. i1,j1 It is the weight of the point pair consisting of the i1th point and the j1th point, and is the weight ω of the corresponding two points. i1 ω j1 The algebraic combination of the corresponding points (in this example, the minimum weight value between the two points is taken), T k It is the spatial transformation matrix, and it is the quantity to be determined. It is a six-dimensional vector containing the three-dimensional coordinates and normal vector of the target point cloud. It is a six-dimensional vector containing the three-dimensional coordinates p of the source point cloud and the normal vector n. T represents k and The operators (operation rules are shown in the above formula), R is T k The rotation matrix of T, where t is the rotation matrix of T. k The translation vector.
[0086] The loss function is solved using the Gauss-Newton method, which yields the optimal transformation matrix T for registering the source point cloud to the target point cloud. i3 .
[0087] Step 5: Apply the optimal transformation matrix T obtained in Step 4 k Substituting the values into the constructed loss function, and aiming to minimize the loss function value, the error constant E is calculated. k If E k Greater than the convergence threshold ∈ e Then return to step 3; if E k Less than or equal to ∈ e Then the loop ends, and step 6 is executed.
[0088] Step 6: Convert the spatial transformation matrix T obtained in each iteration. kMultiplying these matrices yields the final spatial transformation matrix T for the fine registration process. Simultaneously, the source point cloud of the transformation matrix is applied to achieve the optimal spatial location for registration.
[0089] like Figure 5 The image shows the relative positions of two single-view point cloud images of the Shenzhou-14 model before fine registration. Figure 6 This is the result of precise registration of two point clouds using this method. The above content is merely illustrative of the technical concept of this invention and should not be construed as limiting the scope of protection of this invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
[0090] Example 2
[0091] The difference between this embodiment and Embodiment 1 lies in the different phase accuracy representation information used in step 1, and the different conditions that the phase accuracy representation information of the corresponding point pairs must meet in step 3, as detailed below:
[0092] In step 1, the fringe pattern background term is used as the phase accuracy characterization information. The calculation formula for the fringe pattern background term (positively correlated with accuracy) is as follows:
[0093]
[0094] In the formula, a(x,y) represents the background term of the sampled stripe pattern, and f i (x,y) represents the i-th sampled stripe pattern obtained from sampling, where x,y represent pixel coordinates.
[0095] In step 3, the fringe pattern background term is used as the phase accuracy representation information, and condition ④ is: the background term value of the corresponding point pair is greater than the background term threshold: a t >∈ a And a s >∈ a ; where a s a is the background value of the source point cloud. t For the background value of the target point cloud point, ∈ a This is the threshold for the background item.
[0096] Example 3
[0097] The difference between this embodiment and Embodiment 1 lies in the different phase accuracy representation information used in step 1, and the different conditions that the phase accuracy representation information of the corresponding point pairs must meet in step 3, as detailed below:
[0098] In step 1, the phase gradient is used as the characterization information for phase accuracy. The formula for calculating the phase gradient (which is inversely correlated with accuracy) is as follows:
[0099] D(x,y)=max{d x(x,y),d y (x,y)}
[0100] In the image, D(x,y) represents the phase gradient of the point (x,y) in the image.
[0101] In the formula, W[*] represents adding or subtracting an integer multiple of 2π to make its value fall within the range of [-π,π]. This indicates the demodulation phase.
[0102] In step 3, the phase gradient is used as the phase accuracy characterization information, and condition ④ is: the phase gradient of the corresponding point pair is less than the phase gradient threshold: D t <∈ D And D s <∈ D ; where D s D represents the phase gradient value of the source point cloud. t For the phase gradient value of the target point cloud, ∈ D This is the phase gradient threshold.
[0103] Example 4
[0104] The difference between this embodiment and Embodiment 1 lies in the different phase accuracy representation information used in step 1, and the different conditions that the phase accuracy representation information of the corresponding point pairs must meet in step 3, as detailed below:
[0105] In step 1, point cloud density is used as the phase accuracy characterization information. The formula for calculating point cloud density (which is positively correlated with accuracy) is:
[0106]
[0107] In the formula, ρ represents the point cloud density, N is the number of neighboring points of the query point, and R is the neighborhood radius.
[0108] In step 3, point cloud density is used as the phase accuracy characterization information, and condition ④ is: the point cloud density of the corresponding point pair is greater than the point cloud density threshold: ρ t >∈ ρ And ρ s >∈ ρ ; where ρ s ρ represents the density value of the source point cloud. t For the density values of the target point cloud points, ∈ ρ The density threshold is determined based on actual measurement requirements.
[0109] Example 5
[0110] The difference between this embodiment and Embodiment 1 lies in the different phase accuracy representation information used in step 1, and the different conditions that the phase accuracy representation information of the corresponding point pairs must meet in step 3, as detailed below:
[0111] In step 1, phase error is used as the characterization information for phase accuracy. The formula for calculating phase error (which is inversely correlated with accuracy) is as follows:
[0112] Φ e (x,y)=Φ(x,y)-Φ p (x,y)
[0113] In the formula, Φ e (x,y) represents the phase error, and Φ(x,y) is the true phase value at point (x,y). p (x, y) is a point (x, y) The ideal phase value.
[0114] In step 3, phase error is used as the characterization information for phase accuracy, and condition ④ is: the phase error of the corresponding point pair is less than the phase error threshold: Φ t <∈ Φ And Φ s <∈ Φ ; where Φ s Φ is the phase error value of the source point cloud. t The phase error value of the target point cloud points, ∈ Φ This is the phase error threshold.
[0115] Example 6
[0116] A point-by-point weighted normal iterative nearest point registration device includes:
[0117] Phase accuracy characterization information acquisition module: used to calculate phase accuracy characterization information based on the raw data of fringe projection measurement, and add the phase accuracy characterization information to each point in the two point clouds to be registered;
[0118] Weight calculation module: used to calculate the weight value of each point in the two point clouds to be registered based on the phase accuracy characterization information of each point in step 1;
[0119] Pairing module: Used to filter corresponding point pairs based on the Euclidean distance between the two point cloud point pairs to be registered, the angle between the normal vectors of the point pairs, the difference in the logarithm of curvature between the point pairs, and the phase accuracy characterization information of each point pair;
[0120] Point cloud spatial position update module: Construct a loss function with Euclidean distance and the angle between normal vectors as optimization objectives, add weights to each point pair according to the weight value of each point, substitute the corresponding point pair into the loss function to solve the optimal spatial transformation matrix of the point cloud, and multiply the transformation matrix by the point cloud data to update the point cloud spatial position;
[0121] Judgment module: This module calculates the error by using the loss function after updating the spatial position of the point cloud, and determines whether the error meets the convergence condition. If it does not meet the convergence condition, it continues to filter the corresponding point pairs; if it does meet the condition, it ends the loop.
[0122] The registration module is used to multiply the spatial transformation matrices obtained in each loop to obtain the final spatial transformation matrix, and use the source point cloud of the final spatial transformation matrix to achieve the optimal spatial position for registration.
[0123] Example 7
[0124] Reference Figure 7 As shown, this invention provides an electronic device comprising: a processor 11, a memory 12, and a bus 13. The memory 12 stores computer execution instructions, and the processor 11 is connected to the memory 12 via the bus 13. When the electronic device is running, the processor 11 executes the computer execution instructions stored in the memory 12, so that the processor 11 runs a program corresponding to the computer execution instructions by reading the computer execution instructions stored in the memory 12, for executing the point-by-point weighted normal iterative nearest point registration method proposed in Embodiment 1 of this invention. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0125] To implement the above embodiments, the present invention also proposes a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute a point-by-point weighted normal iterative nearest point fine registration method proposed in Embodiment 1 of the present invention.
[0126] Example 8
[0127] To implement the above embodiments, the present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements a point-by-point weighted normal iterative nearest point registration method proposed in Embodiment 1 of the present invention.
[0128] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0129] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0130] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0131] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0132] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0133] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0134] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0135] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A point-by-point weighted normal iterative nearest point registration method, characterized in that, Includes the following steps: Step 1: Calculate the phase accuracy characterization information based on the original data of the fringe projection measurement, and add the phase accuracy characterization information to each point in the two point clouds to be registered; Step 2: Based on the phase accuracy characterization information of each point obtained in Step 1, calculate the weight value of each point in the two point clouds to be registered; In step 2, the method for calculating the weight value of each point in the two point clouds to be registered is as follows: when the phase accuracy representation information value is inversely correlated with the phase accuracy, the weight value of each point in the two point clouds to be registered is inversely correlated with the phase accuracy representation information value; when the phase accuracy representation information value is positively correlated with the phase accuracy, the weight value of each point in the two point clouds to be registered is positively correlated with the phase accuracy representation information value. Step 3: Select the corresponding point pairs based on the Euclidean distance between the two point cloud pairs to be registered, the angle between the normal vectors of the point pairs, the difference in the logarithm of curvature between the point pairs, and the phase accuracy characterization information of each point pair obtained in Step 1. In step 3, point pairs are filtered based on the following four conditions: ① The Euclidean distance between corresponding point pairs is less than the Euclidean distance threshold; ② The cosine of the angle between the corresponding point and the normal vector is greater than the threshold value of the cosine of the angle between the normal vectors; ③ The logarithmic difference of curvature for corresponding point pairs is less than the threshold value for logarithmic difference of curvature; ④ The phase accuracy representation information value of the corresponding point pair meets the phase accuracy representation information value threshold; When the information content representing phase accuracy is positively correlated with phase accuracy: and When the information content representing phase accuracy is inversely correlated with phase accuracy: and Among them, in condition ① The coordinates of the points in the source point cloud. Given the coordinates of a point in the target point cloud, The Euclidean distance threshold is determined based on actual measurement requirements; in condition ② Let be the normal vector of the source point cloud. Let the normal vector of the target point cloud be . The threshold value is the cosine of the angle between the normal vectors, determined according to actual measurement requirements; in condition ③ Let the logarithm of the curvature of the source point cloud be . Let the logarithm of the curvature of the target point cloud be . The threshold for the logarithmic difference of curvature is determined based on actual measurement requirements; in condition ④ This represents the phase accuracy characterization value of the source point cloud. This represents the phase accuracy characterization value of the target point cloud. , The threshold value for characterizing phase accuracy information is determined based on actual measurement requirements. Step 4: Construct a loss function with Euclidean distance and the angle between normal vectors as optimization objectives, and add weights to each point pair according to the weight values of each point obtained in Step 2. Substitute the corresponding point pairs obtained in Step 3 into the loss function to solve for the optimal spatial transformation matrix of the source point cloud, and multiply the optimal spatial transformation matrix of the source point cloud by the point cloud data in the source point cloud to update the spatial position of the source point cloud. Step 5: Calculate the loss function after updating the spatial position of the source point cloud, obtain the error, and determine whether the error meets the convergence condition. If it does not meet the convergence condition, return to step 3; if it does meet the condition, end the loop and execute step 6. Step 6: Multiply the spatial transformation matrices obtained in each iteration to obtain the final spatial transformation matrix. Apply this final spatial transformation matrix to the source point cloud to achieve the optimal spatial position for registration.
2. The point-by-point weighted normal iterative nearest point fine registration method according to claim 1, characterized in that, In step 1, the phase accuracy characterization information is a parameter or any combination of the parameters that can characterize the phase accuracy of the fringe pattern.
3. The point-by-point weighted normal iterative nearest point fine registration method according to claim 1 or 2, characterized in that, The phase accuracy characterization information in step 1 is one or any combination of fringe pattern modulation, background term, phase gradient, point cloud density, and phase error.
4. The point-by-point weighted normal iterative nearest point fine registration method according to claim 1, characterized in that, The loss function constructed in step 4 is as follows: in, E k It is the error constant of the k-th iteration. These are the registration weights for point pairs, representing the weights of the corresponding two points. The algebraic combination of M, where M represents the number of corresponding point pairs in the source and target point clouds. is the spatial transformation matrix of the kth iteration, and is the quantity to be determined; It is a six-dimensional vector containing the three-dimensional coordinates and normal vector of the target point cloud. It includes the three-dimensional coordinates of the source point cloud. and normal vector A six-dimensional vector, express and operators, yes The rotation matrix, yes The translation vector.
5. The point-by-point weighted normal iterative nearest point fine registration method according to claim 1, characterized in that, In step 5, the optimal transformation matrix obtained in step 4 is substituted into the loss function to calculate the error constant. E k If the error constant E k Greater than the convergence threshold Then return to step 3; Then the loop ends.
6. A point-by-point weighted normal iterative nearest point registration device, used to implement the method of claim 1, characterized in that, include: Phase accuracy characterization information acquisition module: used to calculate phase accuracy characterization information based on the raw data of fringe projection measurement, and add the phase accuracy characterization information to each point in the two point clouds to be registered; Weight calculation module: used to calculate the weight value of each point in the two point clouds to be registered based on the phase accuracy characterization information of each point in step 1; Pairing module: Used to filter corresponding point pairs based on the Euclidean distance between the two point cloud point pairs to be registered, the angle between the normal vectors of the point pairs, the difference in the logarithm of curvature between the point pairs, and the phase accuracy characterization information of each point pair; Point cloud spatial position update module: Construct a loss function with Euclidean distance and the angle between normal vectors as optimization objectives, add weights to each point pair according to the weight value of each point, substitute the corresponding point pair into the loss function to solve the optimal spatial transformation matrix of the point cloud, and multiply the transformation matrix by the point cloud data to update the point cloud spatial position; Judgment module: It is used to calculate the error after updating the spatial position of the point cloud and determine whether the error meets the convergence condition. If it does not meet the convergence condition, it continues to filter the corresponding point pairs. If the condition is met, the loop ends. The registration module is used to multiply the spatial transformation matrices obtained in each loop to obtain the final spatial transformation matrix, and use the source point cloud of the final spatial transformation matrix to achieve the optimal spatial position for registration.
7. An electronic device, characterized in that, The method includes an electrically connected memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the processor executes the computer program, it implements the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Fringe projection measurement point cloud point-by-point weighted registration method, equipment and medium
CN113409367A
Reflective-complex-curved-surface measurement method based on combination of surface structure light and conoscopic polarization holography
CN103471520A
Computer-generated hologram coding method for high-precision detection based on non-maximum suppression
CN107705338A