Pipe component class point cloud registration method based on geometric feature constraint
Patent Information
- Application Number
- CN202611408621.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本发明针对现有管道部件点云配准方法存在的初始位姿偏差下鲁棒性差、截面同心度低及轴向易偏移的问题,公开了基于几何特征约束的管道部件类点云配准方法,包括:
本发明采用多级级联配准架构,结合主成分分析主轴粗配准、迭代最近点精配准与截面几何特征提取技术,通过长短轴正交姿态校正与维度锁定的横截面圆心对齐策略,在保障大初始偏差下配准鲁棒性的同时,显著提升管道横截面对心精度,满足工业管道部件点云高精度配准与质量检测的应用需求。
Smart Images

Figure CN122928610A_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a point cloud registration method for pipeline components based on geometric feature constraints, which relates to the field of point cloud data processing technology. Background Technology
[0002] With the popularization and development of 3D laser scanning technology, geometric reconstruction and accuracy inspection of pipeline components through 3D point cloud registration technology has become a core technical path for the digitalization of pipeline engineering. In practical applications such as multi-view scanning and stitching of pipeline components and point cloud alignment of multi-station pipe segments, high-precision registration of pipeline component point clouds is the foundation for subsequent dimensional measurement, weld defect analysis, and assembly coaxiality assessment. Its registration accuracy directly determines the reliability of the overall engineering application.
[0003] Currently, point cloud registration methods for cylindrical pipe components often employ a cylindrical fitting axis alignment scheme. This involves fitting the cylindrical surface of the pipe to obtain the axis, and using axis coincidence as a constraint to achieve point cloud registration. While this approach achieves basic alignment in standard straight pipe sections, it has significant limitations: when pipe components include non-cylindrical structures such as flanges, reducers, and joints, the accuracy of the cylindrical fitting decreases considerably, affecting the axis alignment effect. Furthermore, relying solely on the alignment of a single axis cannot constrain the pipe's rotational attitude around that axis, making it difficult to eliminate radial offset and axial deflection during registration, thus failing to meet the coaxiality requirements of precision assembly and high-precision weld inspection. Therefore, research into dedicated registration methods tailored to the structural characteristics of pipes is crucial for improving the robustness and geometric accuracy of pipe point cloud registration. Summary of the Invention
[0004] This invention addresses the problems of poor robustness under initial pose deviations, low cross-sectional concentricity, and easy axial misalignment in existing point cloud registration methods for pipeline components. It discloses a point cloud registration method for pipeline components based on geometric feature constraints, including: S1. Point cloud preprocessing and axial feature recognition: complete invalid point filtering, automatic identification of the major and minor axes of the pipeline point cloud, and perform end proportional truncation processing on the longest axis of the point cloud to remove edge interference points; S2. Based on the principal component analysis algorithm, the component point cloud is coarsely registered. By performing eigenvalue decomposition and singular value decomposition orthogonal correction on the point cloud covariance matrix, the initial rigid body transformation matrix of the point cloud is generated, and the global attitude coarse alignment is completed. S3. Based on the iterative nearest point algorithm, optimize the initial pose of the component point cloud, set the corresponding distance threshold to filter effective matching point pairs, and iteratively reduce the pose deviation between the model point cloud and the target point cloud; S4. Component geometric feature extraction and axial attitude correction: The center of the cross section is obtained by thin-layer slicing of the shortest axis of the point cloud and least-squares circle fitting, and the rotational alignment correction of the point cloud is completed by combining the orthogonal coordinate system of the major and minor axes. S5. Iterative fine registration of component point clouds and alignment of constraint dimension centers: The point cloud pose is refined by using a small threshold iterative nearest point algorithm, locking the translation component in the shortest axis direction, and completing precise center alignment only within the pipe cross-section to achieve high-precision registration of component point clouds.
[0005] Further, S1 includes S1.1, reading the model point cloud to be registered and the target point cloud, calculating the axis alignment bounding box of the point cloud, and identifying the longest axis of the corresponding pipe axis and the shortest axis of the corresponding cross section normal. Calculate the extreme values of the point cloud along the X, Y, and Z axes respectively to obtain the minimum vertex of the axis-aligned bounding box. With the largest vertex : ; In the formula, This is the minimum vertex 3D coordinate vector of the bounding box aligned with the corresponding point cloud axis. The maximum vertex 3D coordinate vector of the bounding box aligned with the corresponding point cloud axis. This represents the total number of points in the corresponding point cloud. For the corresponding point cloud One point, ; Calculate the side length of the bounding box for each axis. : ; In the formula, For the corresponding point cloud in the first The axial bounding box side lengths on each coordinate axis Corresponding to the X, Y, and Z axes respectively. The largest vertex of the corresponding point cloud bounding box is at the _th Coordinate components on each coordinate axis For the corresponding point cloud bounding box, the smallest vertex is at the th position. Coordinate components on each coordinate axis; The axis with the longest side is taken as the longest axis, corresponding to the axial extension of the pipe. , ; The coordinate axis with the smallest side length is taken as the shortest axis, corresponding to the normal direction of the pipe section. , ; S1.2 Sort the points along the longest axis by coordinates and trim the first and last edge points according to the preset truncation ratio. Remove non-finite invalid points and retain the point cloud of the middle stable segment. Extract the longest axis of all points in the corresponding point cloud. The coordinate components on the coordinate plane constitute a one-dimensional coordinate set. : ; For coordinate set Perform ascending sorting to obtain the sorted index sequence. ; The coordinates after sorting satisfy ; Calculate the boundary indices for retaining the first and last parts based on the truncation ratio: ; In the formula, Terminating index that is truncated at the beginning. For the truncation ratio, The starting index for truncation at the end. For floor operations, This is for rounding up; Select the first index in the index sequence To the The points corresponding to each position constitute the set of intermediate stable segment points. : ; For the intermediate stable segment point set Invalid point removal is performed to remove non-finite invalid points with non-numerical or infinite coordinates, ultimately obtaining the preprocessed valid point cloud.
[0006] Further, S2 includes S2.1, which involves centering the model point cloud and the target point cloud and calculating the covariance matrix, obtaining the principal axis eigenvectors of the point cloud through eigenvalue decomposition, and constructing an initial rotation matrix. Let the preprocessed model point cloud and the target point cloud sets be respectively , Calculate the centroid coordinates of the model point cloud respectively. and the centroid coordinates of the target point cloud : ; In the formula, The total number of valid points in the model point cloud. The total number of valid points in the target point cloud. Indexing the point cloud traversal of the model. For the target point cloud traversal index, For the first point cloud of the preprocessed model A three-dimensional coordinate point, For the preprocessed target point cloud, the first A three-dimensional coordinate point, The centroid coordinates of the model point cloud, The centroid coordinates of the target point cloud; Subtract the corresponding centroid from the coordinates of each point in the point cloud to perform centering, resulting in a centralized point set: ; In the formula, The point cloud of the model after centralized processing A three-dimensional coordinate point, The target point cloud after centralized processing Three-dimensional coordinate points; Calculate the 3×3 covariance matrix based on the centralized point set: ; In the formula, This represents the total number of valid points in the preprocessed model point cloud. This represents the total number of valid points in the target point cloud after preprocessing. For dimension The centralized model point cloud matrix, For dimension The centralized target point cloud matrix, For the 3×3 covariance matrix of the model point cloud, The target point cloud has a 3×3 covariance matrix; Eigenvalue decomposition of the covariance matrix yields the diagonal eigenvalue matrix and the corresponding orthogonal eigenvector matrix: ; In the formula, , It is a diagonal matrix whose eigenvalues are arranged in descending order. , It is a column orthogonal matrix, and the column vectors correspond to the feature vectors of the three principal axes of the point cloud in turn; Construct the initial rotation matrix based on the principal axis eigenvector matrix of the two point clouds: ; In the formula, This is the initial rotation matrix between the model point cloud and the target point cloud.
[0007] Furthermore, S2 includes S2.2, which involves orthogonally correcting the initial rotation matrix through singular value decomposition, generating an initial transformation matrix by combining the centroid difference, and completing the coarse global pose registration of the point cloud. For the initial rotation matrix Perform singular value decomposition: ; In the formula, , It is an orthogonal matrix. It is a diagonal matrix composed of singular values; Reconstruct the orthogonal rotation matrix based on the decomposition results. : ; The reconstructed rotation matrix satisfies , is a legal, distortion-free three-dimensional rigid body rotation matrix; Combining the centroid coordinates of the model point cloud Coordinates of the centroid of the target point cloud Calculate the translation vector of a rigid body transformation. : ; Based on orthogonal rotation matrix With translation vector Construct a fourth-order homogeneous initial transformation matrix : ; In the formula, It is a three-dimensional zero vector. Used for homogeneous coordinate operations; Through the homogeneous initial transformation matrix Perform a global rigid body transformation on the preprocessed model point cloud to achieve coarse global pose alignment between the model point cloud and the target point cloud.
[0008] Further, S3 includes S3.1, using the coarse registration result as the initial point cloud pose, optimizing the initial pose of the component point cloud based on the iterative nearest point algorithm, searching for the nearest neighbor corresponding point point point by point in the target point cloud, and removing abnormal matching pairs that exceed the distance limit by using a preset maximum corresponding distance threshold, thereby filtering out a set of valid corresponding points. No. In the next iteration, the transformed model point cloud set is completed. for: ; In the formula, For the first After the nth iteration, the model point cloud... A three-dimensional spatial coordinate point; The target point cloud is fixed to use the pre-processed effective point cloud: ; Search for the optimal matching point for each model point in the target point cloud, where the corresponding point index satisfies: ; In the formula, For the first point cloud in the model The index of the optimal matching point in the target point cloud; Calculate the 3D Euclidean distance between the model point and the corresponding target point: ; In the formula, For the first In the nth iteration, the model point cloud... The first point and the target point cloud The three-dimensional Euclidean distance between the points For the first After the nth iteration transformation, the model point cloud... A three-dimensional coordinate point, The first point cloud of the target A three-dimensional coordinate point, , , The first After the nth iteration, the model point cloud... The X, Y, and Z coordinate components of each point , , The target point is respectively The X, Y, and Z coordinate components of each point; Filter out items with a distance less than the maximum corresponding threshold. The matching point pairs are used as valid corresponding point pairs in the iteration to obtain a set of valid matching point pairs; No. After the next iteration of filtering is completed, we get A set of valid corresponding point pairs constitutes the set of valid matching point pairs in the current iteration. : ; In the formula, For the first The set of valid matching point pairs in the next iteration For the preprocessed target point cloud and the first Model points in round iteration The nearest neighbor corresponding point.
[0009] Furthermore, S3 includes S3.2, which constructs a registration error objective function based on the set of effective matching point pairs, solves the optimal rotation matrix and translation vector under the current iteration through singular value decomposition, iteratively updates the model point cloud pose until convergence, and completes the initial pose optimization of the model point cloud. Based on the set of valid matching points Construct a registration error objective function with the goal of minimizing the error: ; In the formula, The objective function for registration error is... For the first After the nth iteration, the model point cloud... A three-dimensional spatial coordinate point; Calculate the centroid coordinates of the model point cloud and the target point cloud in the set of valid matching point pairs respectively: ; In the formula, To effectively match the centroid coordinates of the model point cloud in the point pair set, To effectively match the centroid coordinates of the target point cloud in the point pair set; The model point cloud and the target point cloud in the set of valid matching point pairs are respectively centered: ; In the formula, The coordinates of the model point cloud after centering the model point cloud in the set of valid matching point pairs, The coordinates of the target point cloud after centering the target point cloud in the set of valid matching point pairs; After centralization, solve for the cross-covariance matrix. : ; Solving for the optimal rotation matrix after performing singular value decomposition on the matrix. Calculate the optimal translation vector using the centroid coordinates: ; In the formula, For the first The optimal translation vector is obtained by solving in the second iteration. For the first The optimal rigid body rotation matrix obtained by the next iteration; Integrating transformation parameters to construct an incremental homogeneous transformation matrix Iteratively update the global transformation matrix and the model point cloud pose: ; In the formula, To be updated after superimposing this round of incremental transformation to obtain the first The global homogeneous rigid body transformation matrix of the next iteration. For the first The global homogeneous rigid body transformation matrix accumulated over iterations. For the first The single-increment homogeneous rigid body transformation matrix obtained in the next iteration. To accumulate the latest pose of the model point cloud after all iterations and corrections, Point cloud of the model after coarse registration; The process is repeated until the error converges or the maximum number of iterations is reached, thus completing the initial pose optimization. The total number of iterations before termination is denoted as Output the model point cloud after initial pose optimization: .
[0010] Furthermore, S4 includes S4.1, taking the median position along the shortest axis of the component point cloud as the center, and cutting a thin section of the point cloud according to a set slice thickness; Extract the coordinate components of the part point cloud along the shortest axis to form a one-dimensional coordinate set. : ; In the formula, The coordinates of the point cloud of the model after iterative optimization. The coordinates of the target point cloud after preprocessing. , These represent the total number of valid points in the model point cloud and the target point cloud, respectively. when for At that time, the one-dimensional coordinate set of the model point cloud is obtained. ,when for At that time, the one-dimensional coordinate set of the target point cloud is obtained. ; Calculate the median of the shortest axis coordinates for all points within the thin-layer cross-section, and use this median as the center position of the thin-layer cross-section: ; In the formula, To perform the median calculation, ; when for At that time, the center position of the thin section of the model point cloud is obtained. ,when for At that time, the center position of the thin section of the target point cloud is obtained. ; Centered on the median position, points whose absolute deviation from the center position on the shortest axis is less than the slice thickness threshold are selected to form a point cloud of the thin-layer section: ; In the formula, This is the slice thickness threshold; when for At that time, a thin-layer cross-sectional point cloud is obtained from the model point cloud. ,when for At that time, a thin-layer cross-sectional point cloud is obtained from the target point cloud. .
[0011] Furthermore, S4 includes S4.2, which projects the thin-layer cross-sectional point cloud onto a plane perpendicular to the shortest axis. The coordinate components of the cross-sectional points on the two orthogonal coordinate axes of the cross-section are extracted to construct a two-dimensional point set. Thin-layer cross-sections of the point cloud extracted from the model point cloud. Thin-layer cross-section point cloud extracted from the target point cloud Projecting onto a two-dimensional plane, each cross-sectional coordinate component is extracted to obtain a two-dimensional point set: ; In the formula, , Perpendicular to the shortest axis The two cross-sectional coordinate axis indices, , These represent the number of valid points within the model point cloud and the target point cloud, respectively, representing the number of points within the thin-layer cross-section point cloud. , The coordinates of the two-dimensional plane corresponding to the cross-section points of the model point cloud. , The two-dimensional plane coordinates corresponding to the cross-section points of the target point cloud; Using the general equation of a circle By performing least-squares fitting on the two-dimensional point set and solving for the optimal parameters, the coordinates of the two-dimensional center of the model point cloud and the target point cloud within the cross section are obtained. ; In the formula, , These are the optimal coefficients of the general equation of a circle obtained by least squares fitting. ; when for At that time, the horizontal and vertical coordinates of the center of the two-dimensional fitting circle corresponding to the model point cloud are obtained. and ; when for At that time, the horizontal and vertical coordinates of the two-dimensional fitting circle center corresponding to the target point cloud are obtained. and ; By combining the center position of the shortest axis section, the center of the two-dimensional fitted circle is mapped back to three-dimensional space, and the coordinates of the center of the three-dimensional cross-section of the model point cloud and the target point cloud are constructed respectively: ; ; In the formula, , and , Cross-sections of the model point cloud and the target point cloud, respectively. axis, Coordinates on the axis , The coordinates of the center of the model point cloud and the target point cloud on the shortest slice axis; Solve for the center of the three-dimensional cross-section of the model point cloud respectively Center of the 3D cross section of the target point cloud .
[0012] Furthermore, S4 includes S4.3, which constructs an orthogonal coordinate system for the component point cloud based on the direction vectors of the longest and shortest axes, and solves the rotation matrix by matrix inversion and singular value decomposition orthogonal correction. Construct the third orthogonal axis of the right-hand system using the cross product of the shortest and longest axes unit vectors: ; In the formula, , The third orthogonal axis unit vector is obtained by cross product of the major and minor axis vectors of the model point cloud and the target point cloud, respectively. , Let these be the unit direction vectors of the longest and shortest axes of the model's point cloud. , These are the unit direction vectors of the longest and shortest axes of the target point cloud, respectively. This refers to the cross product operation of three-dimensional vectors. Construct a 3rd-order orthogonal basis matrix between the model point cloud and the target point cloud, using the shortest axis, longest axis, and third orthogonal axis as column vectors. , Based on the basis transformation relation, the matrix The initial rotation matrix is obtained after inversion. For the initial rotation matrix After performing singular value decomposition, reconstruct the orthogonal rotation matrix to ensure that the rotation matrix satisfies the orthogonality property and the rigid body transformation requirements; S4.4, Perform a rotation transformation on the model point cloud with the center of the target point cloud cross section as the rotation center to achieve strict alignment of the major and minor axes; By translating the model's point cloud coordinates so that the rotation center coincides with the origin, we obtain the single-point attitude correction transformation formula: ; In the formula, For the transformed point position, For attitude correction rotation matrix, Center of the 3D cross-section of the target point cloud, The coordinates in the point cloud of the model after the initial pose optimization; Decompose the single-point transformation formula into a standard rigid body transformation: ; In the formula, It is a translation vector and ; Integrating rotation matrices and translation vectors to form a homogeneous transformation matrix Based on the homogeneous matrix, the model point cloud is transformed as a whole. While keeping the center position of the target section circle unchanged, the longest axis and the shortest axis of the model point cloud are strictly consistent with the corresponding axial direction of the target point cloud, thus completing the axial attitude correction.
[0013] Further, S5 includes: Using the pose-corrected model point cloud as input, the iterative nearest-point algorithm is used for iterative pose optimization, with a distance threshold less than the pose optimization setting. Fineness threshold Only high-confidence neighboring matching point pairs are retained, and the optimal rigid body transformation is iteratively solved until convergence, outputting the finely registered model point cloud. ; S5.2. Align the center of the constrained dimension of the part point cloud by translation, recalculate the center of the three-dimensional cross section of the point cloud after iterative registration optimization; calculate the three-dimensional offset of the center of the model point cloud and the target point cloud, set the offset of the shortest axis direction to zero, retain only the two-axis translation components of the cross section and perform translation transformation to achieve alignment of the center of the cross section and keep the position of the shortest axis unchanged. Calculate the 3D offset vector between the center of the cross section of the model point cloud and the target point cloud: ; In the formula, Center of the 3D cross-section of the target point cloud. The center of the 3D cross-section of the model point cloud; By imposing dimensional constraints on the 3D offset vector, setting the offset component along the shortest axis to zero, and retaining only the translation components along the two axes of the cross-section, a constrained translation vector is obtained. : ; In the formula, To constrain the translation vector at the th Components on each coordinate axis offset vector In the Components on each coordinate axis; Construct a 4×4 homogeneous translation transformation matrix based on constrained translation vectors: ; In the formula, is a 3-order identity matrix, and 0 is the three-dimensional zero vector; Point cloud of the model after fine registration Perform a translation transformation; the coordinates of the point after the transformation are: : ; After translation, ensure that the center of the cross-section of the target point cloud and the model point cloud are aligned with each other, and lock the position of the shortest axis direction so that it does not change, thus completing the overall accurate registration of the model point cloud relative to the target point cloud based on geometric feature constraints.
[0014] Compared with the prior art, the present invention has the following beneficial effects: This invention employs a multi-level cascaded registration architecture, combining principal component analysis for coarse registration along the principal axis, iterative nearest-point fine registration, and cross-sectional geometric feature extraction techniques. Through a cross-sectional center alignment strategy using orthogonal attitude correction of major and minor axes and dimension locking, it significantly improves the centering accuracy of the pipeline cross-section while ensuring registration robustness under large initial deviations, thus meeting the application requirements for high-precision registration and quality inspection of point clouds of industrial pipeline components. Attached Figure Description
[0015] Figure 1 This is a technical flowchart of the present invention; Figure 2 A schematic diagram illustrating the process of filtering out invalid points in the preprocessing of the model point cloud; Figure 3 This is a schematic diagram illustrating the filtering of invalid points in a target point cloud after preprocessing. Figure 4 This is a schematic diagram of a slice of the truncated point cloud of a model; Figure 5 This is a schematic diagram of a slice of the target point cloud that has been truncated and preserved. Figure 6 This is a schematic diagram of least-squares fitting of circles to a segment of the model's point cloud after truncation and preservation. Figure 7 This is a schematic diagram of least-squares fitting of a circle to a truncated slice of the target point cloud; Figure 8 This is the final result of registering the model point cloud and the target point cloud using the registration method of this invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0017] A point cloud registration method for pipe component classes based on geometric feature constraints, such as Figure 1 As shown, it includes the following steps: S1 component point cloud preprocessing and axial feature recognition: Read the model point cloud and the target point cloud to be registered, traverse the three-dimensional coordinates of all points, remove non-finite invalid points with abnormal coordinate values, and obtain the initial valid point set; calculate the axis-aligned bounding boxes of the two sets of point clouds respectively, count the coordinate extreme values in the three coordinate axis directions and calculate the bounding box side length in each direction. Compare the side lengths in the three directions, determine the coordinate axis with the largest side length as the longest axis, corresponding to the extension axis of the pipe; determine the coordinate axis with the smallest side length as the shortest axis, corresponding to the normal vector of the pipe section; sort all points along the longest axis in ascending order of coordinate values, and cut off the edge points at the beginning and end of the pipe according to the set cutoff ratio to eliminate interference from pipe end defects and scanning edge noise; Calculate the extreme values of the corresponding point cloud along the X, Y, and Z axes to obtain the minimum vertex of the axis-aligned bounding box. With the largest vertex : ; In the formula, This is the minimum vertex 3D coordinate vector of the bounding box aligned with the corresponding point cloud axis. The maximum vertex 3D coordinate vector of the bounding box aligned with the corresponding point cloud axis. This represents the total number of points in the corresponding point cloud. For the corresponding point cloud One point, ; Calculate the side length of the bounding box for each axis. : ; In the formula, For the corresponding point cloud in the first The axial bounding box side lengths on each coordinate axis Corresponding to the X, Y, and Z axes respectively. The largest vertex of the corresponding point cloud bounding box is at the th Coordinate components on each coordinate axis For the corresponding point cloud bounding box, the smallest vertex is at the th position. Coordinate components on each coordinate axis; The axis with the longest side is taken as the longest axis, corresponding to the axial extension of the pipe. : ; The coordinate axis with the smallest side length is taken as the shortest axis, corresponding to the normal direction of the pipe section. : ; Extract the longest axis of all points in 3D space The coordinate components on the coordinate plane constitute a one-dimensional coordinate set. : ; For coordinate set Perform ascending sorting to obtain the sorted index sequence. ; After sorting, the coordinates satisfy: ; Calculate the boundary indices for retaining the first and last parts based on the truncation ratio: ; In the formula, Terminating index that is truncated at the beginning. For the truncation ratio, The starting index for truncation at the end. For floor operations, This is for rounding up; Select the first index in the index sequence To the The points corresponding to each position constitute the set of intermediate stable segment points. : ; For the intermediate stable segment point set Invalid point removal is performed to remove non-finite invalid points with non-numerical or infinite coordinates, ultimately obtaining the preprocessed valid point cloud.
[0018] Global coarse registration of S2 component point clouds; Based on the preprocessed point cloud data, the principal component analysis algorithm is used to perform global principal axis coarse registration between the model point cloud and the target point cloud. First, a centering process is performed, and the centroid coordinates of each point cloud are calculated. The coordinates of all points in the point cloud are subtracted from the corresponding centroid to obtain the centered point set, thus eliminating the interference of translation components on the rotation solution. The three-dimensional covariance matrix is calculated based on the centralized point set. The covariance matrix is decomposed into eigenvalues to obtain three principal axis eigenvectors arranged in descending order of eigenvalues. These eigenvectors form the principal axis orthogonal reference of the point cloud. The initial rotation matrix is constructed based on the principal axis eigenvector matrices of the model point cloud and the target point cloud. Singular value decomposition is performed on the initial rotation matrix to reconstruct a corrected rotation matrix, ensuring that the matrix satisfies the orthogonal constraint of rigid body rotation. The translation vector is calculated by combining the centroid coordinates of the model point cloud and the target point cloud. The rotation matrix and translation vector are then combined into a fourth-order homogeneous initial transformation matrix. Based on this transformation matrix, a rigid body transformation is performed on the model point cloud to achieve coarse alignment of the global pose. Let the preprocessed model point cloud and the target point cloud be respectively... , Calculate the centroid coordinates of the model point cloud respectively. and the centroid coordinates of the target point cloud : ; In the formula, The total number of valid points in the model point cloud. The total number of valid points in the target point cloud. Indexing the point cloud traversal of the model. For the target point cloud traversal index, For the first point cloud of the preprocessed model A three-dimensional coordinate point, For the preprocessed target point cloud, the first A three-dimensional coordinate point, The centroid coordinates of the model point cloud, The centroid coordinates of the target point cloud; Subtract the corresponding centroid from the coordinates of each point in the point cloud to perform centering, resulting in a centralized point set: ; In the formula, The point cloud of the model after centralized processing A three-dimensional coordinate point, The target point cloud after centralized processing Three-dimensional coordinate points; Construct based on the centralized point set 3D model point cloud matrix and 3D target point cloud matrix Calculate the 3×3 covariance matrix: ; In the formula, This represents the total number of valid points in the preprocessed model point cloud. This represents the total number of valid points in the target point cloud after preprocessing. For dimension The centralized model point cloud matrix, For dimension The centralized target point cloud matrix, For the 3×3 covariance matrix of the model point cloud, The target point cloud has a 3×3 covariance matrix; Eigenvalue decomposition of the covariance matrix yields the diagonal eigenvalue matrix and the corresponding orthogonal eigenvector matrix: ; ; In the formula, , A diagonal matrix whose eigenvalues are arranged in descending order. , It is a column orthogonal matrix, and the column vectors correspond to the feature vectors of the three principal axes of the point cloud in turn; Construct the initial rotation matrix based on the principal axis eigenvector matrix of the two point clouds: ; In the formula, This is the initial rotation matrix between the model point cloud and the target point cloud; For the initial rotation matrix Perform singular value decomposition: ; In the formula, , It is an orthogonal matrix. It is a diagonal matrix composed of singular values; To ensure that the rotation matrix satisfies the rigid body transformation constraint (determinant is 1, no mirror reflection), the orthogonal rotation matrix is reconstructed based on the decomposition results: ; The reconstructed rotation matrix satisfies , is a legal, distortion-free three-dimensional rigid body rotation matrix; Combining the centroid coordinates of the model point cloud Coordinates of the centroid of the target point cloud Calculate the translation vector of a rigid body transformation. : ; Based on orthogonal rotation matrix With translation vector Construct a fourth-order homogeneous initial transformation matrix : ; In the formula, It is a three-dimensional zero vector. Used for homogeneous coordinate operations; Through the homogeneous initial transformation matrix Perform a global rigid body transformation on the preprocessed model point cloud to achieve coarse global pose alignment between the model point cloud and the target point cloud.
[0019] S3 component point cloud initial pose optimization; Using the coarsely registered model point cloud pose as the initial position, the initial pose is optimized based on the iterative nearest point algorithm; a first maximum corresponding distance threshold is set to filter valid matching point pairs and eliminate erroneous matching relationships that are too far apart.
[0020] Iterate through the following operations in sequence: Corresponding point matching: For each point in the model point cloud under the current pose, search for the point in the target point cloud with the closest Euclidean distance as a candidate corresponding point; Valid point filtering: Only retain matching pairs whose distance is less than the first maximum corresponding distance threshold to form a valid corresponding point set; Transformation solution: Construct a cross-covariance matrix based on the effective corresponding point set, and solve for the optimal rotation matrix and translation vector under the current iteration through singular value decomposition; Pose update: Apply the transformation increment obtained in this solution to the model point cloud to update the overall pose; Repeat the iterative process until the change in registration error between two adjacent iterations is less than the convergence threshold, or the preset maximum number of iterations is reached, and output the initial optimized pose to quickly reduce the pose deviation between the two sets of point clouds. No. In the next iteration, the transformed model point cloud set is completed. for: ; In the formula, For the first After the nth iteration, the model point cloud... A three-dimensional spatial coordinate point; The target point cloud is fixed to use the pre-processed effective point cloud: ; The preset maximum corresponding distance threshold is For each Search for the optimal matching point for each model point in the target point cloud, where the corresponding point index satisfies: ; In the formula, For the first point cloud in the model The index of the optimal matching point in the target point cloud; Iteratively solve rigid body transformations to reduce the pose deviation between the model point cloud and the target point cloud; Calculate the 3D Euclidean distance between the model point and the corresponding target point: ; In the formula, For the first In the nth iteration, the model point cloud... The first point and the target point cloud The three-dimensional Euclidean distance between the points For the first After the nth iteration transformation, the model point cloud... A three-dimensional coordinate point, The first point cloud of the target A three-dimensional coordinate point, , , The first After the nth iteration, the model point cloud... The X, Y, and Z coordinate components of each point , , The target point is respectively The X, Y, and Z coordinate components of each point; Based on the maximum corresponding distance threshold Filtering for values less than the maximum corresponding distance threshold The matching point pairs are then discarded, and out-of-limit abnormal matching pairs are removed to obtain a set of valid matching point pairs; No. After the next iteration of filtering is completed, we get A set of valid corresponding point pairs constitutes a valid matching point pair set. : ; In the formula, For the first The set of valid matching point pairs in the next iteration For the preprocessed target point cloud and the first Model points in round iteration The nearest neighbor corresponding point; Based on the set of valid matching points Construct a registration error objective function with the goal of minimizing the error: ; In the formula, The objective function for registration error is... For the first After the nth iteration, the model point cloud... A three-dimensional spatial coordinate point; Calculate the centroid coordinates of the model point cloud and the target point cloud in the set of valid matching point pairs respectively: ; In the formula, To effectively match the centroid coordinates of the model point cloud in the point pair set, To effectively match the centroid coordinates of the target point cloud in the point pair set; The model point cloud and target point cloud in the set of valid matching point pairs are centered to eliminate the interference of translation components on the solution of the rotation matrix. The centering formula is as follows: ; In the formula, To center the model point cloud coordinates in the set of valid matching point pairs, The coordinates of the target point cloud after centering the target point cloud in the set of valid matching point pairs; After centering, solve for the cross-covariance matrix between the model point cloud and the target point cloud: ; Perform singular value decomposition on the cross-covariance matrix: ; In the formula, , It is a 3×3 orthogonal matrix. It is a diagonal matrix composed of singular values arranged in descending order; The optimal rotation matrix for the current iteration is obtained based on the decomposition results: ; Calculate the optimal translation vector using the centroid: ; In the formula, For the first The optimal three-dimensional translation vector obtained by solving in the second iteration For the first The optimal rigid body rotation matrix obtained from the next iteration; Construct a 4×4 homogeneous incremental transformation matrix from the rotation matrix and the translation vector: ; Update the cumulative transformation matrix and model point cloud pose: ; ; In the formula, To be updated after superimposing this round of incremental transformation to obtain the first The global homogeneous rigid body transformation matrix of the next iteration. For the first The global homogeneous rigid body transformation matrix accumulated over iterations. For the first The single-increment homogeneous rigid body transformation matrix obtained in the next iteration. To accumulate the latest pose of the model point cloud after all iterations and corrections, Point cloud of the model after coarse registration; Repeat the iteration steps until the change in registration error between adjacent iterations is less than the preset convergence threshold, or the maximum number of iterations is reached, and output the final optimized rigid body transformation matrix to complete the initial pose optimization. The total number of iterations before termination is denoted as Output the model point cloud after initial pose optimization: .
[0021] S4. Component geometric feature extraction and axial attitude correction; Extract the cross-sectional point cloud, along the shortest axis, take the median of the coordinates of all points on the shortest axis as the center position of the cross section, set the slice thickness to slice the component point cloud, and form a cross-sectional point cloud perpendicular to the shortest axis. The cross-sectional point cloud is projected onto a two-dimensional cross-sectional plane perpendicular to the shortest axis to obtain a two-dimensional point set. Using the general equation of a circle, the two-dimensional point set is fitted to a circle by the linear least squares method to obtain the coordinates of the two-dimensional circle center in the cross-section. Combined with the cross-sectional center position in the direction of the shortest axis, the coordinates of the cross-sectional circle center in three-dimensional space are restored. Construct an orthogonal coordinate system and solve for the correction rotation matrix. Extract the unit direction vectors of the longest and shortest axes of the model point cloud and the target point cloud respectively. Generate a third orthogonal axis through the three-dimensional vector cross product operation and construct an orthogonal coordinate system that conforms to the right-hand rule. Construct orthogonal basis matrices of the model point cloud and the target point cloud respectively. Obtain the initial attitude correction rotation matrix by matrix inversion. Then perform orthogonal correction through singular value decomposition to obtain the attitude correction rotation matrix that satisfies rigid body constraints. Using the center of the cross-section of the target point cloud as the rotation center, perform a rotation transformation on the model point cloud so that the position of the rotation center remains unchanged after the transformation. After the transformation, the longest axis and the shortest axis of the model point cloud are strictly aligned with those of the target point cloud, thus completing the axial attitude correction.
[0022] Extract the coordinate components of the part point cloud along the shortest axis to form a one-dimensional coordinate set. : ; In the formula, The coordinates of the point cloud of the model after iterative optimization. The coordinates of the target point cloud after preprocessing. , These represent the total number of valid points in the model point cloud and the target point cloud, respectively. when for At that time, the one-dimensional coordinate set of the model point cloud is obtained. ,when for At that time, the one-dimensional coordinate set of the target point cloud is obtained. ; Calculate the median of the shortest axis coordinates for all points within the thin-layer cross-section, and use this median as the center position of the thin-layer cross-section: ; In the formula, To perform the median calculation, ; when for At that time, the center position of the thin section of the model point cloud is obtained. ,when for At that time, the center position of the thin section of the target point cloud is obtained. ; Centered on the median position, points whose absolute deviation from the center position on the shortest axis is less than the slice thickness threshold are selected to form a point cloud of the thin-layer section: ; In the formula, This is the slice thickness threshold; when for At that time, a thin-layer cross-sectional point cloud is obtained from the model point cloud. ,when for At that time, a thin-layer cross-sectional point cloud is obtained from the target point cloud. ; Thin-layer cross-sections of the point cloud extracted from the model point cloud. Thin-layer cross-section point cloud extracted from the target point cloud Projecting onto a two-dimensional plane, each cross-sectional coordinate component is extracted to obtain a two-dimensional point set: ; In the formula, , Perpendicular to the shortest axis The two cross-sectional coordinate axis indices, , These represent the number of valid points within the model point cloud and the target point cloud, respectively, representing the number of points within the thin-layer cross-section point cloud. , The coordinates of the two-dimensional plane corresponding to the cross-section points of the model point cloud. , The two-dimensional plane coordinates corresponding to the cross-section points of the target point cloud; Algebraic fitting of a two-dimensional point set is performed using the general equation of a circle: ; In the formula, D, E, and F are the parameters of the circle equation to be solved; Substituting a two-dimensional point set into the general equation of a circle, we construct an overdetermined system of linear equations, which can be written in matrix form. : ; The objective is to find the least-squares solution to the overdetermined system of equations by minimizing the sum of squared residuals at all points. The optimal parameter vector is obtained by solving the problem. To obtain the fitting parameters , , ; Calculate the two-dimensional coordinates of the center of the model point cloud and the target point cloud within the cross-section: ; In the formula, , These are the optimal coefficients of the general equation of a circle obtained by least squares fitting. ; when for At that time, the horizontal and vertical coordinates of the center of the two-dimensional fitting circle corresponding to the model point cloud are obtained. and ; when for At that time, the horizontal and vertical coordinates of the two-dimensional fitting circle center corresponding to the target point cloud are obtained. and ; By combining the center position of the shortest axis section, the center of the two-dimensional fitted circle is mapped back to three-dimensional space, and the coordinates of the center of the three-dimensional cross-section of the model point cloud and the target point cloud are constructed respectively: ; ; In the formula, , and , Cross-sections of the model point cloud and the target point cloud, respectively. axis, Coordinates on the axis , The coordinates of the center of the model point cloud and the target point cloud on the shortest slice axis; Solve for the center of the three-dimensional cross-section of the model point cloud respectively Center of the 3D cross section of the target point cloud ; A third orthogonal axis is generated by the cross product of three-dimensional vectors, ensuring that the coordinate system satisfies the right-hand orthogonality: ; In the formula, , The third orthogonal axis unit vector is obtained by cross product of the major and minor axis vectors of the model point cloud and the target point cloud, respectively. , Let these be the unit direction vectors of the longest and shortest axes of the model's point cloud. , These are the unit direction vectors of the longest and shortest axes of the target point cloud, respectively. This refers to the cross product operation of three-dimensional vectors. Construct the 3rd order orthogonal basis matrices of the model point cloud and the target point cloud, using the shortest axis, longest axis, and third orthogonal axis as column vectors respectively: ; ; In the formula, Establish a local orthogonal coordinate system basis for the model's point cloud. Let the local orthogonal coordinate system be the basis for the target point cloud; Due to numerical calculation errors, the initial rotation matrix It may not satisfy the strict rigid body orthogonality constraint, so we perform singular value decomposition on it: ; In the formula, , It is a 3×3 orthogonal matrix. It is a diagonal matrix composed of singular values arranged in descending order; The rotation matrix is reconstructed based on the decomposition results, ensuring that it satisfies the orthogonality and rigid body transformation constraints with a determinant of 1. By translating the model's point cloud coordinates so that the rotation center coincides with the origin, we obtain the single-point attitude correction transformation formula: ; In the formula, These are the three-dimensional coordinates of the points in the transformed model. For attitude correction rotation matrix, Center of the 3D cross-section of the target point cloud, The coordinates in the point cloud of the model after the initial pose optimization; Decompose the single-point transformation formula into a standard rigid body transformation: ; In the formula, It is a translation vector and ; The rotation matrix and translation vector are integrated into a general 4×4 homogeneous attitude correction transformation matrix for point cloud registration. : ; The homogeneous attitude correction transformation matrix is constructed. A unified rigid body transformation is performed on the model point cloud. During the transformation, the target point cloud remains fixed and the center position of the target cross section remains constant. Only the spatial attitude and orientation of the model point cloud are adjusted, so that the longest extension axis and the shortest cross section normal axis of the model point cloud are strictly aligned with the corresponding axis of the target point cloud. This completely eliminates the axial attitude deviation between the two point clouds, completes high-precision axial attitude correction, and provides the initial point cloud with attitude alignment for subsequent fine iterative registration.
[0023] Using the pose-corrected model point cloud as input, the iterative nearest-point algorithm is used for iterative pose optimization, with a maximum corresponding distance threshold less than the pose optimization setting. Fineness threshold Only high-confidence neighboring matching point pairs are retained, and the optimal rigid body transformation is iteratively solved until convergence, outputting the finely registered model point cloud. ; Calculate the 3D offset vector between the center of the cross section of the model point cloud and the target point cloud: ; In the formula, Center of the 3D cross-section of the target point cloud. The center of the 3D cross-section of the model point cloud; By imposing dimensional constraints on the 3D offset vector, setting the offset component along the shortest axis to zero, and retaining only the translation components along the two axes of the cross-section, a constrained translation vector is obtained. : ; In the formula, To constrain the translation vector at the th Components on each coordinate axis offset vector In the Components on each coordinate axis; Construct a 4×4 homogeneous translation transformation matrix based on constrained translation vectors: ; In the formula, is a 3-order identity matrix, and 0 is the three-dimensional zero vector; Point cloud of the model after fine registration Perform a translation transformation; the coordinates of the point after the transformation are: : ; After translation, ensure that the center of the cross-section of the target point cloud and the model point cloud are aligned with each other, and lock the position of the shortest axis direction so that it does not change, thus completing the overall accurate registration of the model point cloud relative to the target point cloud based on geometric feature constraints.
[0024] The technical flowchart of this invention is as follows: Figure 1 As shown, the process includes reading and preprocessing point cloud data of pipeline components, coarse registration of the principal axes of the component point cloud, optimization of the initial pose of the point cloud, extraction of geometric features of the pipeline components, iterative optimization of the component pose, constraint based on the coordinate dimension of the circle center, and the registration results of the component point cloud. Specifically, reading and preprocessing the point cloud data of the pipeline components includes identifying the longest and shortest axes of the component point cloud and filtering out invalid points. Extracting the geometric features of the pipeline components includes slicing along the shortest axis, fitting the slice to the circle center, and identifying the dimensions of the longest and shortest axes.
[0025] The intermediate valid parts retained after preprocessing the model point cloud and the target point cloud to filter out invalid points are as follows: Figure 2 and Figure 3As shown, the truncation ratio of both the model point cloud and the target point cloud is 13%; the resulting slices of the truncated parts of the model point cloud and the target point cloud are shown in the figure. Figure 4 and Figure 5 As shown, in this embodiment, the model point cloud and the target point cloud use the same axial slice thickness, which is set to 0.01. The results of least-squares circle fitting of the truncated and retained slices of the model point cloud and the target point cloud are as follows: Figure 6 and Figure 7 As shown; geometric constraints are constructed based on the axial centerline formed by the centers of the layers of cross-sections, thereby locking the initial alignment relationship of the two sets of point clouds for coarse registration and narrowing the iterative search range for subsequent fine registration. The results of registering the model point cloud and the target point cloud based on the method of this invention are as follows. Figure 8 As shown, by relying on the cross-sectional center constraint to optimize the registration convergence efficiency, the registration and fitting accuracy of the point cloud of the ring clamp type component is effectively improved.
[0026] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A point cloud registration method for pipe component classes based on geometric feature constraints, characterized in that, Includes the following steps: S1. Point cloud preprocessing and axial feature recognition: complete invalid point filtering, automatic identification of the major and minor axes of the pipeline point cloud, and perform end proportional truncation processing on the longest axis of the point cloud to remove edge interference points; S2. Based on the principal component analysis algorithm, the component point cloud is coarsely registered. By performing eigenvalue decomposition and singular value decomposition orthogonal correction on the point cloud covariance matrix, the initial rigid body transformation matrix of the point cloud is generated, and the global attitude coarse alignment is completed. S3. Based on the iterative nearest point algorithm, optimize the initial pose of the component point cloud, set the corresponding distance threshold to filter effective matching point pairs, and iteratively reduce the pose deviation between the model point cloud and the target point cloud; S4. Component geometric feature extraction and axial attitude correction: The center of the cross section is obtained by thin-layer slicing of the shortest axis of the point cloud and least-squares circle fitting, and the rotational alignment correction of the point cloud is completed by combining the orthogonal coordinate system of the major and minor axes. S5. Iterative fine registration of component point clouds and alignment of constraint dimension centers: The point cloud pose is refined by using a small threshold iterative nearest point algorithm, locking the translation component in the shortest axis direction, and completing precise center alignment only within the pipe cross-section to achieve high-precision registration of component point clouds.
2. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S1 includes S1.1, reading the model point cloud to be registered and the target point cloud, calculating the axis alignment bounding box of the point cloud, and identifying the longest axis of the corresponding pipe axis and the shortest axis of the corresponding cross section normal. Calculate the extreme values of the point cloud along the X, Y, and Z axes respectively to obtain the minimum vertex of the axis-aligned bounding box. With the largest vertex : ; In the formula, This is the minimum vertex 3D coordinate vector of the bounding box aligned with the corresponding point cloud axis. The maximum vertex 3D coordinate vector of the bounding box aligned with the corresponding point cloud axis. This represents the total number of points in the corresponding point cloud. For the corresponding point cloud One point, ; Calculate the side length of the bounding box for each axis. : ; In the formula, For the corresponding point cloud in the first The axial bounding box side lengths on each coordinate axis Corresponding to the X, Y, and Z axes respectively. The largest vertex of the corresponding point cloud bounding box is at the th Coordinate components on each coordinate axis The smallest vertex of the corresponding point cloud bounding box is at the th Coordinate components on each coordinate axis; The axis with the longest side is taken as the longest axis, corresponding to the axial extension of the pipe. , ; The coordinate axis with the smallest side length is taken as the shortest axis, corresponding to the normal direction of the pipe section. , ; S1.2 Sort the points along the longest axis by coordinates and trim the first and last edge points according to the preset truncation ratio. Remove non-finite invalid points and retain the point cloud of the middle stable segment. Extract all points from the corresponding point cloud along the longest axis The coordinate components on the coordinate plane constitute a one-dimensional coordinate set. : ; For coordinate set Perform ascending sorting to obtain the sorted index sequence. ; The coordinates after sorting satisfy ; Calculate the boundary indices for retaining the first and last parts based on the truncation ratio: ; In the formula, Terminating index that is truncated at the beginning. For the truncation ratio, The starting index for truncation at the end. For floor operations, This is for rounding up; Select the first index in the index sequence To the The points corresponding to each position constitute the set of intermediate stable segment points. : ; For the intermediate stable segment point set Invalid point removal is performed to remove non-finite invalid points with non-numerical or infinite coordinates, ultimately obtaining the preprocessed valid point cloud.
3. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S2 includes S2.1, which performs centering processing on the model point cloud and the target point cloud and calculates the covariance matrix, obtains the principal axis eigenvectors of the point cloud through eigenvalue decomposition and constructs the initial rotation matrix; Let the preprocessed model point cloud and the target point cloud sets be respectively , Calculate the centroid coordinates of the model point cloud respectively. and the centroid coordinates of the target point cloud : ; In the formula, The total number of valid points in the model point cloud. The total number of valid points in the target point cloud. Indexing the point cloud traversal of the model. For the target point cloud traversal index, For the first point cloud of the preprocessed model A three-dimensional coordinate point, For the preprocessed target point cloud, the first A three-dimensional coordinate point, The centroid coordinates of the model point cloud, The centroid coordinates of the target point cloud; Subtract the corresponding centroid from the coordinates of each point in the point cloud to perform centering, resulting in a centralized point set: ; In the formula, The point cloud of the model after centralized processing A three-dimensional coordinate point, The target point cloud after centralized processing Three-dimensional coordinate points; Calculate the 3×3 covariance matrix based on the centralized point set: ; In the formula, This represents the total number of valid points in the preprocessed model point cloud. This represents the total number of valid points in the target point cloud after preprocessing. For dimension The centralized model point cloud matrix, For dimension The centralized target point cloud matrix, For the 3×3 covariance matrix of the model point cloud, The target point cloud has a 3×3 covariance matrix; Eigenvalue decomposition of the covariance matrix yields the diagonal eigenvalue matrix and the corresponding orthogonal eigenvector matrix: ; In the formula, , It is a diagonal matrix whose eigenvalues are arranged in descending order. , It is a column orthogonal matrix, and the column vectors correspond to the feature vectors of the three principal axes of the point cloud in turn; Construct the initial rotation matrix based on the principal axis eigenvector matrix of the two point clouds: ; In the formula, This is the initial rotation matrix between the model point cloud and the target point cloud.
4. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S2 includes S2.2, which performs orthogonal correction on the initial rotation matrix through singular value decomposition, and generates an initial transformation matrix by combining the centroid difference to complete the coarse global pose registration of the point cloud. For the initial rotation matrix Perform singular value decomposition: ; In the formula, , It is an orthogonal matrix. It is a diagonal matrix composed of singular values; Reconstruct the orthogonal rotation matrix based on the decomposition results. : ; The reconstructed rotation matrix satisfies , is a legal, distortion-free three-dimensional rigid body rotation matrix; Combining the centroid coordinates of the model point cloud Coordinates of the centroid of the target point cloud Calculate the translation vector of a rigid body transformation. : ; Based on orthogonal rotation matrix With translation vector Construct a fourth-order homogeneous initial transformation matrix : ; In the formula, It is a three-dimensional zero vector. Used for homogeneous coordinate operations; Through the homogeneous initial transformation matrix Perform a global rigid body transformation on the preprocessed model point cloud to achieve coarse global pose alignment between the model point cloud and the target point cloud.
5. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S3 includes S3.1, which uses the coarse registration result as the initial point cloud pose, optimizes the initial pose of the component point cloud based on the iterative nearest point algorithm, searches for the nearest neighbor corresponding point in the target point cloud point by point, and removes abnormal matching pairs with excessive distance by a preset maximum corresponding distance threshold, thereby filtering out the effective corresponding point set. No. In the next iteration, the transformed model point cloud set is completed. for: ; In the formula, For the first After the nth iteration, the model point cloud... A three-dimensional spatial coordinate point; The target point cloud is fixed to use the pre-processed effective point cloud: ; Search for the optimal matching point for each model point in the target point cloud, where the corresponding point index satisfies: ; In the formula, For the first point cloud in the model The index of the optimal matching point in the target point cloud; Calculate the 3D Euclidean distance between the model point and the corresponding target point: ; In the formula, For the first In the nth iteration, the model point cloud... The first point and the target point cloud The three-dimensional Euclidean distance between the points For the first After the nth iteration transformation, the model point cloud... A three-dimensional coordinate point, The first point cloud of the target A three-dimensional coordinate point, , , The first After the nth iteration, the model point cloud... The X, Y, and Z coordinate components of each point , , The target point is respectively The X, Y, and Z coordinate components of each point; Filter out items with a distance less than the maximum corresponding threshold. The matching point pairs are used as valid corresponding point pairs in the iteration to obtain the set of valid matching point pairs; No. After the next iteration of filtering is completed, we get A set of valid corresponding point pairs constitutes the set of valid matching point pairs in the current iteration. : ; In the formula, For the first The set of valid matching point pairs in the next iteration For the preprocessed target point cloud and the first Model points in round iteration The nearest neighbor corresponding point.
6. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S3 includes S3.2, which constructs a registration error objective function based on the set of effective matching point pairs, solves the optimal rotation matrix and translation vector under the current iteration through singular value decomposition, iteratively updates the model point cloud pose until convergence, and completes the initial pose optimization of the model point cloud. Based on the set of valid matching points Construct a registration error objective function with the goal of minimizing the error: ; In the formula, The objective function for registration error is... For the first After the nth iteration, the model point cloud... A three-dimensional spatial coordinate point; Calculate the centroid coordinates of the model point cloud and the target point cloud in the set of valid matching point pairs respectively: ; In the formula, To effectively match the centroid coordinates of the model point cloud in the point pair set, To effectively match the centroid coordinates of the target point cloud in the point pair set; The model point cloud and the target point cloud in the set of valid matching point pairs are respectively centered: ; In the formula, The coordinates of the model point cloud after centering the model point cloud in the set of valid matching point pairs, The coordinates of the target point cloud after centering the target point cloud in the set of valid matching point pairs; After centralization, solve for the cross-covariance matrix. : ; Solving for the optimal rotation matrix after performing singular value decomposition on the matrix. Calculate the optimal translation vector using the centroid coordinates: ; In the formula, For the first The optimal translation vector is obtained by solving in the second iteration. For the first The optimal rigid body rotation matrix obtained by the next iteration; Integrating transformation parameters to construct an incremental homogeneous transformation matrix Iteratively update the global transformation matrix and the model point cloud pose: ; In the formula, To be updated after superimposing this round of incremental transformation to obtain the first The global homogeneous rigid body transformation matrix of the next iteration. For the first The global homogeneous rigid body transformation matrix accumulated over iterations. For the first The single-increment homogeneous rigid body transformation matrix obtained in the next iteration. To accumulate the latest pose of the model point cloud after all iterations and corrections, Point cloud of the model after coarse registration; The process is repeated until the error converges or the maximum number of iterations is reached, thus completing the initial pose optimization. The total number of iterations before the iteration terminates is denoted as Output the model point cloud after initial pose optimization: 。 7. The point cloud registration method for pipe components based on geometric feature constraints according to claim 1, characterized in that, S4 includes S4.1, which involves taking the median position along the shortest axis of the component point cloud as the center and cutting a thin section of the point cloud according to a set slice thickness. Extract the coordinate components of the part point cloud along the shortest axis to form a one-dimensional coordinate set. : ; In the formula, The coordinates of the point cloud of the model after iterative optimization. The coordinates of the target point cloud after preprocessing. , These represent the total number of valid points in the model point cloud and the target point cloud, respectively. when for At that time, the one-dimensional coordinate set of the model point cloud is obtained. ,when for At that time, the one-dimensional coordinate set of the target point cloud is obtained. ; Calculate the median of the shortest axis coordinates for all points within the thin-layer cross-section, and use this median as the center position of the thin-layer cross-section: ; In the formula, To perform the median calculation, ; when for At that time, the center position of the thin section of the model point cloud is obtained. ,when for At that time, the center position of the thin section of the target point cloud is obtained. ; Centered on the median position, points whose absolute deviation from the center position on the shortest axis is less than the slice thickness threshold are selected to form a point cloud of the thin-layer section: ; In the formula, This is the slice thickness threshold; when for At that time, a thin-layer cross-sectional point cloud is obtained from the model point cloud. ,when for At that time, a thin-layer cross-sectional point cloud is obtained from the target point cloud. .
8. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S4 includes S4.2, which projects the thin-layer cross-sectional point cloud onto a plane perpendicular to the shortest axis. The coordinate components of the cross-sectional points on the two orthogonal coordinate axes of the cross-section are extracted to construct a two-dimensional point set. Thin-layer cross-sections of the point cloud extracted from the model point cloud. Thin-layer cross-section point cloud extracted from the target point cloud Projecting onto a two-dimensional plane, each cross-sectional coordinate component is extracted to obtain a two-dimensional point set: ; In the formula, , Perpendicular to the shortest axis The two cross-sectional coordinate axis indices, , These represent the number of valid points within the model point cloud and the target point cloud, respectively, representing the number of points within the thin-layer cross-section point cloud. , The coordinates of the two-dimensional plane corresponding to the cross-section points of the model point cloud. , The two-dimensional plane coordinates corresponding to the cross-section points of the target point cloud; Using the general equation of a circle By performing least-squares fitting on the two-dimensional point set and solving for the optimal parameters, the coordinates of the two-dimensional center of the model point cloud and the target point cloud within the cross section are obtained. ; In the formula, , These are the optimal coefficients of the general equation of a circle obtained by least squares fitting. ; when for At that time, the horizontal and vertical coordinates of the center of the two-dimensional fitting circle corresponding to the model point cloud are obtained. and ; when for At that time, the horizontal and vertical coordinates of the center of the two-dimensional fitted circle corresponding to the target point cloud are obtained. and ; By combining the center position of the shortest axis section, the center of the two-dimensional fitted circle is mapped back to three-dimensional space, and the coordinates of the center of the three-dimensional cross-section of the model point cloud and the target point cloud are constructed respectively: ; ; In the formula, , and , Cross-sections of the model point cloud and the target point cloud, respectively. axis, Coordinates on the axis , The coordinates of the center of the model point cloud and the target point cloud on the shortest slice axis; Solve for the center of the three-dimensional cross-section of the model point cloud respectively Center of the 3D cross section of the target point cloud .
9. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S4 includes S4.3, which constructs an orthogonal coordinate system for the component point cloud based on the direction vectors of the longest and shortest axes, and solves the rotation matrix by matrix inversion and singular value decomposition orthogonal correction. Construct the third orthogonal axis of the right-hand system using the cross product of the shortest and longest axes unit vectors: ; In the formula, , The third orthogonal axis unit vector is obtained by cross product of the major and minor axis vectors of the model point cloud and the target point cloud, respectively. , Let these be the unit direction vectors of the longest and shortest axes of the model's point cloud. , These are the unit direction vectors of the longest and shortest axes of the target point cloud, respectively. This refers to the cross product operation of three-dimensional vectors. Construct a 3rd-order orthogonal basis matrix between the model point cloud and the target point cloud, using the shortest axis, longest axis, and third orthogonal axis as column vectors. , Based on the basis transformation relation, the matrix The initial rotation matrix is obtained after inversion. For the initial rotation matrix After performing singular value decomposition, reconstruct the orthogonal rotation matrix to ensure that the rotation matrix satisfies the orthogonality property and the rigid body transformation requirements; S4.4, Perform a rotation transformation on the model point cloud with the center of the target point cloud cross section as the rotation center to achieve strict alignment of the major and minor axes; By translating the model's point cloud coordinates so that the rotation center coincides with the origin, we obtain the single-point attitude correction transformation formula: ; In the formula, The transformed point position, For attitude correction rotation matrix, Center of the 3D cross-section of the target point cloud, The coordinates in the point cloud of the model after the initial pose optimization; Decompose the single-point transformation formula into a standard rigid body transformation: ; In the formula, It is a translation vector and ; Integrating rotation matrices and translation vectors to form a homogeneous transformation matrix Based on the homogeneous matrix, the model point cloud is transformed as a whole. While keeping the center position of the target section circle unchanged, the longest axis and the shortest axis of the model point cloud are strictly consistent with the corresponding axial direction of the target point cloud, thus completing the axial attitude correction.
10. The point cloud registration method for pipeline components based on geometric feature constraints according to claim 1, characterized in that, S5 includes: Using the pose-corrected model point cloud as input, the iterative nearest-point algorithm is used for iterative pose optimization, with a distance threshold less than the pose optimization setting. Fineness threshold Only high-confidence neighboring matching point pairs are retained, and the optimal rigid body transformation is iteratively solved until convergence, outputting the finely registered model point cloud. ; S5.
2. Align the center of the constrained dimension of the part point cloud by translation, recalculate the center of the three-dimensional cross section of the point cloud after iterative registration optimization; calculate the three-dimensional offset of the center of the model point cloud and the target point cloud, set the offset of the shortest axis direction to zero, retain only the two-axis translation components of the cross section and perform translation transformation to achieve alignment of the center of the cross section and keep the position of the shortest axis unchanged. Calculate the 3D offset vector between the center of the cross section of the model point cloud and the target point cloud: ; In the formula, Center of the 3D cross-section of the target point cloud. The center of the 3D cross-section of the model point cloud; Dimensional constraints are applied to the 3D offset vector: the offset component along the shortest axis is set to zero, and only the translation components along the two axes of the cross-section are retained, resulting in a constrained translation vector. : ; In the formula, To constrain the translation vector at the th Components on each coordinate axis offset vector In the Components on each coordinate axis; Construct a 4×4 homogeneous translation transformation matrix based on constrained translation vectors: ; In the formula, is a 3-order identity matrix, and 0 is the three-dimensional zero vector; Point cloud of the model after fine registration Perform a translation transformation; the coordinates of the point after the transformation are: : ; After translation, ensure that the center of the cross-section of the target point cloud and the model point cloud are aligned with each other, and lock the position of the shortest axis direction so that it does not change, thus completing the overall accurate registration of the model point cloud relative to the target point cloud based on geometric feature constraints.