Point cloud registration method for accurate measurement of sanitary appliance pose

Through multi-view scanning and point cloud feature extraction, combined with point cloud pyramid construction and error evaluation, the problem of low accuracy and efficiency of sanitary pose measurement in traditional methods is solved, and high-precision and efficient sanitary pose measurement is achieved.

CN119107346AInactive Publication Date: 2024-12-10江门市和牌卫浴科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411220634.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional point cloud registration method used for precise measurement of sanitary ware postures has problems of low assembly accuracy and low computing efficiency, especially when the sanitary ware surface is smooth and lacks texture, it is difficult to meet the assembly accuracy and real-time requirements.

Method used

Multi-view scanning and surface point cloud generation are used to extract key point feature descriptors of local geometric features through key point domain search and feature analysis, and feature point pair matching and point cloud pyramid construction, gradually improve registration accuracy, and use point cloud Distance calculation and error evaluation generate error reports.

Benefits of technology

It improves the accuracy and efficiency of sanitary ware posture measurement, is suitable for assembly scenarios with high real-time requirements, and improves the accuracy and efficiency of sanitary ware assembly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107346A_ABST
    Figure CN119107346A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of point cloud registration, in particular to a point cloud registration method for accurate measurement of sanitary appliance poses. The method comprises the following steps: carrying out scanning data acquisition on the sanitary appliance by utilizing a three-dimensional scanner to obtain multi-view original scanning data; performing surface point cloud generation according to the multi-view original scanning data to obtain sanitary appliance surface point cloud data; key point field searching is carried out on the sanitary appliance surface point cloud data to obtain a key point field set; performing key point feature analysis according to the key point field set to obtain a key point feature descriptor; performing feature point pair matching according to the key point feature descriptors to obtain preliminarily screened feature point pair data; and performing transformation matrix estimation on the data according to the preliminarily screened feature points to obtain transformation matrix data. According to the method, the local geometric features of the sanitary appliance surface are effectively extracted, the calculation complexity is effectively reduced, the method is more suitable for the assembly scene with the high real-time requirement, and then the sanitary appliance assembly precision and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of point cloud registration, and in particular to a point cloud registration method for accurate measurement of sanitary ware posture. Background Art

[0002] The accurate measurement of sanitary ware posture plays an increasingly important role in modern manufacturing, especially in the sanitary ware assembly process, where accurate posture information is crucial to ensure assembly quality and efficiency. Traditional sanitary ware posture measurement mainly relies on contact measurement or simple visual measurement. Contact measurement uses a probe or other equipment to directly contact the surface of the sanitary ware for measurement, while visual measurement obtains position information through two-dimensional images.

[0003] The traditional point cloud registration method used for accurate measurement of sanitary ware pose has the disadvantages of low assembly accuracy and low computational efficiency. The surface of sanitary ware is usually smooth, lacks texture, and has a simple shape. The commonly used feature-based point cloud registration method is difficult to extract effective features, resulting in low registration accuracy and difficulty in meeting assembly accuracy requirements. The amount of point cloud data is large, the registration algorithm is highly complex, and the existing methods have low computational efficiency and are difficult to meet assembly scenarios with high real-time requirements. Summary of the invention

[0004] Based on this, it is necessary to provide a point cloud registration method for accurate measurement of sanitary ware posture to solve at least one of the above technical problems.

[0005] To achieve the above purpose, a point cloud registration method for accurate measurement of sanitary ware posture includes the following steps:

[0006] Step S1: using a 3D scanner to collect data of the sanitary ware and obtain multi-view original scanning data; generating a surface point cloud according to the multi-view original scanning data and obtaining the surface point cloud data of the sanitary ware;

[0007] Step S2: performing a key point domain search on the sanitary ware surface point cloud data to obtain a key point domain set; performing a key point feature analysis based on the key point domain set to obtain a key point feature descriptor;

[0008] Step S3: matching feature point pairs according to key point feature descriptors to obtain preliminary screened feature point pair data; estimating transformation matrix according to preliminary screened feature point pair data to obtain transformation matrix data; performing point cloud rough matching using transformation matrix data and sanitary ware surface point cloud data to obtain rough registration point cloud data;

[0009] Step S4: constructing a point cloud pyramid for the coarse registration point cloud data and initializing the transformation matrix to obtain a point cloud pyramid and an initialized transformation matrix; optimizing the transformation matrix according to the initialized transformation matrix and the point cloud pyramid and updating the fine registration point cloud to obtain a transformation optimization matrix and fine registration point cloud data;

[0010] Step S5: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data; performing Euler angle conversion on the matrix rotation data to obtain Euler angle data; performing posture analysis based on the Euler angle data and the matrix translation data to obtain posture information data;

[0011] Step S6: perform point cloud distance calculation based on the posture information data and the precisely aligned point cloud data to obtain average distance data and maximum distance value; perform error evaluation analysis based on the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the sanitary ware posture.

[0012] The present invention can obtain complete surface point cloud data of sanitary ware through multi-view scanning and surface point cloud generation, provide data basis for subsequent feature extraction and registration, effectively reduce data processing volume and improve efficiency. Through key point field search and feature analysis, key point feature descriptors describing local geometric features of the surface of sanitary ware can be extracted, and these descriptors are robust to rotation, translation and noise, and can improve the accuracy and stability of subsequent registration. Through feature point pair matching and transformation matrix estimation, the corresponding relationship between two point cloud data can be preliminarily determined, and a rough transformation matrix can be obtained to provide a good initial position for precise registration. Through point cloud pyramid construction and multi-level transformation matrix optimization, a coarse-to-fine registration strategy can be implemented, the registration accuracy can be gradually improved, and a high-precision transformation matrix can be finally obtained to achieve accurate point cloud registration. By decomposing and converting the transformation matrix, intuitive posture information data can be obtained, including translation vectors, Euler angles and quaternions, which fully describe the position and posture of the sanitary ware in space. Through point cloud distance calculation and error analysis, the registration accuracy can be evaluated, and an error report containing average error, maximum error and error distribution information can be generated to provide intuitive evaluation results, and finally achieve accurate measurement of sanitary ware posture. Therefore, the present invention provides a point cloud registration method for accurate measurement of sanitary ware posture, which is used to solve the shortcomings of low assembly accuracy and low computational efficiency in traditional point cloud registration methods for accurate measurement of sanitary ware posture. Aiming at the characteristics of unclear surface features of sanitary ware, a feature descriptor based on curvature segmentation and normal vector difference is proposed, which can effectively extract local geometric features of the sanitary ware surface and improve the pertinence and robustness of feature extraction. The algorithm optimization strategies such as feature descriptor search tree and point cloud pyramid are adopted, which can effectively reduce the computational complexity, improve the registration efficiency, and make it more suitable for assembly scenes with high real-time requirements. And then improve the accuracy and efficiency of sanitary ware assembly.

[0013] Preferably, step S1 comprises the following steps:

[0014] Step S11: Setting the scanning area according to the size and shape of the sanitary ware to obtain scanning area data;

[0015] Step S12: using a three-dimensional scanner to collect scanning data of the sanitary ware according to the scanning area data, to obtain multi-view original scanning data;

[0016] Step S13: performing point cloud stitching on the original scanning data from multiple viewpoints to obtain a sanitary ware point cloud model; performing noise point removal on the sanitary ware point cloud model to obtain a sanitary ware point cloud denoising model;

[0017] Step S14: generating surface point cloud according to the sanitary ware point cloud denoising model to obtain sanitary ware surface point cloud data.

[0018] The present invention can effectively narrow the scanning range, reduce the amount of data collection, and improve the scanning efficiency by setting the scanning area according to the size and shape of the sanitary ware. At the same time, different scanning parameters are set according to the characteristics of different areas, which can improve the scanning accuracy and obtain more complete point cloud data. Using a three-dimensional scanner to collect scanning data of the sanitary ware according to the scanning area data, the original scanning data of multiple perspectives can be obtained, which provides sufficient information for the subsequent point cloud splicing and ensures the generation of a complete sanitary ware point cloud model. Point cloud splicing is performed on the original scanning data of multiple perspectives, and the point cloud data of different perspectives can be merged into a complete sanitary ware point cloud model to eliminate the influence of the perspective difference. Noise point removal of the sanitary ware point cloud model can improve the quality of the point cloud data and provide a more reliable data basis for subsequent feature extraction and registration. According to the sanitary ware point cloud denoising model, surface point cloud generation can be performed, and the point cloud data of the sanitary ware surface can be extracted, and irrelevant information such as internal structure can be removed, so as to further reduce the amount of data and improve the subsequent processing efficiency. At the same time, the appearance characteristics of the sanitary ware are more accurately expressed, which is conducive to improving the registration accuracy.

[0019] Preferably, step S2 comprises the following steps:

[0020] Step S21: performing normal vector smoothing on the surface point cloud data of the sanitary ware to obtain smoothed normal vector data; performing curvature calculation based on the smoothed normal vector data to obtain point cloud curvature data;

