High-precision segment point cloud and design model registration method
Through improved particle swarm optimization algorithm and multi-dimensional optimization strategy, combined with geometric constraints and prior knowledge, high-precision and efficient registration of pipe segment point clouds and design models is achieved, solving the problems of low detection accuracy and high computational complexity in traditional methods, and is suitable for tunnel engineering and pipe segment manufacturing.
Patent Information
- Application Number
- CN202510315074.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the three-dimensional scanning measurement method has large position deviations and excessive cumulative errors when detecting the pipe sheet width, resulting in low detection accuracy. The traditional algorithm has high computational complexity and long-term time, making it difficult to achieve efficient and accurate pipe sheet width measurement.
The improved particle swarm optimization algorithm (PSO) combined with multi-dimensional optimization strategy is used to initially convert the pipe slice point cloud through the rotation matrix and translation parameters, combine geometric constraints and prior knowledge to infer the initial search range, use the extreme value difference after rotation to determine the translation parameters, build a transformation matrix for iterative conversion, and realize high-precision registration of the pipe slice point cloud and design model.
It greatly improves the registration accuracy and efficiency of the pipe segment point cloud and design model, avoids local optimal traps, ensures the accuracy and engineering quality of the detection points, and is suitable for large-scale pipe segment batch processing.
Smart Images