[0021] Step S22: using a preset curvature threshold to perform curvature threshold segmentation on the point cloud curvature data to obtain a candidate key point set;

[0022] Step S23: performing non-maximum suppression on the candidate key point set to obtain a simplified key point set; performing key point domain search on the simplified key point set to obtain a key point domain set;

[0023] Step S24: performing domain point normal vector difference calculation on the key point domain set to obtain the domain point normal vector difference;

[0024] Step S25: Perform key point feature analysis based on the domain point normal vector difference and the key point domain set to obtain a key point feature descriptor.

[0025] The present invention can reduce the influence of noise on normal vector calculation by smoothing the normal vector of the point cloud data on the surface of the sanitary ware, obtain more accurate normal vector data, and provide a more reliable basis for subsequent curvature calculation. Curvature calculation can be performed based on the smoothed normal vector data, and feature points in the point cloud data, such as edges, corners and other areas with large curvature changes, can be effectively identified. Using a preset curvature threshold to perform curvature threshold segmentation on the point cloud curvature data, areas with large curvature changes can be effectively screened out as candidate key point sets, providing more streamlined data for subsequent feature extraction. Non-maximum suppression of the candidate key point set can effectively remove points with non-maximum curvature in the local area, further streamline the key point set, and avoid feature points being too dense. Key point field search is performed on the streamlined key point set, and local geometric information around the key point can be obtained, providing richer contextual information for subsequent feature description. The difference calculation of the normal vector of the field point of the key point field set can effectively describe the normal vector change trend of the local area around the key point, extract more refined local geometric feature information, and improve the discrimination of the feature description. Key point feature analysis based on the domain point normal vector difference and the key point domain set can effectively describe the local geometric shape information around the key point, generate a key point feature descriptor with rotation, translation and noise robustness, and provide more accurate and stable feature expression for subsequent feature matching.

[0026] Preferably, step S25 comprises the following steps:

[0027] Step S251: Calculate the key point feature histogram according to the domain point normal vector difference and the key point domain set to obtain the key point feature histogram; generate a feature descriptor according to the key point feature histogram to obtain the feature descriptor;

[0028] Step S252: normalizing the feature descriptor to obtain normalized feature descriptor data;

[0029] Step S253: performing feature descriptor dimension reduction on the feature descriptor normalized data to obtain feature descriptor dimension reduction data;

[0030] Step S254: Generate a key point feature descriptor based on the feature descriptor dimension reduction data to obtain a key point feature descriptor.

[0031] The present invention calculates the key point feature histogram according to the domain point normal vector difference and the key point domain set, which can effectively count the normal vector change distribution of the local area around the key point, and convert the continuous geometric information into discrete statistical features. According to the key point feature histogram, the feature descriptor is generated, and a concise and representative feature descriptor can be obtained to characterize the local geometric characteristics of the key point. The feature descriptor is normalized to eliminate the difference in the numerical range of the feature descriptor between different key points, improve the consistency and comparability of the feature descriptor, and help improve the efficiency and accuracy of subsequent feature matching. The feature descriptor dimension reduction is performed on the feature descriptor normalized data, which can effectively reduce the dimension of the feature descriptor, remove redundant information, retain the main information, further improve the efficiency of feature matching, and reduce the computational complexity. According to the feature descriptor dimension reduction data, the key point feature descriptor is generated, and a more concise and efficient key point feature descriptor can be obtained, which effectively reduces the computational complexity and improves the real-time performance of the algorithm while ensuring the feature expression ability, and is more suitable for the accurate measurement scene of sanitary ware posture with high real-time requirements.

[0032] Preferably, step S3 comprises the following steps:

[0033] Step S31: constructing a feature descriptor search tree according to the key point feature descriptor to obtain a feature descriptor search tree;

[0034] Step S32: matching feature point pairs according to key point feature descriptors and feature descriptor search trees to obtain preliminary screened feature point pair data;

[0035] Step S33: performing random sampling of feature point pairs on the initially screened feature point pair data to obtain a sampling point pair set; performing transformation matrix estimation based on the sampling point pair set to obtain transformation matrix data;

[0036] Step S34: performing point cloud transformation on the sanitary ware surface point cloud data using the transformation matrix data to obtain point cloud transformation data; performing corresponding point distance calculation on the target point cloud on the point cloud transformation data and the sanitary ware surface point cloud data to obtain corresponding point distance values ​​of the target point cloud;

[0037] Step S35: performing point cloud transformation statistics on the sanitary ware surface point cloud data according to the distance values ​​of the corresponding points of the target point cloud to obtain a transformation consistency score; performing point cloud transformation application on the sanitary ware surface point cloud data according to the transformation consistency score to obtain coarse registration point cloud data.

[0038] The present invention constructs a feature descriptor search tree according to key point feature descriptors, and can organize feature descriptors into a tree structure, realize efficient feature search, and significantly improve the efficiency of subsequent feature point pair matching. According to the key point feature descriptors and the feature descriptor search tree, feature point pair matching can be performed, and key point pairs with similar features in two point cloud data can be quickly found, providing a reliable matching relationship for subsequent transformation matrix estimation. Random sampling and transformation matrix estimation are performed on the preliminary screened feature point pair data, which can effectively deal with the mismatches existing in the feature point pairs, improve the robustness of the transformation matrix estimation, and obtain more accurate transformation matrix data. Using the transformation matrix data to perform point cloud transformation and corresponding point distance calculation on the sanitary ware surface point cloud data, the matching effect of the current transformation matrix can be quantitatively evaluated, providing a basis for subsequent transformation consistency evaluation. According to the corresponding point distance value of the target point cloud, the point cloud data on the sanitary ware surface is subjected to point cloud transformation statistics, and the reliability of the transformation matrix can be evaluated, and the transformation matrix with good matching effect can be screened out, and it is applied to the point cloud data to obtain coarse registration point cloud data, providing a good initial position for subsequent fine registration.

[0039] Preferably, step S32 includes the following steps:

[0040] Step S321: searching for corresponding feature points in the feature descriptor search tree according to the key point feature descriptor to obtain preliminary matching feature point pairs;

[0041] Step S322: calculating the feature point pair distance value for the preliminary matched feature point pairs to obtain the feature point pair distance value, and using the feature point pair distance value as the feature point pair matching score;

[0042] Step S323: sorting the preliminary matched feature point pairs according to the feature point pair matching scores to obtain feature point pair sorting data;

[0043] Step S324: using a preset matching score threshold to select high matching score point pairs from the feature point pair sorting data to obtain preliminary screened feature point pair data.

[0044] The present invention can quickly find candidate key points similar to the target key point features by searching for corresponding feature points in the feature descriptor search tree according to the key point feature descriptor, and provide a candidate set for subsequent feature point pair matching. The feature point pair distance value is calculated for the preliminary matching feature point pair, and it is used as the feature point pair matching score, which can quantitatively evaluate the similarity of the two key points and provide a basis for the subsequent feature point pair sorting. The preliminary matching feature point pairs are sorted according to the feature point pair matching score, and the feature point pairs with high matching scores can be placed in the front, which is convenient for the subsequent screening of reliable matching point pairs. The feature point pair sorting data is selected with high matching score points using a preset matching score threshold, which can effectively eliminate the feature point pairs with low matching scores and retain the feature point pairs with high matching reliability for subsequent transformation matrix estimation to improve the registration accuracy.

[0045] Preferably, step S4 comprises the following steps:

[0046] Step S41: performing pyramid level setting according to the coarse registration point cloud data to obtain pyramid level data;

[0047] Step S42: constructing a point cloud pyramid for the coarse registration point cloud data according to the pyramid level data to obtain a point cloud pyramid;

[0048] Step S43: Initializing the transformation matrix in the coarse registration point cloud data to obtain an initialized transformation matrix;

[0049] Step S44: optimizing the transformation matrix and updating the precisely aligned point cloud according to the initialization transformation matrix and the point cloud pyramid, to obtain the transformation optimization matrix and the precisely aligned point cloud data;

[0050] Step S45: Determine the highest resolution level of the pyramid for the precisely aligned point cloud data according to the point cloud pyramid. If the highest resolution level is not reached, use the precisely aligned point cloud data as the initial value of the next level of the point cloud pyramid and return to step S44; otherwise, execute step S5.

[0051] The present invention can reasonably control the number of layers and resolution of the point cloud pyramid according to the point cloud scale and registration accuracy requirements by setting the pyramid level according to the coarse registration point cloud data, thereby improving the efficiency of the algorithm while ensuring the registration accuracy. Point cloud pyramids are constructed for coarse registration point cloud data according to the pyramid level data, and point cloud data with multiple levels of resolution can be generated, providing a data basis for the subsequent coarse-to-fine registration strategy. The transformation matrix in the coarse registration point cloud data is initialized, and the result of the coarse registration can be used to provide a better initial transformation matrix for fine registration, thereby accelerating the convergence speed of the algorithm. The registration accuracy can be gradually improved by optimizing the transformation matrix and updating the fine registration point cloud according to the initialized transformation matrix and the point cloud pyramid. Preliminary registration can be performed on a high-level, low-resolution point cloud to quickly eliminate large posture deviations; fine registration can be performed on a low-level, high-resolution point cloud to further improve the registration accuracy. The highest resolution level of the pyramid is determined for the precisely registered point cloud data according to the point cloud pyramid, and iterative optimization is performed to ensure that the algorithm is fully optimized at all levels and ultimately obtain a high-precision registration result.

[0052] Preferably, step S44 includes the following steps:

[0053] Step S441: searching for the closest point pair according to the point cloud pyramid to obtain the closest point pair set;

[0054] Step S442: removing mismatched point pairs from the closest point pair set to obtain a valid point pair set;

[0055] Step S443: performing normal vector weighted distance calculation on the valid point pair set to obtain normal vector weighted distance data; performing matching error analysis based on the normal vector weighted distance data to obtain matching error data;

[0056] Step S444: optimizing the initialization transformation matrix using the valid point pair set and the matching error data to obtain the transformation optimization matrix;

[0057] Step S445: Use the transformation optimization matrix to accurately update the point cloud pyramid to obtain accurate point cloud data.

[0058] The present invention can quickly find the closest point pairs in two point cloud data by searching for the nearest point pairs according to the point cloud pyramid, providing a data basis for the subsequent elimination of mismatched point pairs and optimization of the transformation matrix. Eliminating mismatched point pairs on the nearest point pair set can effectively remove erroneous matching point pairs, improve the accuracy and robustness of the registration, and avoid the negative impact of mismatched point pairs on the optimization of the transformation matrix. By performing normal vector weighted distance calculation on the valid point pair set, the normal vector information can be integrated into the distance calculation, the sensitivity of the registration to the difference in point cloud normal vectors can be improved, the difference between the two point cloud data can be more accurately described, and a more accurate error assessment can be provided for the subsequent optimization of the transformation matrix. By using the valid point pair set and the matching error data to optimize the transformation matrix for initialization, the transformation matrix can be iteratively optimized according to the valid point pairs and matching errors, and the difference between the two point cloud data can be gradually reduced to achieve accurate point cloud registration. The point cloud pyramid is updated by using the transformation optimization matrix to accurately align the point cloud. The optimized transformation matrix can be applied to the point cloud data to obtain more accurate alignment results, providing more accurate point cloud data for the next level or final pose analysis.

[0059] Preferably, step S5 comprises the following steps:

[0060] Step S51: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data;

[0061] Step S52: performing orthogonality check on the matrix rotation data to obtain an orthogonalized rotation matrix; performing rotation vector calculation on the orthogonalized rotation matrix to obtain a rotation vector;

[0062] Step S53: normalizing the rotation axis of the rotation vector to obtain a normalized rotation axis vector; extracting the rotation angle of the rotation vector to obtain a rotation angle value;

[0063] Step S54: performing Euler angle calculation according to the normalized rotation axis vector and the rotation angle value to obtain Euler angle data; performing quaternion representation processing on the orthogonalized rotation matrix to obtain quaternion representation data;

[0064] Step S55: Integrate the matrix translation data, Euler angle data and quaternion representation data to obtain posture information data.

[0065] The present invention performs matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and translation data, and can decompose the complex transformation matrix into more intuitive rotation and translation information, which is convenient for subsequent posture analysis. Orthogonality check is performed on the matrix rotation data to ensure the legitimacy of the rotation matrix and avoid rotation distortion caused by numerical errors. Rotation vector calculation is performed on the orthogonalized rotation matrix, and the rotation matrix can be converted into a more concise and compact rotation vector representation, which is convenient for subsequent rotation axis and rotation angle extraction. The rotation axis is normalized on the rotation vector to obtain a unitized rotation axis vector, which can more clearly represent the direction information of the rotation axis. Rotation angle extraction is performed on the rotation vector to obtain the angle of rotation, which is convenient for subsequent Euler angle calculation. Euler angle calculation is performed according to the unitized rotation axis vector and the rotation angle value, and the rotation information can be converted into a more intuitive Euler angle representation, which is convenient for understanding and application. Quaternion representation processing is performed on the orthogonalized rotation matrix to obtain a rotation representation that is more suitable for computer processing and avoid the singularity problem of Euler angles. By integrating the matrix translation data, Euler angle data and quaternion representation data, the rotation and translation information can be integrated to obtain complete posture information data, which comprehensively describes the position and posture of the sanitary ware in space and provides a basis for subsequent error evaluation and application.

[0066] Preferably, step S6 comprises the following steps:

[0067] Step S61: performing a target point cloud coordinate system transformation according to the posture information data and the precise registration point cloud data to obtain coordinate system transformed target point cloud data; performing a KD tree construction according to the posture information data to obtain a KD tree data structure;

[0068] Step S62: searching for corresponding point pairs in the KD tree data structure according to the target point cloud data transformed in the coordinate system to obtain corresponding point pair data;

[0069] Step S63: performing point-to-point distance calculation on the corresponding point-pair data to obtain point-to-point distance data; performing average distance statistics on the point-to-point distance data to obtain average distance data;

[0070] Step S64: performing maximum distance statistics on the point-to-point distance data to obtain a maximum distance value, performing error mapping generation on the point-to-point distance data to obtain an error mapping color map;

[0071] Step S65: performing error distribution analysis according to the coordinate system transformation target point cloud data and the error mapping color map to obtain error distribution data;

[0072] Step S66: Generate an error report based on the error distribution data, the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the sanitary ware posture.

[0073] The present invention can unify the two point cloud data into the same coordinate system by transforming the target point cloud coordinate system according to the posture information data and the precise registration point cloud data, so as to facilitate the point pair distance calculation and error analysis. The KD tree is constructed according to the posture information data, which can accelerate the efficiency of the subsequent corresponding point pair search. According to the coordinate system transformation target point cloud data, the corresponding point pairs in the spatial position of the two point cloud data can be quickly found by searching the KD tree data structure, which provides a data basis for the subsequent point pair distance calculation. The point pair distance calculation of the corresponding point pair data can quantitatively evaluate the registration error between the two point cloud data. The average distance statistics of the point pair distance data can be obtained to obtain the overall registration error level, which provides a reference for evaluating the registration accuracy. The maximum distance statistics of the point pair distance data can find the area with the largest registration error, which provides a focus area for the subsequent error analysis. The error mapping generation of the point pair distance data can convert the abstract distance data into intuitive color information, which is convenient and intuitive to understand the distribution of the error. By analyzing the error distribution based on the target point cloud data transformed by the coordinate system and the error mapping color map, we can analyze the spatial distribution of errors, for example, which areas have larger errors and which areas have smaller errors, providing a reference for subsequent optimization. By generating an error report based on the error distribution data, average distance data, and maximum distance value, the registration error information can be presented in a structured form, which is convenient for evaluating and analyzing the registration results, and ultimately achieving accurate measurement of the sanitary ware posture.

[0074] The present invention can obtain complete surface point cloud data of sanitary ware through multi-view scanning and surface point cloud generation, provide data basis for subsequent feature extraction and registration, effectively reduce data processing volume and improve efficiency. Through key point field search and feature analysis, key point feature descriptors describing local geometric features of the surface of sanitary ware can be extracted, and these descriptors are robust to rotation, translation and noise, and can improve the accuracy and stability of subsequent registration. Through feature point pair matching and transformation matrix estimation, the corresponding relationship between two point cloud data can be preliminarily determined, and a rough transformation matrix can be obtained to provide a good initial position for precise registration. Through point cloud pyramid construction and multi-level transformation matrix optimization, a coarse-to-fine registration strategy can be implemented, the registration accuracy can be gradually improved, and a high-precision transformation matrix can be finally obtained to achieve accurate point cloud registration. By decomposing and converting the transformation matrix, intuitive posture information data can be obtained, including translation vectors, Euler angles and quaternions, which fully describe the position and posture of the sanitary ware in space. Through point cloud distance calculation and error analysis, the registration accuracy can be evaluated, and an error report containing average error, maximum error and error distribution information can be generated to provide intuitive evaluation results, and finally achieve accurate measurement of sanitary ware posture. Therefore, the present invention provides a point cloud registration method for accurate measurement of sanitary ware posture, which is used to solve the shortcomings of low assembly accuracy and low computational efficiency in traditional point cloud registration methods for accurate measurement of sanitary ware posture. Aiming at the characteristics of unclear surface features of sanitary ware, a feature descriptor based on curvature segmentation and normal vector difference is proposed, which can effectively extract local geometric features of the sanitary ware surface and improve the pertinence and robustness of feature extraction. The algorithm optimization strategies such as feature descriptor search tree and point cloud pyramid are adopted, which can effectively reduce the computational complexity, improve the registration efficiency, and make it more suitable for assembly scenes with high real-time requirements. And then improve the accuracy and efficiency of sanitary ware assembly. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 A schematic diagram of the steps of a point cloud registration method for accurate measurement of sanitary ware posture;