Figure BDA0005315723520000032 
Figure BDA0005315723520000041 
Figure BDA0005315723520000042
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tunnel segment production and manufacturing, and particularly to a method for registering a high-precision segment point cloud with a design model. Background Art
[0002] In related fields such as shield tunnel construction and segment production and manufacturing, the detection accuracy requirements for segment finished products are very high. Based on the method of three-dimensional scanning measurement, the position of the width detection points is obtained through circular arc fitting and two-dimensional drawing coordinate input. Since the two-dimensional coordinates are theoretical values and the circular arc fitting error is relatively large, the position of the obtained detection points deviates greatly from the actual position. Since the plane where the segment width points are located is an inclined plane in two directions, the final cumulative error is too large, affecting the width accuracy, and the accurate position of the segment width measurement points cannot be accurately located. In addition, the conventional algorithm has a high computational complexity and large resource consumption, making the registration process time-consuming and seriously restricting the engineering construction efficiency and production progress. Most algorithms are prone to falling into the dilemma of local optimal solutions. Especially when dealing with the point cloud of objects with complex structures and variability such as segments, the phenomenon of local convergence occurs frequently, resulting in the registration result deviating from the true optimal state and unable to provide reliable data support for the project. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for registering a high-precision segment point cloud with a design model, and solve the technical problem that the position of the detection points obtained by the traditional three-dimensional scanning measurement method deviates greatly from the actual position, and due to the inclined plane in two directions where the segment width points are located, the final cumulative error is too large, affecting the width accuracy.
[0004] To achieve the above purpose, the present invention adopts the following technical solutions.
[0005] A method for registering a high-precision segment point cloud with a design model includes the following steps.
[0006] Step 1: Collect the segment point cloud.
[0007] Step 2: Construct the registration point cloud and construct the corresponding design model point cloud.
[0008] Step 3: Based on the design model of the segment and the registration point cloud data, combined with the geometric constraints and prior knowledge of the segment design model, infer the initial search range of the rotation angle and translation parameters of the particle swarm in the registration point cloud.
[0009] Step 4: Generate the initial positions and velocities of the particles within the initial search range, so that the particles are evenly distributed in the search space during the initialization stage.
[0010] Step 5: Construct the rotation matrix.
[0011] Step 6: Randomly select the initial rotation angle (α within the range of (-π, π) i(0), β(0), γ i (0)), the initial rotation angle (α of the particle i (0), β i (0), γ i (0)) is substituted into the rotation matrix to construct the initial rotation matrix.
[0012] Step 7: Obtain the rotated registered point cloud coordinates after rotation according to the constructed initial rotation matrix.
[0013] Step 8: Determine the floating range of the translation parameters of the rotated registered point cloud: The difference between the extreme values of the designed model point cloud in the X, Y, and Z directions and the extreme values of the rotated registered point cloud is used as the floating range of the translation parameters.
[0014] Step 9: Randomly select the initial translation parameters within the floating range of the translation parameters.
[0015] Step 10: Perform a translation transformation on the rotated registered point cloud.
[0016] Step 11: Repeat the process of Step 7 to Step 10.
[0017] Step 12: When the difference between the extreme values of the designed model point cloud in the X, Y, and Z directions and the extreme values of the rotated registered point cloud is less than the limit value, construct the complete transformation matrix.
[0018] Step 13: Apply the transformation matrix to transform the registered point cloud after the translation transformation in Step 11.
[0019] Step 14: Evaluate the fitness of the registered point cloud and the designed model point cloud.
[0020] Step 15: If the convergence condition is met, output the rotation parameters and translation parameters, and the registration is completed.
[0021] Preferably, the specific method for collecting the segment point cloud in Step 1 is: Use a high-precision laser scanner or photogrammetry technology to obtain the point cloud data on the surface of the segment; the point cloud data contains the geometric information of the segment, which is a set of three-dimensional point coordinates obtained by the scanning device.
[0022] Preferably, the specific method for constructing the registered point cloud in Step 2 is: In the point cloud collected in Step 1, respectively take the maximum and minimum value points in the X, Y, and Z directions, a total of 6 extreme value points, and randomly sample the point cloud except the extreme value points; the designed model point cloud is a point cloud generated based on the CAD design model or a point cloud obtained by scanning an existing design template.
[0023] Preferably, in Step 4, the generation method of the initial position of the particle is uniform distribution or stratified uniform distribution; among them,
[0024] In a uniform distribution, the initial positions of each particle are randomly selected uniformly in each dimension. The specific process is as follows: If the value range of each dimension of the search space is [x min , x max , then the initial position p i of the particle in each dimension is generated by the following formula:
[0025] p i = x min + (x max - x min ) × rand(0, 1);
[0026] where rand(0, 1) generates a random number in the range [0, 1], ensuring that the positions of the particles are uniformly distributed within the specified range;
[0027] The method of hierarchical uniform distribution is: divide the search space into several uniform grids and place each particle in a different grid cell.
[0028] Preferably, in step four, the generation method of the initial velocity of the particle is uniform distribution velocity and initial velocity range setting; where
[0029] In the uniform distribution velocity, the generation of the initial velocity needs to be uniformly distributed within the velocity range of the search space. The specific process is as follows:
[0030] If the velocity range of each dimension is [v min , v max , the initial velocity v i of the particle is generated by the following formula:
[0031] v i = v min + (v max - v min ) × rand(0, 1);
[0032] where rand(0, 1) generates a random number in the range [0, 1];
[0033] The method of initial velocity range setting is: Given that the position range of the particle is [x min , x max , select the velocity range [v min , v max , then set the velocity range as [v min , v max = ±α(x max - x min ), where α is a constant.
[0034] Preferably, the initial search range of the rotation angle in step three is limited to a uniform distribution within -180° to 180°, and the initial search range of the translation parameter is uniformly distributed within the extreme value difference between the design model and the registered point cloud.
[0035] Preferably, the rotation matrix in step six is constructed as follows: For the initial particle swarm with initial Euler angles (α, β, γ), the rotation matrix is:
[0036] R i (t) = (R i1 (t), R i2 (t), R i3 (t));
[0037] where
[0038]
[0039] i is the particle number, and t represents the number of times the particle swarm is transformed; randomly select the initial rotation angles (α i (0), β i (0), γ i (0)) within (-π, π), and substitute (α i (0), β i (0), γ i (0)) into the formula R i (t) = (R i1 (t), R i2 (t), R i3 (t)), then the initial rotation matrix R i (0) can be obtained.
[0040] Preferably, the floating range of the translation parameter in step eight is as follows:
[0041] Assume that the extreme values of the rotated registered point cloud on the X, Y, and Z axes are (x min , x max ), (y min , y max ), (z min , z max ),
[0042] The extreme values of the design model on the X, Y, and Z axes are (x min_design , x max_design ), (y min_design , y max_design ), (z min_design , z max_design ), then the floating range of the translation can be determined by calculating the difference of these extreme values, and the calculation formula is as follows:
[0043] Δx = ∣x max - x min -(x max_design - x min_design )∣;
[0044] Δy = ∣y max - y min -(y max_design - y min_design )∣;
[0045] Δz = ∣z max - z min -(z max_design - z min_design )∣.
[0046] Preferably, when the difference between the extreme values of the design model point cloud in the X, Y, and Z directions and the extreme values of the rotated registered point cloud is less than 5 mm in Step Twelve, the constructed transformation matrix is as follows:
[0047]
[0048] RT i (t) = R i (t) + T i (t);
[0049] Wherein, T i (t) is the current translation vector, T i (t) = (Δx i (t), Δy i (t), Δz i (t)); R i (t) = (R i1 (t), R i2 (t), R i3 (t));
[0050] The method for transforming the registered point cloud in Step Thirteen is as follows:
[0051] Taking (α i (t), β i (t), γ i (t), x i (t), y i (t), z i (t)) as P i (t) of the current state of particle i, substituting P i (t) of the state of particle i after translation in Step Eleven into the transformation matrix, constructing the transformation matrix of RT i (t), and then transforming the registered point cloud.
[0052] Preferably, the method for evaluating the fitness of the registered point cloud and the designed model point cloud in step fourteen is as follows:
[0053] Use a KD tree to calculate the average distance from the points on the registered point cloud to the nearest points on the designed model point cloud after transforming the registered point cloud with the rotation parameters and translation parameters of particle i at the t-th iteration in the new pose, that is, the fitness function value is F i (t):
[0054]
[0055] f k (P i (t)) = min(‖q1 - (R i (t)S k + T i (t))‖1, …, ‖q m - (R i (t)S k + T i (t))‖1);
[0056] Where: i represents the particle number in the particle swarm, S k is the coordinate of the k-th point in the registered point cloud, q m is the coordinate of the m-th point in the designed model point cloud; f i k represents the distance from the k-th point on the registered point cloud to the nearest point on the theoretical digital model after transforming the registered point cloud with the parameters of particle i in the t-th iteration;
[0057] In step fourteen, when F i (t) is less than or equal to 1, the convergence condition is satisfied.
[0058] Compared with the prior art, the present invention has the following features and beneficial effects.
[0059] 1. The present invention focuses on the precise registration of the segment point cloud and the designed model. In the present invention, the registered point cloud is first preliminarily transformed using a rotation matrix and translation parameters, and after several adjustments, the registered point cloud and the designed model point cloud are preliminarily aligned. Then, the registered point cloud is iteratively transformed using a transformation matrix to achieve the precise alignment of the registered point cloud and the designed model point cloud. The innovation of the present invention lies in the adoption of an improved PSO algorithm (particle swarm optimization algorithm) combined with a multi-dimensional optimization strategy to achieve ultra-precise registration of the segment point cloud and the designed model, greatly improving the registration accuracy and calculation efficiency, effectively overcoming the defects of traditional registration methods, and completely getting rid of the local optimum trap, thereby realizing high-precision and high-efficiency registration of the segment point cloud and the designed model, greatly improving the accuracy and reliability of obtaining the actual positions of the segment width detection points, providing strong technical support for fields such as shield tunnel engineering and segment manufacturing, and ensuring project quality and production efficiency.
[0060] 2. In the present invention, the integration of geometric constraints and prior knowledge combines the geometric features (such as symmetry and boundary rules) of the segment design model and prior knowledge (such as the construction error range) to infer the initial search range of the rotation angle and translation parameters, effectively narrowing the parameter space and avoiding blind search. At the same time, the determination of the extreme difference translation range in the present application utilizes the extreme difference between the design model and the registered point cloud after rotation, directly associating the physical meaning of the translation parameter (such as the axis deviation), ensuring that the initial translation parameter is closer to the actual requirements. The combination of this method improves the accuracy of the initial parameter estimation.
[0061] 3. The particles in the present invention are evenly distributed in the search space, and the Euler angles (α, β, γ) are randomly initialized within the range of (-π, π), covering all possible full spaces of three-dimensional rotation, avoiding the local optimum caused by improper initial values in the traditional gradient descent method. At the same time, the translation parameter is also randomly selected within the floating range, further ensuring search diversity and enhancing the adaptability of the algorithm to complex registration scenarios.
[0062] 4. The initial range speculation in step three and the extreme value constraint in step eight of the present invention significantly reduce the search of the invalid parameter region, reduce the number of iterations of algorithms such as particle swarm optimization (PSO), and accelerate convergence. The step-by-step construction of the rotation matrix from step five to step seven decouples the construction of the rotation matrix from the parameter initialization, avoiding repeated calculations and improving the matrix operation efficiency. In addition, the present application uses the distance metric between point clouds (such as Hausdorff distance or ICP error) as the fitness function, combined with geometric feature matching (such as key point alignment), to ensure that the registration result satisfies both local accuracy and global consistency. By presetting thresholds (such as error tolerance or number of iterations) or adaptive convergence strategies, overfitting or under-registration is avoided, and the result stability is guaranteed, thereby improving the registration accuracy and robustness.
[0063] 5. The method of the present invention, from the initial search range speculation, particle initialization to the determination of translation parameters, requires no manual intervention and is applicable to large-scale batch processing of segments (such as segment assembly in tunnel construction); this method significantly reduces the computational complexity while ensuring high precision through systematic optimization of parameter initialization and search strategies, providing an efficient and reliable registration solution for engineering practice. Detailed implementation manners
[0064] This high-precision registration method for segment point cloud and design model includes the following steps.
[0065] Step 1, collect segment point cloud: Use a high-precision laser scanner or photogrammetry technology to obtain the point cloud data on the surface of the segment; the point cloud data contains the geometric information of the segment, which is a set of three-dimensional point coordinates obtained by the scanning device.
[0066] Step 2: Construct the registered point cloud and the corresponding point cloud of the design model.
[0067] Step 3: Based on the design model of the segment and the registered point cloud data, combining the geometric constraints (such as the symmetry and dimensions of the segment) of the segment design model with prior knowledge, infer the initial search ranges of the rotation angles and translation parameters of the particle swarm in the registered point cloud; for example, the initial value of the rotation angle can be restricted to be uniformly distributed within -180° to 180°, and the initial value of the translation parameter can be uniformly distributed within the extreme value difference range between the design model and the registered point cloud. To make the particles evenly distributed, the initial velocity can be generated according to the dimensions of the space (such as the rotation angle and translation distance) through a certain distribution method (such as uniform distribution, normal distribution, etc.) to ensure a wide exploration range.
[0068] Step 4: Generate the initial positions and velocities of the particles within the initial search ranges, so that the particles are evenly distributed in the search space during the initialization stage;
[0069] Step 5: Construct the rotation matrix.
[0070] Step 6: Randomly select the initial rotation angles (α i (0), β i (0), γ i (0)) within the range of (-π, π), and substitute the initial rotation angles (α i (0), β i (0), γ i (0)) of the particles into the rotation matrix to construct the initial rotation matrix. (α i (0), β i (0), γ i (0)) is the initial rotation angle when the conversion times of the particles is 0.
[0071] Step 7: Obtain the coordinates of the rotated registered point cloud after rotation according to the constructed initial rotation matrix.
[0072] Step 8: Determine the floating range of the translation parameter of the rotated registered point cloud: After rotation, the position of the registered point cloud will change. Take the difference between the extreme values of the design model point cloud in the X, Y, and Z directions and the extreme values of the rotated registered point cloud as the floating range of the translation parameter.
[0073] Step 9: Randomly select the initial translation parameter within the floating range of the translation parameter.
[0074] Step 10: Perform a translation transformation on the rotated registered point cloud.
[0075] Step 11: Repeat the process of Step 7 to Step 10.
[0076] Step Twelve, when the difference between the extreme values of the design model point cloud in the X, Y, and Z directions and the extreme values of the rotated registered point cloud is less than a limit value, generally less than 5 mm, or after three cycles and translations, a complete transformation matrix is constructed.
[0077] Step Thirteen, apply the transformation matrix to the registered point cloud after the translation transformation in Step Ten.
[0078] Step Fourteen, evaluate the fitness between the registered point cloud and the design model point cloud.
[0079] Step Fifteen, if the convergence condition is met, output the rotation parameters and translation parameters, and the registration is completed.
[0080] In this embodiment, the specific method for constructing the registered point cloud in Step Two is as follows: In the point cloud collected in Step One, the maximum and minimum value points in the X, Y, and Z directions are respectively taken, a total of 6 extreme value points, and random sampling is performed on the point cloud except the extreme value points; the registered point cloud is the segment point cloud data obtained by scanning. The design model point cloud can be the point cloud generated based on the CAD design model or the point cloud obtained by scanning the existing design template. These two point clouds respectively represent the actual segment shape and the theoretical design shape.
[0081] In this embodiment, in Step Four, in the Particle Swarm Optimization (PSO) algorithm, in order to ensure that the particles are evenly distributed in the search space at the initialization stage, it is usually necessary to generate the initial positions and velocities of the particles according to certain rules.
[0082] Initial position generation: The initial positions of the particles should be evenly distributed in the search space. Assuming that the search space is a D-dimensional hypercube (or other shaped regions), the steps for position generation can be divided into the following methods: uniform distribution or stratified uniform distribution;
[0083] In the uniform distribution, the initial position of each particle is randomly selected evenly in each dimension. The specific process is as follows: If the value range of each dimension of the search space is [x min , x max , then the initial position p i of the particle in each dimension is generated by the following formula:
[0084] p i = x min + (x max - x min ) × rand(0,1);
[0085] Among them, rand(0,1) generates a random number in the range of [0,1], ensuring that the positions of the particles are evenly distributed within the specified range;
[0086] The method of hierarchical uniform distribution is as follows: divide the search space into several uniform grids and place each particle in a different grid cell.
[0087] In this embodiment, in step four, the generation method of the initial velocity of the particle is uniform distribution velocity and initial velocity range setting; where
[0088] In the uniform distribution velocity, the generation of the initial velocity needs to be uniformly distributed within the velocity range of the search space. The specific process is as follows:
[0089] If the velocity range of each dimension is [v min , v max , the initial velocity v i of the particle is generated by the following formula:
[0090] v i = v min + (v max - v min ) × rand(0, 1);
[0091] Among them, rand(0, 1) generates a random number within the range of [0, 1];
[0092] The method of initial velocity range setting is as follows: Given that the position range of the particle is [x min , x max , select the velocity range [v min , v max , then set the velocity range as [v min , v max = ±α(x max - x min ), where α is a constant (usually taking values from 0.1 to 0.5) and is used to control the amplitude of the initial velocity.
[0093] The specific implementation steps are as follows: First, define the dimension and position range [x min , x max of the search space.
[0094] Generate the initial position p i for each particle and ensure that they are uniformly distributed in the search space.
[0095] According to the velocity range [v min , v max , generate the initial velocity v i for each particle so that it is uniformly distributed within a reasonable range. Suppose there is a two-dimensional search space with a position range of [-10, 10] and a velocity range of [-5, 5], and the particle swarm size is 10 particles. The specific operations are as follows:
[0096] The initial positions are: pi1 = -10 + 20×rand(0,1), pi2 = -10 + 20×rand(0,1);
[0097] This will generate a random initial position for each particle within the range [-10, 10].
[0098] Initialize the velocity:
[0099] v i1 = -5 + 10×rand(0,1), v i2 = -5 + 10×rand(0,1)
[0100] This will generate a random initial velocity for each particle within the range [-5, 5].
[0101] In this embodiment, the initial search range for the rotation angle in step three is restricted to be uniformly distributed within -180° to 180°, and the initial search range for the translation parameter is uniformly distributed within the extreme value difference between the design model and the registered point cloud.
[0102] In this embodiment, the rotation matrix in step six is constructed as follows: For the initial particle swarm with initial Euler angles (α, β, γ), the rotation matrix is:
[0103] R i (t) = (R i1 (t), R i2 (t), R i3 (t));
[0104] Where
[0105]
[0106] i is the particle number, and t represents the number of times the particle swarm transformation occurs; when t = 1, it means the particle swarm has completed one rotation, and generally t ≤ 3.
[0107] The rotation matrix is generated through the rotation parameters in the particle positions. The initial rotation angles (α i (0), β i (0), γ i (0)) are randomly selected within (-π, π). Here, the "rotation parameters" are usually used to describe the rotation angle of an object and are used as the basis for constructing the Z - Y - X Euler angle rotation matrix; for the initial particle swarm with initial Euler angles (α, β, γ), (α, β, γ) is taken as (α i (0), β i (0), γ i(0)) The basis for constructing the rotation matrix; substituting (α i (0), β i (0), γ i (0)) into the formula R i (t) = (R i1 (t), R i2 (t), R i3 (t)), we can obtain the initial rotation matrix R i (0) with the initial rotation angle of (α i (0), β i (0), γ i (0)).
[0108] In this embodiment, the determination of the translation parameters in Step 8 is a key step in registering the segment point cloud and the design model point cloud. The translation parameters are mainly used to adjust the position of the registered point cloud in space to make it align with the design model as much as possible. Based on the size of the segment, the translation parameters can be specifically determined from the following aspects:
[0109] 1. Extreme value range based on the segment size:
[0110] First of all, the size of the segment provides a reasonable range for the translation parameters; the size of the segment usually includes the length, width and height of the segment (or the diameter and height of the segment, depending on the shape of the segment). The following are the specific steps:
[0111] Step 1, obtain the actual size of the segment: Length: The length of the segment in the Y-axis direction, which can usually be directly obtained from the scanning data. Width (or diameter): The transverse size of the segment, which can be obtained from the maximum and minimum values in the X direction of the point cloud data. Height: The vertical size of the segment, which can be obtained from the maximum and minimum values in the Z-axis direction of the point cloud data.
[0112] Step 2, calculate the extreme values of the actual size of the segment: For example, in the X-axis direction, the range of the point cloud data of the segment is x min ~x max , then the extreme value range in the X direction is (x max - x min ); similarly, for the Y and Z directions, calculate their extreme value ranges.
[0113] 2. Design model size: The size of the design model can also be obtained by a similar method. The extreme values in the X, Y, and Z directions of the design model point cloud are: (x min_design , x max_design ), (y min_design , y max_design ), (z min_design , z max_design )
[0114] 3. Calculate the dimensional differences: For each direction (X, Y, Z), calculate the dimensional differences between the actual segment and the design model. Assume that the extreme values on the X, Y, and Z axes of the rotated registered point cloud are (x min , x max ), (y min , y max ), (z min , z max ), and the extreme values on the X, Y, and Z axes of the design model are (x min_design , x max_design ), (y min_design , y max_design ), (z min_design , z max_design ). Then, the floating range of translation can be determined by calculating the differences of these extreme values, and the calculation formula is as follows:
[0115] Δx = ∣x max - x min - (x max_design - x min_design )∣;
[0116] Δy = ∣y max - y min - (y max_design - y min_design )∣;
[0117] Δz = ∣z max - z min - (z max_design - z min_design )∣.
[0118] These dimensional differences can be used as a reference range for the translation parameters to ensure that the translation of the point cloud does not exceed the actual dimensional range of the design model during registration.
[0119] 4. Preliminary alignment of the design model and the registered point cloud; After determining the floating range of the translation parameters, the next step is to perform a preliminary alignment of the registered point cloud and the design model. This can be done in the following ways:
[0120] Rough alignment: By detecting the geometric features (such as boundaries, corner points, etc.) of the registered point cloud and the design model, determine the approximate translation parameters. For example, a preliminary translation vector can be calculated based on the centroids (centers of gravity) of the registered point cloud and the design model point cloud.
[0121] Determine the translation range using the extreme value differences: Based on the previously calculated dimensional differences Δx, Δy, Δz, randomly select translation parameters Δx i (t), Δy i (t), Δz i (t) and ensure that these translation parameters are within a reasonable range.
[0122] Translation Update in Particle Swarm Optimization: During the particle swarm optimization process, the translation parameters Δx i (t), Δy i (t), Δz i (t) of the particles are continuously adjusted according to the fitness function (usually the distance or error between the point cloud and the design model). The goal of translation is to minimize the error between the point cloud and the design model, thus making the registration more accurate.
[0123] Consider the symmetry of the segment: If the segment has symmetry (e.g., circular or approximately circular segments), the symmetry can be further utilized to optimize the selection of translation parameters. For example, it can be assumed that the position of the design model on certain symmetry axes is known, thereby restricting the range of translation.
[0124] 5. The actual range of translation parameters: Through the above steps, the actual range of translation parameters can be restricted by calculating the dimensional differences of the segments. For example, assume that the dimensional difference Δx in the X direction is 2 cm and the extreme value difference in the X direction of the design model is 1 cm, then the floating range of translation can be set to [-2, 2] cm or a suitable range.
[0125] In these ways, the range of translation parameters is determined based on the actual dimensions of the segments and the dimensional differences of the design model, and during the optimization process, these translation parameters are continuously adjusted to minimize the registration error, thereby achieving high-precision registration of the point cloud and the design model.
[0126] In this embodiment, when the difference between the extreme values of the design model point cloud in the X, Y, and Z directions and the extreme values of the rotated registered point cloud is less than 5 mm in step twelve, the constructed transformation matrix is as follows:
[0127]
[0128] RT i (t) = R i (t) + T i (t);
[0129] where, T i (t) is the current translation vector, T i (t) = (Δx i (t), Δy i (t), Δz i (t)); R i (t) = (R i1 (t), R i2 (t), R i3(t)); t represents the number of times of particle swarm transformation. Generally, t > 3 and t is an integer, indicating that after the particle swarm is transformed 3 times according to the rotation matrix and translation matrix, the transformation matrix is then used for transformation.
[0130] The method for transforming the registered point cloud in Step Thirteen is as follows:
[0131] Taking (α i (t), β i (t), γ i (t), x i (t), y i (t), z i (t)) as P i (t) of the current state of particle i, and substituting the state P i (1) of particle i after translation in Step Eleven into the transformation matrix to construct the transformation matrix of RT i (1), and then transforming the registered point cloud.
[0132] In this embodiment, the method for evaluating the fitness of the registered point cloud and the designed model point cloud in Step Fourteen is as follows:
[0133] Using a KD tree to calculate the average distance from the points on the registered point cloud to the nearest points on the designed model point cloud after the t-th transformation in the new pose, where t > 3 and the registered point cloud is transformed using the rotation parameters and translation parameters of particle i. That is, the fitness function value is F i (t):
[0134]
[0135] f k (P i (t)) = min(‖q1 - (R i (t)S k + T i (t))‖1,..., ‖q m - (R i (t)S k + T i (t))‖1);
[0136] Where: i represents the particle number in the particle swarm, S k is the coordinate of the k-th point in the registered point cloud, q m is the coordinate of the m-th point in the designed model point cloud; f i k represents the distance from the k-th point on the registered point cloud to the nearest point on the theoretical digital model after the registered point cloud is transformed using the parameters of particle i in the t-th iteration; in the initialization process, t = 0, taking the current particle parameters as the individual optimal pb, and selecting F i(t) The particle parameter with the smallest value is used as the global optimum pg of the particle swarm;
[0137] In step fifteen, when F i (t) is less than or equal to 1, the convergence condition is satisfied.
[0138] The above embodiments are not an exhaustive list of specific implementation manners, and there may be other embodiments. The purpose of the above embodiments is to illustrate the present invention, rather than limiting the protection scope of the present invention. All applications obtained by simple changes of the present invention fall within the protection scope of the present invention.
Claims
1. A high-precision segment point cloud and design model registration method, characterized in that It includes the following steps: Step 1: Collect the segment point cloud; Step 2: Construct the registered point cloud and construct the corresponding designed model point cloud; Step 3: Based on the designed model of the segment and the registered point cloud data, combined with the geometric constraints and prior knowledge of the segment designed model, infer the initial search range of the rotation angle and translation parameters of the particle swarm in the registered point cloud; Step 4: Generate the initial positions and velocities of the particles within the initial search range, so that the particles are evenly distributed in the search space during the initialization stage; Step 5: Construct the rotation matrix; Step 6: Randomly select an initial rotation angle (α i (0), β i (0), γ i (0)) within the range of (-π, π), and substitute the initial rotation angles (α i (0), β i (0), γ i (0)) of the particle into the rotation matrix to construct the initial rotation matrix; Step 7: Obtain the coordinates of the rotated registered point cloud after rotation according to the constructed initial rotation matrix; Step 8: Determine the floating range of the translation parameter of the rotated registered point cloud: Take the difference between the extreme values in the X, Y, and Z directions of the designed model point cloud and the extreme values of the rotated registered point cloud as the floating range of the translation parameter; Step 9: Randomly select the initial translation parameter within the floating range of the translation parameter; Step 10: Perform a translation transformation on the rotated registered point cloud; Step 11: Repeat the process of Step 7 to Step 10; Step 12: When the difference between the extreme values in the X, Y, and Z directions of the designed model point cloud and the extreme values of the rotated registered point cloud is less than the limit value, construct the complete transformation matrix; Step 13: Apply the transformation matrix to transform the registered point cloud after the translation transformation in Step 11; Step 14: Evaluate the fitness of the registered point cloud and the designed model point cloud; Step 15: If the convergence condition is satisfied, output the rotation parameter and the translation parameter, and the registration is completed.
2. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: The specific method for collecting the segment point cloud in Step 1 is: Use a high-precision laser scanner or photogrammetry technology to obtain the point cloud data on the surface of the segment; The point cloud data contains the geometric information of the segment, which is a set of three-dimensional point coordinates obtained by the scanning device.
3. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: The specific method for constructing the registered point cloud in Step 2 is: In the point cloud collected in Step 1, respectively take the maximum and minimum points in the X, Y, and Z directions, a total of 6 extreme points, and randomly sample the point cloud except the extreme points; The designed model point cloud is the point cloud generated based on the CAD designed model or the point cloud obtained by scanning the existing design template.
4. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: In Step 4, the generation method of the initial position of the particle is uniform distribution or stratified uniform distribution; Among them, In a uniform distribution, the initial position of each particle is randomly selected uniformly in each dimension. The specific process is as follows: If the value range of each dimension of the search space is [x min , x max , then the initial position p i of the particle in each dimension is generated by the following formula: p i = x min + (x max - x min ) × rand(0,1); rand(0,1) generates a random number in the range of [0,1], ensuring that the positions of the particles are evenly distributed within the specified range; The method of stratified uniform distribution is: Divide the search space into several uniform grids, and place each particle in a different grid cell.
5. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: In Step 4, the generation method of the initial velocity of the particle is uniform distribution velocity and initial velocity range setting; Among them, In the uniform distribution velocity, the generation of the initial velocity needs to be evenly distributed within the velocity range of the search space, and the specific process is: If the speed range for each dimension is [v min , v max , the initial velocity v i of the particle is generated by the following formula: v i = v min + (v max - v min ) × rand(0,1); rand(0,1) generates a random number in the range of [0,1]; The method for setting the initial velocity range is as follows: Given that the position range of the particle is [x min , x max , select the velocity range [v min , v max . Then, set the velocity range as [v min , v max = ±α(x max - x min ), where α is a constant.
6. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: In Step 3, the initial search range of the rotation angle is limited to a uniform distribution within -180° to 180°, and the initial search range of the translation parameter is evenly distributed within the extreme value difference between the designed model and the registered point cloud.
7. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: In Step 6, the rotation matrix is constructed as follows: For the initial particle swarm with the initial Euler angles (α, β, γ), the rotation matrix is: R i (t) = (R i1 (t), R i2 (t), R i3 (t)); Among them, i is the particle number, and t represents the number of times the particle swarm is transformed; Randomly select the initial rotation angles (α i (0), β i (0), γ i (0)) within the range (-π, π), and substitute (α i (0), β i (0), γ i (0)) into the formula R i (t) = (R i1 (t), R i2 (t), R i3 (t)), then the initial rotation matrix R i (0) can be obtained.
8. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: In Step 8, the floating range of the translation parameter is as follows: Suppose the extreme values on the X, Y, and Z axes of the rotated registered point cloud are (x min , x max ), (y min , y max ), (z min , z max ), The extreme values of the design model on the X, Y, and Z axes are (x min_design , x max_design ), (y min_design , y max_design ), (z min_design , z max_design ). Then, the floating range of translation can be determined by calculating the differences of these extreme values, and the calculation formula is as follows: Δx = ∣x max - x min - (x max_design - x min_design )∣; Δy = |y max - y min -(y max_design - y min_design )|; Δz = |z max - z min -(z max_design - z min_design )|。 9. The high-precision segment point cloud and design model registration method according to claim 7, characterized in that: In Step 12, when the difference between the extreme values of the designed model point cloud in the X, Y, and Z directions and the extreme values of the registered point cloud after rotation is less than 5 mm, the constructed transformation matrix is as follows: RT i R(t) = R i (t) + T i (t) where, T i (t) is the current translation vector, T i (t) = (Δx i (t), Δy i (t), Δz i (t)); R i (t) = (R i1 (t), R i2 (t), R i3 (t)); In Step 13, the method for transforming the registered point cloud is as follows: With (α i (t), β i (t), γ i (t), x i (t), y i (t), z i (t)) as P i (t) of the current state of particle i, bring P i (t) of the state of particle i after translation in Step Eleven into the transformation matrix to construct the transformation matrix of RT i (t), and then transform the registered point cloud.
10. The high-precision segment point cloud and design model registration method according to claim 1, characterized in that: In Step 14 The method for evaluating the fitness of the registered point cloud and the designed model point cloud is: When using the KD tree to calculate at the t-th transformation in the new pose, after transforming the registered point cloud using the rotation parameter and translation parameter of particle i, the average distance from the points on the registered point cloud to the nearest points on the designed model point cloud, that is, the fitness function value is F i (t): f k (P i (t)) = min(‖q1 - (R i (t)S k + T i (t))‖1, …, ‖q m - (R i (t)S k + T i (t))‖1); where: i represents the particle number in the particle swarm, S k is the coordinate of the k-th point in the registered point cloud, q m is the coordinate of the m-th point in the designed model point cloud; represents the distance from the k-th point on the registered point cloud to the nearest point on the theoretical digital model after registering the point cloud using the parameter transformation of particle i in the t-th iteration; In step fifteen, when F i (t) is less than or equal to 1, the convergence condition is satisfied.