[0076] Figure 2 for Figure 1 Detailed implementation steps of step S2 in the flowchart;

[0077] Figure 3 for Figure 1 Detailed implementation steps of step S4 in FIG.

[0078] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0079] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0080] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0081] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0082] To achieve this, please refer to Figures 1 to 3 A point cloud registration method for accurate measurement of sanitary ware posture comprises the following steps:

[0083] Step S1: using a 3D scanner to collect data of the sanitary ware and obtain multi-view original scanning data; generating a surface point cloud according to the multi-view original scanning data and obtaining the surface point cloud data of the sanitary ware;

[0084] Step S2: performing a key point domain search on the sanitary ware surface point cloud data to obtain a key point domain set; performing a key point feature analysis based on the key point domain set to obtain a key point feature descriptor;

[0085] Step S3: matching feature point pairs according to key point feature descriptors to obtain preliminary screened feature point pair data; estimating transformation matrix according to preliminary screened feature point pair data to obtain transformation matrix data; performing point cloud rough matching using transformation matrix data and sanitary ware surface point cloud data to obtain rough registration point cloud data;

[0086] Step S4: constructing a point cloud pyramid for the coarse registration point cloud data and initializing the transformation matrix to obtain a point cloud pyramid and an initialized transformation matrix; optimizing the transformation matrix according to the initialized transformation matrix and the point cloud pyramid and updating the fine registration point cloud to obtain a transformation optimization matrix and fine registration point cloud data;

[0087] Step S5: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data; performing Euler angle conversion on the matrix rotation data to obtain Euler angle data; performing posture analysis based on the Euler angle data and the matrix translation data to obtain posture information data;

[0088] Step S6: perform point cloud distance calculation based on the posture information data and the precisely aligned point cloud data to obtain average distance data and maximum distance value; perform error evaluation analysis based on the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the sanitary ware posture.

[0089] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of the point cloud registration method for accurate measurement of the sanitary ware posture of the present invention. In this example, the point cloud registration method for accurate measurement of the sanitary ware posture includes the following steps:

[0090] Step S1: using a 3D scanner to collect data of the sanitary ware and obtain multi-view original scanning data; generating a surface point cloud according to the multi-view original scanning data and obtaining the surface point cloud data of the sanitary ware;

[0091] In the embodiment of the present invention, first, the scanning area is set according to the size and shape of the sanitary ware, and the sanitary ware is scanned from multiple perspectives using a three-dimensional scanner to obtain multi-perspective original scanning data. Then, the multi-perspective original scanning data is subjected to point cloud splicing, noise point removal, and surface point cloud extraction to obtain sanitary ware surface point cloud data.

[0092] Step S2: performing a key point domain search on the sanitary ware surface point cloud data to obtain a key point domain set; performing a key point feature analysis based on the key point domain set to obtain a key point feature descriptor;

[0093] In an embodiment of the present invention, normal vector smoothing and curvature calculation are performed on the surface point cloud data of the sanitary ware, and curvature threshold segmentation is performed using a preset curvature threshold to obtain a candidate key point set. Next, non-maximum suppression is performed on the candidate key point set to obtain a streamlined key point set, and a key point domain search is performed to obtain a key point domain set. Finally, the domain point normal vector difference is calculated, and the key point feature histogram calculation, feature descriptor generation, normalization, and dimensionality reduction are performed based on the domain point normal vector difference and the key point domain set, and finally the key point feature descriptor is obtained.

[0094] Step S3: matching feature point pairs according to key point feature descriptors to obtain preliminary screened feature point pair data; estimating transformation matrix according to preliminary screened feature point pair data to obtain transformation matrix data; performing point cloud rough matching using transformation matrix data and sanitary ware surface point cloud data to obtain rough registration point cloud data;

[0095] Step S4: constructing a point cloud pyramid for the coarse registration point cloud data and initializing the transformation matrix to obtain a point cloud pyramid and an initialized transformation matrix; optimizing the transformation matrix according to the initialized transformation matrix and the point cloud pyramid and updating the fine registration point cloud to obtain a transformation optimization matrix and fine registration point cloud data;

[0096] In an embodiment of the present invention, a feature descriptor search tree is constructed using key point feature descriptors. Then, corresponding feature point search, feature point pair distance value calculation, feature point pair sorting, and high matching score point pair selection are performed according to the key point feature descriptors and the feature descriptor search tree to obtain preliminary screening feature point pair data. Next, the preliminary screening feature point pair data is randomly sampled to obtain a sampling point pair set, and a transformation matrix is ​​estimated based on the sampling point pair set to obtain transformation matrix data. Finally, the point cloud data of the sanitary ware surface is transformed using the transformation matrix data, the distance value of the corresponding point of the target point cloud is calculated, and the point cloud transformation statistics are performed based on the distance value of the corresponding point of the target point cloud to obtain the transformation consistency score, and finally the coarse registration point cloud data is obtained.

[0097] Step S5: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data; performing Euler angle conversion on the matrix rotation data to obtain Euler angle data; performing posture analysis based on the Euler angle data and the matrix translation data to obtain posture information data;

[0098] In the embodiment of the present invention, first, the pyramid level is set according to the coarse registration point cloud data, and the point cloud pyramid is constructed to obtain the point cloud pyramid. The transformation matrix corresponding to the coarse registration point cloud data is used as the initialization transformation matrix. Then, starting from the highest level of the point cloud pyramid, the nearest point pair search, mismatched point pair elimination, normal vector weighted distance calculation, matching error analysis, transformation matrix optimization and precise registration point cloud update are performed to obtain the transformation optimization matrix and precise registration point cloud data. The above operations are iterated until the highest resolution level of the point cloud pyramid is reached.

[0099] In an embodiment of the present invention, the transformation optimization matrix is ​​matrix segmented to obtain matrix rotation data and translation vector. The matrix rotation data is orthogonalized to obtain an orthogonalized rotation matrix, which is converted into a rotation vector. Next, the rotation axis is normalized and the rotation angle is extracted for the rotation vector to obtain a unitized rotation axis vector and a rotation angle value. The Euler angle is calculated based on the unitized rotation axis vector and the rotation angle value, and the orthogonalized rotation matrix is ​​converted into a quaternion representation. Finally, the translation vector, Euler angle and quaternion are integrated to obtain the posture information data.

[0100] Step S6: performing point cloud distance calculation based on the posture information data and the precise registration point cloud data to obtain average distance data and maximum distance value; performing error evaluation analysis based on the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the posture of the sanitary ware;

[0101] In an embodiment of the present invention, the position and posture information data is used to transform the precise registration point cloud data into the target coordinate system, and the target point cloud data is used to construct a KD tree data structure. Then, the KD tree data structure is searched for corresponding point pairs according to the target point cloud data transformed by the coordinate system, and the point pair distance is calculated. Next, the average distance and maximum distance statistics of the point pair distance data are performed, and an error mapping color map is generated. Finally, the error distribution analysis is performed according to the target point cloud data transformed by the coordinate system and the error mapping color map, and an error report containing information such as the average error, maximum error, and error distribution histogram is generated to achieve accurate measurement of the position and posture of sanitary ware.

[0102] Preferably, step S1 comprises the following steps:

[0103] Step S11: Setting the scanning area according to the size and shape of the sanitary ware to obtain scanning area data;

[0104] Step S12: using a three-dimensional scanner to collect scanning data of the sanitary ware according to the scanning area data, to obtain multi-view original scanning data;

[0105] Step S13: performing point cloud stitching on the original scanning data from multiple viewpoints to obtain a sanitary ware point cloud model; performing noise point removal on the sanitary ware point cloud model to obtain a sanitary ware point cloud denoising model;

[0106] Step S14: generating surface point cloud according to the sanitary ware point cloud denoising model to obtain sanitary ware surface point cloud data.

[0107] In an embodiment of the present invention, first, a three-dimensional CAD model of the sanitary ware is obtained, and the size information of the sanitary ware, including length, width, height, etc., is extracted therefrom. Then, the best scanning area is determined based on the extracted size information and the scanning range and accuracy of the three-dimensional scanner. For example, for a toilet with a length of 1 meter, a width of 0.5 meters, and a height of 0.8 meters, the scanning area can be set to a cubic space with a length of 1.2 meters, a width of 0.7 meters, and a height of 1 meter to ensure that the entire toilet is fully covered. At the same time, according to the appearance characteristics of the toilet, such as the shape differences of the water tank, the base, etc., the scanning area can be further subdivided into several sub-areas, for example, the water tank part is set as a scanning sub-area separately, so that different scanning parameters are used for different areas during the scanning process to improve the scanning accuracy. Finally, the information of all scanning sub-areas is integrated to generate complete scanning area data, including parameters such as the scanning range, scanning angle, and scanning resolution of each sub-area. The sanitary ware is placed on a pre-set turntable, and according to the scanning area data set in step S11, the three-dimensional scanner is controlled to perform multi-view scanning on the sanitary ware. For example, the control turntable rotates 30 degrees each time, and the scanner scans the toilet once at each angle, a total of 12 times, and obtains point cloud data from 12 different perspectives. During the scanning process, the scanning angle, scanning resolution and other parameters of the scanner are adjusted according to the parameters set in the scanning area data to ensure the acquisition of high-quality point cloud data. For example, for the toilet tank part, due to the complex shape, the scanning resolution can be appropriately increased to capture more detailed information. Finally, the point cloud data collected from all perspectives are integrated to obtain multi-perspective original scanning data. The multi-perspective original scanning data obtained in step S12 are registered and fused using the point cloud splicing algorithm. For example, the iterative closest point (ICP) algorithm is used to iteratively match the point cloud data from different perspectives until the preset accuracy requirements are met, and the point cloud data is spliced ​​to obtain a complete sanitary ware point cloud model. Then, the spliced ​​point cloud model is subjected to noise point removal processing. For example, a statistical filtering algorithm is used to calculate the distance between each point and its neighboring points, and points with too large a distance are identified as noise points and removed, and finally a sanitary ware point cloud denoising model is obtained. The surface point cloud extraction is performed on the sanitary ware point cloud denoising model obtained in step S13. For example, a triangular meshing algorithm is used to construct the point cloud data into a triangular mesh model, and the vertex information constituting the triangular mesh model is extracted as the surface point cloud data of the sanitary ware. In order to improve the quality of the surface point cloud, the point cloud can be smoothed before triangular meshing, for example, by using a Laplacian smoothing algorithm to reduce noise and errors in the point cloud data and obtain smoother surface point cloud data. Finally, the extracted surface point cloud data is used as input data for subsequent steps.

[0108] Preferably, step S2 comprises the following steps:

[0109] Step S21: performing normal vector smoothing on the surface point cloud data of the sanitary ware to obtain smoothed normal vector data; performing curvature calculation based on the smoothed normal vector data to obtain point cloud curvature data;

[0110] Step S22: using a preset curvature threshold to perform curvature threshold segmentation on the point cloud curvature data to obtain a candidate key point set;

[0111] Step S23: performing non-maximum suppression on the candidate key point set to obtain a simplified key point set; performing key point domain search on the simplified key point set to obtain a key point domain set;

[0112] Step S24: performing domain point normal vector difference calculation on the key point domain set to obtain the domain point normal vector difference;

[0113] Step S25: Perform key point feature analysis based on the domain point normal vector difference and the key point domain set to obtain a key point feature descriptor.

[0114] As an example of the present invention, refer to Figure 2 As shown, in this example, step S2 includes:

[0115] Step S21: performing normal vector smoothing on the surface point cloud data of the sanitary ware to obtain smoothed normal vector data; performing curvature calculation based on the smoothed normal vector data to obtain point cloud curvature data;

[0116] In an embodiment of the present invention, the principal component analysis (PCA) is used to calculate the normal vector of each point in the point cloud data of the sanitary ware surface. In order to reduce the influence of noise on the calculation of the normal vector, the normal vector is smoothed using Gaussian filtering, and the filter window size is set to 5. The specific operation is that for each point, the normal vectors of all points within its neighborhood (for example, a spherical neighborhood with a radius of r) are weighted averaged, and the weight is determined by a Gaussian function, and the weight of the point closer to the center point is greater. The normal vector after weighted average is the smoothed normal vector of the point. According to the smoothed normal vector data, the curvature value of each point is calculated using a discrete curvature estimation method. For example, a curvature estimation method based on the neighborhood normal vector covariance matrix is ​​used to calculate the covariance matrix of the normal vector between each point and its neighborhood points, and the curvature value of the point is calculated according to the eigenvalue of the covariance matrix.

[0117] Step S22: using a preset curvature threshold to perform curvature threshold segmentation on the point cloud curvature data to obtain a candidate key point set;

[0118] In the embodiment of the present invention, according to the characteristics of the curvature change of the sanitary ware surface, the preset curvature threshold is 0.05. The point cloud curvature data calculated in step S21 is traversed, and the points with curvature values ​​greater than the preset threshold of 0.05 are marked as candidate key points to obtain a set of candidate key points. This means that areas with large curvature changes, such as the edges and corners of the toilet, are more easily identified as candidate key points, while areas with gentle curvature changes, such as the flat part of the toilet, will be filtered out.

[0119] Step S23: performing non-maximum suppression on the candidate key point set to obtain a simplified key point set; performing key point domain search on the simplified key point set to obtain a key point domain set;

[0120] In an embodiment of the present invention, a non-maximum suppression (NMS) process is performed on the candidate key point set obtained in step S22 to remove points with non-maximum curvature in the local area to obtain a simplified key point set. For example, a spherical area with a fixed radius is set with each candidate key point as the center, and the curvature values ​​of all candidate key points in the area are compared. The points with the largest curvature value are retained and other points are removed. A key point domain search is performed on the simplified key point set, that is, with each key point as the center, all points within a certain radius range around it (for example, a spherical neighborhood with a radius of R) are searched to form the domain point set of the key point. The domain point sets of all key points are merged to obtain a key point domain set.

[0121] Step S24: performing domain point normal vector difference calculation on the key point domain set to obtain the domain point normal vector difference;

[0122] In the embodiment of the present invention, for each key point domain set obtained in step S23, the difference of the normal vector between the domain point and its corresponding key point is calculated. The specific operation is to perform vector subtraction operation on the normal vector of the domain point and the normal vector of its corresponding key point to obtain the difference of the normal vector of the domain point. In order to avoid calculation errors caused by the opposite direction of the normal vector, the calculated difference vector can be taken as an absolute value or square.

[0123] Step S25: performing key point feature analysis based on the domain point normal vector difference and the key point domain set to obtain a key point feature descriptor;

[0124] In the embodiment of the present invention, the Fast Point Feature Histograms (FPFH) algorithm is used to perform feature description on the domain point normal vector difference obtained in step S24 and the key point domain set. The specific operation is to construct the domain point normal vector difference data of each key point into a histogram, count the number of point clouds within different difference ranges, and normalize the histogram to obtain the FPFH feature descriptor. The FPFH feature descriptor can effectively describe the local geometric shape information around the key point, and has a certain robustness to the rotation, translation and noise of the point cloud.

[0125] Preferably, step S25 comprises the following steps:

[0126] Step S251: Calculate the key point feature histogram according to the domain point normal vector difference and the key point domain set to obtain the key point feature histogram; generate a feature descriptor according to the key point feature histogram to obtain the feature descriptor;

[0127] Step S252: normalizing the feature descriptor to obtain normalized feature descriptor data;

[0128] Step S253: performing feature descriptor dimension reduction on the feature descriptor normalized data to obtain feature descriptor dimension reduction data;

[0129] Step S254: Generate a key point feature descriptor based on the feature descriptor dimension reduction data to obtain a key point feature descriptor.

[0130] In an embodiment of the present invention, the domain point normal vector difference data of each key point obtained in step S24 is sorted according to its modulus. The sorted domain point normal vector difference data is divided into a preset number of intervals, such as 10 intervals, and the number of domain points contained in each interval is counted to construct a key point feature histogram. The number of domain points in each interval reflects the changing trend of the local geometric shape around the key point. According to the constructed key point feature histogram, a feature vector with a length of the number of intervals is generated as the initial feature descriptor of the key point. For example, if the domain point normal vector difference data is divided into 10 intervals, the initial feature descriptor of each key point will be a feature vector with a length of 10. In order to eliminate the difference in the numerical range of feature descriptors between different key points, the initial feature descriptors obtained in step S251 are normalized. For example, using the L2 normalization method, each feature descriptor vector is divided by its own modulus to obtain a unit vector with a modulus of 1 as the normalized feature descriptor. In order to reduce the dimension of the feature descriptor and improve the efficiency of subsequent feature matching, the normalized feature descriptor obtained in step S252 is subjected to dimensionality reduction processing. For example, the feature descriptor is reduced in dimension using principal component analysis (PCA), and the original high-dimensional feature descriptor is projected into a low-dimensional space, retaining the main information and removing redundant information. For example, the original 10-dimensional feature descriptor can be reduced in dimension to 5 dimensions to obtain a more compact feature representation. The reduced-dimensional feature descriptor obtained in step S253 is used as the final key point feature descriptor. These feature descriptors effectively express the local geometric shape information around the key points, and have a lower dimension, which is conducive to improving the efficiency and accuracy of subsequent feature matching. For example, the 5-dimensional feature descriptor finally obtained can be used to quickly and accurately match the same key points in different point cloud data.

[0131] Preferably, step S3 comprises the following steps:

[0132] Step S31: constructing a feature descriptor search tree according to the key point feature descriptor to obtain a feature descriptor search tree;

[0133] Step S32: matching feature point pairs according to key point feature descriptors and feature descriptor search trees to obtain preliminary screened feature point pair data;

[0134] Step S33: performing random sampling of feature point pairs on the initially screened feature point pair data to obtain a sampling point pair set; performing transformation matrix estimation based on the sampling point pair set to obtain transformation matrix data;

[0135] Step S34: performing point cloud transformation on the sanitary ware surface point cloud data using the transformation matrix data to obtain point cloud transformation data; performing corresponding point distance calculation on the target point cloud on the point cloud transformation data and the sanitary ware surface point cloud data to obtain corresponding point distance values ​​of the target point cloud;

[0136] Step S35: performing point cloud transformation statistics on the sanitary ware surface point cloud data according to the distance values ​​of the corresponding points of the target point cloud to obtain a transformation consistency score; performing point cloud transformation application on the sanitary ware surface point cloud data according to the transformation consistency score to obtain coarse registration point cloud data.

[0137] In the embodiment of the present invention, the key point feature descriptor obtained in step S25 is constructed into a feature descriptor search tree using a KD tree (K-Dimensional Tree) algorithm. The specific operation is to regard the feature descriptor as a point in a multidimensional space, select a suitable segmentation dimension and segmentation value according to the dimension of the feature descriptor, and recursively divide the feature description subspace into multiple subspaces until the number of key points contained in each subspace is less than a preset threshold. The constructed KD tree can efficiently perform the nearest neighbor search of the feature descriptor and accelerate the subsequent feature point pair matching process. The feature descriptor search tree constructed in step S31 is used to match the key points in two point cloud data. The specific operation is that for each key point in one point cloud data, the KD tree is used to search for the k key points (for example, k=2) closest to its feature descriptor in another point cloud data, and the distance ratio (that is, the ratio of the closest distance to the second closest distance) is calculated. If the distance ratio is less than a preset threshold (for example, 0.8), it is considered that a matching feature point pair is found, and the feature point pair is added to the preliminary screening feature point pair data. Randomly sample several feature point pairs (for example, 3) from the preliminary screened feature point pair data obtained in step S32 to form a sampling point pair set. Use the RANSAC (Random Sample Consensus) algorithm to estimate the transformation matrix between the two point cloud data based on the sampling point pair set. The specific operation is to repeat the following steps multiple times (for example, 1000 times): randomly select 3 feature point pairs, and use these 3 feature point pairs to calculate the transformation matrix between the two point cloud data; use the calculated transformation matrix to transform all feature point pairs, and count the number of feature point pairs whose distance between the transformed feature point pairs is less than the preset threshold, which is called the number of inliers. Select the transformation matrix with the largest number of inliers as the final transformation matrix estimation result. Use the transformation matrix obtained in step S33 to transform one of the sanitary ware surface point cloud data to obtain point cloud transformation data. Calculate the distance from each point in the point cloud transformation data to the nearest point in the other sanitary ware surface point cloud data to obtain the distance value of the corresponding point of the target point cloud. The KD tree can be used to accelerate the nearest point search process. The number of points whose distance values ​​of the corresponding points of the target point cloud obtained in step S34 are less than the preset threshold is counted to calculate the transformation consistency score. For example, the number of points less than the preset threshold can be divided by the total number of points to obtain the transformation consistency score. If the transformation consistency score is greater than the preset threshold (for example, 0.8), the current transformation matrix estimation result is considered reliable, and the transformation matrix is ​​applied to the point cloud data to obtain the coarse registration point cloud data. Otherwise, return to step S33, re-perform random sampling and transformation matrix estimation until a reliable transformation matrix estimation result is obtained.

[0138] Preferably, step S32 includes the following steps:

[0139] Step S321: searching for corresponding feature points in the feature descriptor search tree according to the key point feature descriptor to obtain preliminary matching feature point pairs;

[0140] Step S322: calculating the feature point pair distance value for the preliminary matched feature point pairs to obtain the feature point pair distance value, and using the feature point pair distance value as the feature point pair matching score;

[0141] Step S323: sorting the preliminary matched feature point pairs according to the feature point pair matching scores to obtain feature point pair sorting data;

[0142] Step S324: using a preset matching score threshold to select high matching score point pairs from the feature point pair sorting data to obtain preliminary screened feature point pair data.

[0143] In the embodiment of the present invention, all key points in one of the point cloud data are traversed, and the feature descriptor search tree constructed in step S31 is used to search for k key points (for example, k=2) that are closest to its feature descriptor in the other point cloud data. The searched key point pairs are recorded to form preliminary matching feature point pairs. For example, for a key point in point cloud A, if the two key points that are closest to its feature descriptor are searched in point cloud B as point 1 and point 2, respectively, then the two key point pairs (A, 1) and (A, 2) are added to the preliminary matching feature point pairs. The Euclidean distance between the feature descriptors of each preliminary matching feature point pair obtained in step S321 is calculated to obtain the feature point pair distance value. The feature point pair distance value is used as the feature point pair matching score. The smaller the distance value, the higher the matching score, indicating that the possibility of the two key points matching is greater. For example, for the key point pair (A, 1), the Euclidean distance between the feature descriptor of point A and the feature descriptor of point 1 is calculated, and the distance value is used as the matching score of the feature point pair. According to the feature point pair matching scores calculated in step S322, the preliminary matching feature point pairs are sorted in ascending order to obtain feature point pair sorting data. In the sorted feature point pair list, the feature point pairs at the front have lower distance values, indicating a higher possibility of matching. For example, if the matching score of the key point pair (A, 1) is lower than that of (A, 2), (A, 1) will be ranked in front of (A, 2). Set a preset matching score threshold, such as 0.8. Traverse the feature point pair sorting data obtained in step S323, add the feature point pairs with matching scores less than the preset threshold to the preliminary screening feature point pair data, and discard the feature point pairs with matching scores greater than or equal to the preset threshold. This means that only feature point pairs with a higher possibility of matching are retained for subsequent transformation matrix estimation.

[0144] Preferably, step S4 comprises the following steps:

[0145] Step S41: performing pyramid level setting according to the coarse registration point cloud data to obtain pyramid level data;

[0146] Step S42: constructing a point cloud pyramid for the coarse registration point cloud data according to the pyramid level data to obtain a point cloud pyramid;

[0147] Step S43: Initializing the transformation matrix in the coarse registration point cloud data to obtain an initialized transformation matrix;

[0148] Step S44: optimizing the transformation matrix and updating the precisely aligned point cloud according to the initialization transformation matrix and the point cloud pyramid, to obtain the transformation optimization matrix and the precisely aligned point cloud data;

[0149] Step S45: Determine the highest resolution level of the pyramid for the precisely aligned point cloud data according to the point cloud pyramid. If the highest resolution level is not reached, use the precisely aligned point cloud data as the initial value of the next level of the point cloud pyramid and return to step S44; otherwise, execute step S5.

[0150] As an example of the present invention, refer to Figure 3 As shown, in this example, step S4 includes:

[0151] Step S41: performing pyramid level setting according to the coarse registration point cloud data to obtain pyramid level data;

[0152] In the embodiment of the present invention, according to the scale of the coarse registration point cloud data and the expected registration accuracy, the number of levels of the point cloud pyramid is set to 3. The higher the level, the lower the point cloud resolution, and vice versa. For example, the original point cloud data is taken as the 0th layer, and is downsampled once to obtain the 1st layer, and then downsampled again to obtain the 2nd layer.

[0153] Step S42: constructing a point cloud pyramid for the coarse registration point cloud data according to the pyramid level data to obtain a point cloud pyramid;

[0154] In the embodiment of the present invention, the coarse registration point cloud data is gradually downsampled according to the pyramid level data set in step S41 to construct a point cloud pyramid. For example, a voxel downsampling method is used to divide the point cloud space into voxel grids of fixed size, and the point cloud in each voxel grid is replaced by its center point, thereby reducing the point cloud resolution. The point cloud data obtained by each layer of downsampling is stored to form a point cloud pyramid.

[0155] Step S43: Initializing the transformation matrix in the coarse registration point cloud data to obtain an initialized transformation matrix;

[0156] In the embodiment of the present invention, the transformation matrix corresponding to the coarse registration point cloud data obtained in step S3 is used as the initialization transformation matrix. The matrix contains the rotation and translation information between the two point cloud data, which is used for subsequent iterative optimization.

[0157] Step S44: optimizing the transformation matrix and updating the precisely aligned point cloud according to the initialization transformation matrix and the point cloud pyramid, to obtain the transformation optimization matrix and the precisely aligned point cloud data;

[0158] In an embodiment of the present invention, starting from the highest level (e.g., the second level) of the point cloud pyramid, the iterative closest point (ICP) algorithm is used to optimize the transformation matrix. The specific operation is to apply the initialized transformation matrix to the point cloud data of the current level, calculate the corresponding point pairs between the transformed point cloud data and the target point cloud data, calculate the correction amount of the transformation matrix based on the corresponding point pairs, and update the transformation matrix. Repeat the iterative process until the preset iteration termination condition is met, such as reaching the maximum number of iterations or the error is less than a preset threshold. Apply the optimized transformation matrix to the point cloud data of the current level to obtain the precisely aligned point cloud data.

[0159] Step S45: judging the highest resolution level of the pyramid for the precisely aligned point cloud data according to the point cloud pyramid. If the highest resolution level is not reached, the precisely aligned point cloud data is used as the initial value of the next level of the point cloud pyramid, and the process returns to step S44; otherwise, the process proceeds to step S5.

[0160] In the embodiment of the present invention, it is determined whether the current level is the highest resolution level of the point cloud pyramid (e.g., level 0). If the highest resolution level is not reached, the finely aligned point cloud data obtained in step S44 is used as the initial value of the next level of the point cloud pyramid, and the optimized transformation matrix is ​​used as the initialization transformation matrix of the next level, and the process returns to step S44 to continue with higher resolution point cloud alignment. If the highest resolution level is reached, it means that the point cloud alignment process is completed, and step S5 is continued.

[0161] Preferably, step S44 includes the following steps:

[0162] Step S441: searching for the closest point pair according to the point cloud pyramid to obtain the closest point pair set;

[0163] Step S442: removing mismatched point pairs from the closest point pair set to obtain a valid point pair set;

[0164] Step S443: performing normal vector weighted distance calculation on the valid point pair set to obtain normal vector weighted distance data; performing matching error analysis based on the normal vector weighted distance data to obtain matching error data;

[0165] Step S444: optimizing the initialization transformation matrix using the valid point pair set and the matching error data to obtain the transformation optimization matrix;

[0166] Step S445: Use the transformation optimization matrix to accurately update the point cloud pyramid to obtain accurate point cloud data.

[0167] In an embodiment of the present invention, the point cloud pyramid constructed in step S42 is used to search for the nearest point pair at the current level. The specific operation is to apply the initialization transformation matrix to the point cloud data of the current level to obtain the transformed point cloud data. For each point in the transformed point cloud data, search for the point closest to it in the target point cloud data to form a nearest point pair. All the nearest point pairs found are stored to form a nearest point pair set. The nearest point pair set obtained in step S441 is subjected to the elimination of mismatched point pairs. For example, the distance threshold elimination method is used to calculate the distance between the two points in each nearest point pair, and the point pairs with a distance greater than a preset threshold are regarded as mismatched point pairs, which are eliminated from the nearest point pair set. The point pairs finally retained constitute a valid point pair set. For each valid point pair obtained in step S442, the weighted distance of its normal vector is calculated. The specific operation is to obtain the normal vectors corresponding to the two points in the valid point pair, calculate the angle between the two normal vectors, and calculate the weight coefficient according to the angle. The Euclidean distance between the two points is multiplied by the weight coefficient to obtain the weighted distance of the normal vector. The normal vector weighted distances of all valid point pairs are stored to form normal vector weighted distance data. According to the normal vector weighted distance data, the root mean square error (RMSE) or mean absolute error (MAE) and other indicators are calculated as matching error data to evaluate the accuracy of the current registration. The initialization transformation matrix obtained in step S43 is optimized using the valid point pair set obtained in step S442 and the matching error data obtained in step S443. For example, the Levenberg-Marquardt (LM) algorithm is used to iteratively update the six parameters (three rotation parameters and three translation parameters) of the transformation matrix with the goal of minimizing the matching error. The transformation optimization matrix obtained in step S444 is used to transform the point cloud data of the current level to obtain the precisely registered point cloud data. The specific operation is to apply the transformation optimization matrix to the point cloud data of the current level to obtain the transformed point cloud data, and use the transformed point cloud data as the precisely registered point cloud data of the current level.

[0168] Preferably, step S5 comprises the following steps:

[0169] Step S51: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data;

[0170] Step S52: performing orthogonality check on the matrix rotation data to obtain an orthogonalized rotation matrix; performing rotation vector calculation on the orthogonalized rotation matrix to obtain a rotation vector;

[0171] Step S53: normalizing the rotation axis of the rotation vector to obtain a normalized rotation axis vector; extracting the rotation angle of the rotation vector to obtain a rotation angle value;

[0172] Step S54: performing Euler angle calculation according to the normalized rotation axis vector and the rotation angle value to obtain Euler angle data; performing quaternion representation processing on the orthogonalized rotation matrix to obtain quaternion representation data;

[0173] Step S55: Integrate the matrix translation data, Euler angle data and quaternion representation data to obtain posture information data.

[0174] In an embodiment of the present invention, the final transformation optimization matrix obtained in step S4 is divided into a rotation matrix and a translation vector. For example, for a 4x4 homogeneous transformation matrix, the 3x3 submatrix in the upper left corner is extracted as a rotation matrix, and the first three elements of the last column are extracted as translation vectors. The rotation matrix obtained in step S51 is checked for orthogonality to ensure that it satisfies the properties of the rotation matrix, that is, the determinant is 1 and the column vectors are mutually orthogonal. If the rotation matrix does not satisfy the orthogonality, it is orthogonalized using methods such as singular value decomposition (SVD) to obtain an orthogonalized rotation matrix. The orthogonalized rotation matrix is ​​calculated for the rotation vector, for example, using the Rodrigues formula, the rotation matrix is ​​converted into an equivalent rotation vector, which contains information about the rotation axis and the rotation angle. The rotation vector obtained in step S52 is normalized to obtain a unitized rotation axis vector, which represents the direction of the rotation axis. The modulus of the rotation vector is calculated to obtain a rotation angle value, which represents the angle of rotation around the rotation axis. Using the unitized rotation axis vector and rotation angle value obtained in step S53, the equivalent Euler angle is calculated. For example, using the Euler angle in the ZYX order, the rotation is decomposed into three rotations around the Z axis, the Y axis and the X axis. The orthogonalized rotation matrix obtained in step S52 is represented by a quaternion. For example, using the conversion formula from the rotation matrix to the quaternion, the rotation matrix is ​​converted into an equivalent quaternion, which contains the information of the rotation axis and the rotation angle. The translation vector obtained in step S51, the Euler angle obtained in step S54 and the quaternion are integrated together to form complete posture information data. The data can be represented as a six-dimensional vector (three translation components and three rotation components) or a seven-dimensional vector (three translation components and four quaternion components) to describe the precise position and posture of the sanitary ware in space.

[0175] Preferably, step S6 comprises the following steps:

[0176] Step S61: performing a target point cloud coordinate system transformation according to the posture information data and the precise registration point cloud data to obtain coordinate system transformed target point cloud data; performing a KD tree construction according to the posture information data to obtain a KD tree data structure;

[0177] Step S62: searching for corresponding point pairs in the KD tree data structure according to the target point cloud data transformed in the coordinate system to obtain corresponding point pair data;

[0178] Step S63: performing point-to-point distance calculation on the corresponding point-pair data to obtain point-to-point distance data; performing average distance statistics on the point-to-point distance data to obtain average distance data;

[0179] Step S64: performing maximum distance statistics on the point-to-point distance data to obtain a maximum distance value, performing error mapping generation on the point-to-point distance data to obtain an error mapping color map;

[0180] Step S65: performing error distribution analysis according to the coordinate system transformation target point cloud data and the error mapping color map to obtain error distribution data;

[0181] Step S66: Generate an error report based on the error distribution data, the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the sanitary ware posture.

[0182] In an embodiment of the present invention, the position information data obtained in step S5 is used to transform the precise registration point cloud data into the target coordinate system to obtain the coordinate system transformation target point cloud data. The specific operation is to represent the position information data as a 4x4 homogeneous transformation matrix, apply the matrix to each point in the precise registration point cloud data, and obtain the transformed point cloud coordinates. At the same time, the target point cloud data is used to construct a KD tree data structure for subsequent corresponding point search. Traverse each point in the coordinate system transformation target point cloud data, and use the KD tree data structure constructed in step S61 to search for the point closest to it in the target point cloud data to form a corresponding point pair. All the corresponding point pairs found are stored to form corresponding point pair data. The Euclidean distance between the two points in each corresponding point pair obtained in step S62 is calculated to obtain point pair distance data. All point pair distance data are stored for subsequent error analysis. The average value of all point pair distances is calculated to obtain average distance data, which reflects the overall error level after registration. The maximum value of all point pair distances is counted to obtain the maximum distance value, which reflects the local maximum error after registration. According to the point pair distance data, each point pair distance is mapped to a color value. For example, using a linear mapping method, the minimum distance is mapped to blue, the maximum distance is mapped to red, and the intermediate distance is mapped to other colors. The color value of each corresponding point pair is stored to form an error mapping color map for visually displaying the distribution of the registration error. The coordinate system transformation target point cloud data obtained in step S61 is combined with the error mapping color map obtained in step S64 to perform error distribution analysis. For example, the number and proportion of point clouds within different distance ranges are counted, an error distribution histogram is drawn, and the spatial distribution law of errors is analyzed. According to the average distance data obtained in step S63, the maximum distance value obtained in step S64, and the error distribution data obtained in step S65, an error report is generated. The error report may include the following contents: average error after registration, maximum error, error distribution histogram, error spatial distribution map, etc. By analyzing the error report, the accuracy of the sanitary ware posture measurement can be evaluated, providing a reference for subsequent assembly and other work.

[0183] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0184] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A point cloud registration method for accurate measurement of sanitary ware posture, characterized in that: The following steps are involved: Step S1: using a 3D scanner to collect data of the sanitary ware and obtain multi-view original scanning data; generating a surface point cloud according to the multi-view original scanning data and obtaining the surface point cloud data of the sanitary ware; Step S2: performing a key point domain search on the sanitary ware surface point cloud data to obtain a key point domain set; performing a key point feature analysis based on the key point domain set to obtain a key point feature descriptor; Step S3: matching feature point pairs according to key point feature descriptors to obtain preliminary screened feature point pair data; According to the preliminary screening of feature points, the transformation matrix of the data is estimated to obtain the transformation matrix data; the transformation matrix data and the surface point cloud data of the sanitary ware are used to perform rough matching of the point cloud to obtain the rough registration point cloud data; Step S4: constructing a point cloud pyramid for the coarse registration point cloud data and initializing the transformation matrix to obtain a point cloud pyramid and an initialized transformation matrix; optimizing the transformation matrix according to the initialized transformation matrix and the point cloud pyramid and updating the fine registration point cloud to obtain a transformation optimization matrix and fine registration point cloud data; Step S5: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data; performing Euler angle conversion on the matrix rotation data to obtain Euler angle data; performing posture analysis based on the Euler angle data and the matrix translation data to obtain posture information data; Step S6: perform point cloud distance calculation based on the posture information data and the precisely aligned point cloud data to obtain average distance data and maximum distance value; perform error evaluation analysis based on the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the sanitary ware posture.

2. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 1 is characterized in that: Step S1 includes the following steps: Step S11: Setting the scanning area according to the size and shape of the sanitary ware to obtain scanning area data; Step S12: using a three-dimensional scanner to collect scanning data of the sanitary ware according to the scanning area data, to obtain multi-view original scanning data; Step S13: performing point cloud stitching on the original scanning data from multiple perspectives to obtain a sanitary ware point cloud model; removing noise points from the sanitary ware point cloud model to obtain a sanitary ware point cloud denoising model; Step S14: generating surface point cloud according to the sanitary ware point cloud denoising model to obtain sanitary ware surface point cloud data.

3. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 1 is characterized in that: Step S2 includes the following steps: Step S21: performing normal vector smoothing on the surface point cloud data of the sanitary ware to obtain smoothed normal vector data; performing curvature calculation based on the smoothed normal vector data to obtain point cloud curvature data; Step S22: using a preset curvature threshold to perform curvature threshold segmentation on the point cloud curvature data to obtain a candidate key point set; Step S23: performing non-maximum suppression on the candidate key point set to obtain a simplified key point set; performing key point area search on the simplified key point set to obtain a key point area set; Step S24: performing domain point normal vector difference calculation on the key point domain set to obtain the domain point normal vector difference; Step S25: Perform key point feature analysis based on the domain point normal vector difference and the key point domain set to obtain a key point feature descriptor.

4. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 3 is characterized in that: Step S25 includes the following steps: Step S251: Calculate the key point feature histogram according to the domain point normal vector difference and the key point domain set to obtain the key point feature histogram; generate a feature descriptor according to the key point feature histogram to obtain the feature descriptor; Step S252: normalizing the feature descriptor to obtain normalized feature descriptor data; Step S253: performing feature descriptor dimension reduction on the feature descriptor normalized data to obtain feature descriptor dimension reduction data; Step S254: Generate a key point feature descriptor based on the feature descriptor dimension reduction data to obtain a key point feature descriptor.

5. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: constructing a feature descriptor search tree according to the key point feature descriptor to obtain a feature descriptor search tree; Step S32: matching feature point pairs according to key point feature descriptors and feature descriptor search trees to obtain preliminary screened feature point pair data; Step S33: performing random sampling of feature point pairs on the initially screened feature point pair data to obtain a sampling point pair set; performing transformation matrix estimation based on the sampling point pair set to obtain transformation matrix data; Step S34: performing point cloud transformation on the sanitary ware surface point cloud data using the transformation matrix data to obtain point cloud transformation data; performing corresponding point distance calculation on the target point cloud on the point cloud transformation data and the sanitary ware surface point cloud data to obtain corresponding point distance values ​​of the target point cloud; Step S35: performing point cloud transformation statistics on the sanitary ware surface point cloud data according to the distance values ​​of the corresponding points of the target point cloud to obtain a transformation consistency score; performing point cloud transformation application on the sanitary ware surface point cloud data according to the transformation consistency score to obtain coarse registration point cloud data.

6. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 5, characterized in that: Step S32 includes the following steps: Step S321: searching for corresponding feature points in the feature descriptor search tree according to the key point feature descriptor to obtain preliminary matching feature point pairs; Step S322: calculating the feature point pair distance value for the preliminary matched feature point pairs to obtain the feature point pair distance value, and using the feature point pair distance value as the feature point pair matching score; Step S323: sorting the preliminary matched feature point pairs according to the feature point pair matching scores to obtain feature point pair sorting data; Step S324: using a preset matching score threshold to select high matching score point pairs from the feature point pair sorting data to obtain preliminary screened feature point pair data.

7. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: performing pyramid level setting according to the coarse registration point cloud data to obtain pyramid level data; Step S42: constructing a point cloud pyramid for the coarse registration point cloud data according to the pyramid level data to obtain a point cloud pyramid; Step S43: Initializing the transformation matrix in the coarse registration point cloud data to obtain an initialized transformation matrix; Step S44: optimizing the transformation matrix and updating the precisely aligned point cloud according to the initialization transformation matrix and the point cloud pyramid, to obtain the transformation optimization matrix and the precisely aligned point cloud data; Step S45: Determine the highest resolution level of the pyramid for the precisely aligned point cloud data according to the point cloud pyramid. If the highest resolution level is not reached, use the precisely aligned point cloud data as the initial value of the next level of the point cloud pyramid and return to step S44; otherwise, execute step S5.

8. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 7, characterized in that: Step S44 includes the following steps: Step S441: searching for the closest point pair according to the point cloud pyramid to obtain the closest point pair set; Step S442: removing mismatched point pairs from the closest point pair set to obtain a valid point pair set; Step S443: performing normal vector weighted distance calculation on the valid point pair set to obtain normal vector weighted distance data; performing matching error analysis based on the normal vector weighted distance data to obtain matching error data; Step S444: optimizing the initialization transformation matrix using the valid point pair set and the matching error data to obtain the transformation optimization matrix; Step S445: Use the transformation optimization matrix to accurately update the point cloud pyramid to obtain accurate point cloud data.

9. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 1, characterized in that: Step S5 includes the following steps: Step S51: performing matrix segmentation on the transformation optimization matrix to obtain matrix rotation data and matrix translation data; Step S52: performing orthogonality check on the matrix rotation data to obtain an orthogonalized rotation matrix; performing rotation vector calculation on the orthogonalized rotation matrix to obtain a rotation vector; Step S53: normalizing the rotation axis of the rotation vector to obtain a normalized rotation axis vector; extracting the rotation angle of the rotation vector to obtain a rotation angle value; Step S54: performing Euler angle calculation according to the normalized rotation axis vector and the rotation angle value to obtain Euler angle data; performing quaternion representation processing on the orthogonalized rotation matrix to obtain quaternion representation data; Step S55: Integrate the matrix translation data, Euler angle data and quaternion representation data to obtain posture information data.

10. The point cloud registration method for accurate measurement of sanitary ware posture according to claim 1, characterized in that: Step S6 includes the following steps: Step S61: performing a target point cloud coordinate system transformation according to the posture information data and the precise registration point cloud data to obtain coordinate system transformed target point cloud data; performing a KD tree construction according to the posture information data to obtain a KD tree data structure; Step S62: searching for corresponding point pairs in the KD tree data structure according to the target point cloud data transformed in the coordinate system to obtain corresponding point pair data; Step S63: performing point-to-point distance calculation on the corresponding point-pair data to obtain point-to-point distance data; performing average distance statistics on the point-to-point distance data to obtain average distance data; Step S64: performing maximum distance statistics on the point-to-point distance data to obtain a maximum distance value, performing error mapping generation on the point-to-point distance data to obtain an error mapping color map; Step S65: performing error distribution analysis according to the coordinate system transformation target point cloud data and the error mapping color map to obtain error distribution data; Step S66: Generate an error report based on the error distribution data, the average distance data and the maximum distance value to obtain an error report to achieve accurate measurement of the sanitary ware posture.

Citation Information

Cited By

  • Pose estimation method and system based on multi-view RGBD image stream

    CN120259434A

  • Data matching method and device, equipment, storage medium and computer program product

    CN120852813A