Point cloud registration method and device for changing environment, computer device and storage medium
In the fields of autonomous driving and mobile robotics, by initializing the nearest neighbor index of the point cloud copy and the target point cloud, calculating the residual change and removing points with large changes, and resetting the transformation to the initial value, the problem of low point cloud registration accuracy under local geometric changes is solved, and higher accuracy registration is achieved.
Patent Information
- Application Number
- CN202611553218.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-09
- Publication Date
- 2026-11-06
AI Technical Summary
In the fields of autonomous driving and mobile robots, existing technologies have low point cloud registration accuracy in environments with local geometric changes. Traditional methods are easily misled by changing regions, leading to convergence to incorrect results.
By initializing the nearest neighbor indexes of the source point cloud copy and the target point cloud, the residual change before and after registration is calculated, points with large residual changes are removed, the current transformation is reset to the preset initial value, and the inheritance of the current transformation is avoided. A two-level cascaded strategy of coarse registration and fine registration is adopted to improve the registration accuracy.
It improves the point cloud registration accuracy in environments with local geometric changes, prevents the accumulation of deviations, and ensures that the registration algorithm accurately matches in changing regions.
Smart Images

Figure CN123052013A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of autonomous driving and mobile robots, and in particular to point cloud registration methods, apparatus, computer equipment and storage media for changing environments. Background Technology
[0002] In applications such as autonomous driving, robotic inspection, and digital twins, registration based on LiDAR point clouds is often required. This involves registering local point cloud maps of the same area accumulated over different times. Point cloud registration is often needed when the environment undergoes geometric changes, such as the removal of obstacles, the construction of new walls or roadblocks. In such cases, point cloud registration needs to be performed based on the environment before and after the geometric change to support downstream tasks such as incremental map updates and change detection.
[0003] These target point clouds and source point clouds are typically local maps accumulated and registered from multiple frames of LiDAR point clouds at their respective time points. Point cloud registration faces significant challenges when local geometric changes occur between two accumulations. Traditional outlier detection relies on the absolute value of the residuals, assuming points with large residuals are outliers and those with small residuals are reliable inliers. This criterion holds true in ordinary noisy scenarios, but reverses in scenarios with changing environments. Points in changed regions may have smaller residuals after incorrect registration because they are pulled to the old structural positions, while stable feature points may have larger residuals because they are dragged away from their correct corresponding positions by the incorrect transformation. Furthermore, biases accumulate during iteration. Existing iterative registration methods typically inherit the previous transformation as the initial value for the next round. When the previous round's result is hijacked by the changed region and contains systematic biases, these biases accumulate with each round, making convergence to the correct solution difficult. Therefore, the old and new structures of the changed region no longer match, causing the registration algorithm to be easily misled by the changed region and converge to incorrect results. In other words, existing technologies suffer from low registration accuracy when performing point cloud registration for environmental scenes with local geometric changes in the fields of autonomous driving and mobile robots. Summary of the Invention
[0004] This application provides a point cloud registration method, apparatus, computer equipment, and storage medium for changing environments, which can solve the technical problem of low registration accuracy when performing point cloud registration on environmental scenes with local geometric changes in the fields of autonomous driving and mobile robots.
[0005] In a first aspect, embodiments of this application provide a point cloud registration method for changing environments, comprising: In response to the registration command, initialization is performed to obtain the source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system; The source point cloud copy and the target point cloud are registered using the current transformation as the initial value, and the current transformation is output based on the registration process. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system after registration. The change in residual is obtained by subtracting the residual after registration from the residual before registration at the same source point. Based on the magnitude of the residual change, source points with larger residual changes are preferentially removed to obtain an updated source point cloud copy, and the current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the current round transformation; If the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset point threshold, the above registration process is repeated based on the updated source point cloud copy and the reset current transformation; when the iteration is terminated, the transformation obtained by the last successful registration is output.
[0006] In some embodiments, according to the priority order of the residual changes from largest to smallest, the source points corresponding to the current residual changes are pruned to obtain updated source point cloud copies, and the current transformation is reset to the same preset initial transformation as in each round, including: The residual changes are sorted in descending order to obtain a sequence of residual changes; In the source point cloud copy, the point clouds with the highest preset proportion in the residual change sequence are pruned, and the remaining point clouds are retained to obtain the pruned and updated source point cloud copy. The current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the transformation of the current round.
[0007] In some embodiments, registration is performed on the source point cloud copy and the target point cloud using the current transformation as the initial value, and the current transformation is output based on the registration process, including: Coarse registration is performed on the source point cloud copy and the target point cloud at a first voxel resolution that exceeds the preset voxel resolution to obtain a coarse registration transformation, wherein the preset voxel resolution is the voxel side length. Using the transformation output of coarse registration as the initial value, and with a second voxel resolution that does not exceed the preset voxel resolution, fine registration is performed after the coarse registration transformation to refine the local alignment. The size of the first voxel resolution is larger than the size of the second voxel resolution. Output the current-cycle transformation corresponding to the final registration process.
[0008] In some embodiments, according to the priority order of the residual changes from largest to smallest, the source points corresponding to the current residual change are pruned to obtain an updated source point cloud copy, and the current transformation is reset to the same preset initial transformation as in each round, including: Determine whether the current iteration count has reached the preset maximum iteration count; Determine the number of remaining points in the source point cloud replica; If the loop cutoff condition is not met, the process returns to the step of determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The loop cutoff condition includes the current iteration count reaching the preset maximum iteration count or the remaining number of points being less than the preset number of points threshold. If the cycle cutoff condition is met, the registration quality is evaluated based on the complete original source point cloud to obtain the registration quality evaluation result.
[0009] In some embodiments, if the cycle cutoff condition is met, a registration quality assessment is performed based on the complete original source point cloud to obtain a registration quality assessment result, including: If the loop cutoff condition is met, the original source point cloud is transformed into the coordinate system of the target point cloud using the transformation obtained from the last successful registration. In the coordinate system of the target point cloud, query the nearest neighbor point point by point and calculate the Euclidean distance between the nearest neighbor points; The proportion of the Euclidean distances that do not exceed a preset interior point distance threshold is determined to obtain the interior point ratio; The overall average residual of all points in the original source point cloud and the average residual of the interior points are calculated separately.
[0010] In some embodiments, determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system, based on the source point cloud copy, the current transformation, and the nearest neighbor index, includes: The source point cloud copy is transformed into the target point cloud coordinate system through the current transformation; In the coordinate system of the target point cloud, the nearest neighbor point is queried point by point and the Euclidean distance between the nearest neighbor points is calculated to obtain the pre-registration residual between the source point cloud copy and the target point cloud.
[0011] In some embodiments, in response to a registration instruction, initialization is performed to obtain a source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation, including: In response to the registration command, a copy of the source point cloud is obtained by copying the preset source point cloud; The nearest neighbor index of the target point cloud is obtained by constructing a nearest neighbor index on the preset target point cloud; The current transformation is initialized based on the same preset initial transformation in each round; Initialize the iteration rounds to 0.
[0012] Secondly, embodiments of this application also provide a point cloud registration device for changing environments, comprising: An initialization unit is used to respond to a registration command by initializing to obtain a source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. The calculation unit is used to determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The registration unit is used to perform registration on the source point cloud copy and the target point cloud with the current transformation as the initial value, and output the current transformation based on the registration process; The computing unit is also used to determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The calculation unit is also used to calculate the residual before registration minus the residual after registration at the same source point to obtain the residual change. The point cloud pruning unit is used to prune the source points corresponding to the current residual change in order of priority from large to small to obtain an updated source point cloud copy, and reset the current transformation to the same preset initial transformation as each round, so as to avoid inheriting the current round transformation. The registration unit is used to repeat the registration process based on the updated source point cloud copy and the reset current transformation when the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold. When the iteration is terminated, the transformation obtained by the last successful registration is output.
[0013] Thirdly, embodiments of this application also provide a point cloud registration computer device for changing environments, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, can implement the above-described method.
[0015] This application provides a point cloud registration method, apparatus, computer device, and storage medium for changing environments. The method includes: responding to a registration command, initializing to obtain a source point cloud copy, a target point cloud nearest neighbor index, and a current transformation, wherein the target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change; determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index; performing registration on the source point cloud copy and the target point cloud using the current transformation as the initial value, and outputting the current transformation based on the registration process; and determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The registration residual between the source point cloud copy and the target point cloud in the coordinate system is calculated after registration. The residual change is obtained by subtracting the post-registration residual from the pre-registration residual for the same source point. The source points corresponding to the current residual change are pruned according to the priority order from largest to smallest to obtain the updated source point cloud copy. The current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the current round's transformation. If the preset maximum number of iterations has not been reached and the remaining number of points is not less than a preset point threshold, the registration process is repeated based on the updated source point cloud copy and the reset current transformation. When the iteration terminates, the transformation obtained from the last successful registration is output. This application proposes to select and prune points that may affect registration by comparing the residual changes before and after registration. It focuses on the changed region to avoid the registration being skewed by the changed region. Furthermore, resetting the transformation to the initial value after pruning can prevent the accumulation of deviations during iteration, improving the registration accuracy for point cloud registration in environments with local geometric changes in the fields of autonomous driving and mobile robots. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A schematic flowchart of the point cloud registration method for changing environments provided in the embodiments of this application; Figure 2 A schematic block diagram of a point cloud registration device for changing environments provided in the embodiments of this application; Figure 3 A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0020] It should also be understood that the terminology used in this application specification is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this application specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0022] In applications such as autonomous driving, robotic inspection, and digital twins, registration based on LiDAR point clouds is often required. This involves registering local point cloud maps of the same area accumulated over different times. Point cloud registration is often needed when the environment undergoes geometric changes, such as the removal of obstacles, the construction of new walls or roadblocks. In such cases, point cloud registration needs to be performed based on the environment before and after the geometric change to support downstream tasks such as incremental map updates and change detection.
[0023] These target point clouds and source point clouds are typically local maps accumulated and registered from multiple frames of LiDAR point clouds at their respective time points. Point cloud registration faces significant challenges when local geometric changes occur between two accumulations. Traditional outlier detection relies on the absolute value of the residuals, assuming points with large residuals are outliers and those with small residuals are reliable inliers. This criterion holds true in ordinary noisy scenarios, but reverses in scenarios with changing environments. Points in changed regions may have smaller residuals after incorrect registration because they are pulled to the old structural positions, while stable feature points may have larger residuals because they are dragged away from their correct corresponding positions by the incorrect transformation. Furthermore, biases accumulate during iteration. Existing iterative registration methods typically inherit the previous transformation as the initial value for the next round. When the previous round's result is hijacked by the changed region and contains systematic biases, these biases accumulate with each round, making convergence to the correct solution difficult. Therefore, the old and new structures of the changed region no longer match, causing the registration algorithm to be easily misled by the changed region and converge to incorrect results. In other words, existing technologies suffer from low registration accuracy when performing point cloud registration for environmental scenes with local geometric changes in the fields of autonomous driving and mobile robots.
[0024] In some embodiments, the point cloud registration method for changing environments is applied to a point cloud registration device for changing environments, which is deployed on a point cloud registration equipment for changing environments. The equipment is a computer device, and the point cloud registration computer device for changing environments can be a terminal or a server. The terminal can be a smartphone, tablet computer, handheld computer, or laptop computer, etc.
[0025] Figure 1 This is a flowchart illustrating the point cloud registration method for changing environments provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps S110-S170: S110. In response to the registration instruction, initialization is performed to obtain the source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. S110 includes S1101-S1104: S1101. In response to the registration command, a copy of the source point cloud is obtained by copying the preset source point cloud; Create a point cloud copy and obtain the input source point cloud S, which is the current point collected after the scene change; and the target point cloud T, which is the historical reference point cloud collected before the scene change.
[0026] The source point cloud S is copied to generate a source point cloud copy S′, which is used for subsequent iterative pruning operations. The original complete source point cloud S is kept unchanged and used for the final quality assessment. The target point cloud is fixed for nearest neighbor queries to ensure that the pruning operation does not destroy the original data.
[0027] S1102. Construct the nearest neighbor index on the preset target point cloud to obtain the nearest neighbor index of the target point cloud; Build a nearest neighbor search index on the target point cloud T.
[0028] In this application, a KD-Tree index is preferred. This index is built only once during initialization and reused in all subsequent iterations to reduce computational overhead. A KD-Tree (K-Dimensional Tree) is a tree-like data structure for organizing and indexing data in a K-dimensional space. In point cloud processing, its core value lies in solving the efficiency problem of nearest neighbor search. The essence of a KD-Tree is a generalization of a binary search tree to a multidimensional space. Its construction and search both revolve around spatial partitioning.
[0029] The process of constructing a KD-Tree involves recursively dividing the entire K-dimensional space into multiple subspaces, calculating the variance of the current point cloud data in each dimension, and selecting the dimension with the largest variance as the splitting axis. This allows the data to be distributed as widely as possible, improving search efficiency. In the current dimension, the median of all points is found and used as the root node of the current tree. Points smaller than the median are moved to the left subtree, and points larger than the median are moved to the right subtree. This process is repeated for both subtrees until each subspace contains only one point.
[0030] KD-Trees enable rapid searching for the nearest neighbor to a query point. This searching can proceed not only downwards from the root node, determining whether to enter the left or right subtree based on the query point's value in the split dimension, until a leaf node is reached, with each node along the way considered a candidate nearest neighbor, but also upwards by backtracking to calculate the distance from the query point to candidate points. Then, the other subtree is checked to see if a closer point exists. Pruning effectively avoids unnecessary computations, a crucial step in the KD-Tree's efficiency.
[0031] In the point cloud registration of this application, it is quite time-consuming to find the nearest neighbor of each point in the source point cloud in the huge target point cloud.
[0032] KD-Tree can be used to accelerate the point cloud registration process. By creating an index, the average complexity of a single search can be reduced. When processing tens of thousands or even millions of point clouds, it can bring a certain degree of efficiency improvement.
[0033] S1103. Initialize the current transformation based on the same preset initial transformation in each round; Obtain the same preset initial transformation estimate for each round. and set the current transformation Initialize to Simultaneously, the iteration round counter k is set to 0. The preset pruning ratio r, maximum number of iterations K, interior point distance threshold τ, and minimum number of retained points are then read in. .
[0034] S1104. Initialize the iteration round to 0.
[0035] S120. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system. At the beginning of each iteration, the initial alignment error of each point in the source point cloud copy under the current transformation needs to be obtained as the benchmark for subsequent benefit calculation. Specifically, based on the source point cloud copy, the current transformation, and the nearest neighbor index of the target point cloud, the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system is determined.
[0036] The nearest neighbor index KD-Tree used is pre-built during the initialization phase and is built only once during the entire iteration. This index is reused for nearest neighbor queries in this step and all subsequent residual calculation steps. The index is not built repeatedly between iterations, thus avoiding the computational overhead of repeatedly building the index and significantly improving the algorithm efficiency.
[0037] Define the source point cloud replica in the k-th iteration as The current transformation is (during the first iteration) = The target point cloud is T. The goal of this step is to calculate... Each point in The nearest neighbor Euclidean distance to the target point cloud T before registration optimization.
[0038] The physical meaning of the pre-registration residual is the spatial positional deviation between each point in the source point cloud replica and the target point cloud before this round of NDT optimization. This deviation reflects the quality of the current transform estimation and is also an important reference for determining whether the point belongs to a stable feature before and after the scene transformation or a changed region.
[0039] Nearest neighbor query is an exact nearest neighbor search that returns the unique target point closest to the query point and its distance value. In some embodiments, approximate nearest neighbor search, such as the fast search algorithm in the FLANN library, can also be used to further reduce the query latency in high-dimensional large-scale point clouds.
[0040] S120 includes S1201-S1202: S1201. Transform the source point cloud copy to the coordinate system of the target point cloud through the current transformation; Obtain the transformation matrix of the current iteration round. The transformation matrix contains a rotation component R and a translation component t, that is, for any source point in the source point cloud replica... Its transformation form is: ; Use this transformation matrix to transform each 3D spatial point in the source point cloud replica. Perform a rigid body transformation to obtain the transformed point set. The transformation result is only used for residual lookup; the retained points in the source point cloud copy still use the original source coordinates to avoid applying the transformation repeatedly across rounds.
[0041] After this step, all points of the source point cloud copy are mapped to the same global coordinate system as the target point cloud T, so that the subsequent nearest neighbor distance calculation has a unified coordinate reference.
[0042] Preferably, during implementation, if the amount of data in the source point cloud replica is large, for example, exceeding 100,000 points, batch matrix operations can be used, such as parallel matrix multiplication using libraries like Eigen and Open3D, to accelerate the transformation process and reduce computation time.
[0043] S1202. In the coordinate system of the target point cloud, query the nearest neighbor point point point by point and calculate the Euclidean distance between the nearest neighbor points to obtain the pre-registration residual between the source point cloud copy and the target point cloud.
[0044] In the coordinate system of the target point cloud T, for each transformed point The nearest neighbor index, i.e., the KD-Tree index, which was constructed during the initialization phase, is invoked to perform a nearest neighbor search, finding the point in the target point cloud T with the closest Euclidean distance. ,Right now: in, This represents the three-dimensional Euclidean distance (L2 norm). Then, the point is calculated. The pre-registration residual, its value is Its nearest neighbor The Euclidean distance between points is calculated by iterating through all points in the source point cloud replica and sequentially performing the nearest neighbor query and distance calculation to obtain the pre-registration residual sequence. This residual sequence is provided as one of the key inputs to the subsequent benefit calculation module.
[0045] It should be added that the query operations for each point in the point-to-point nearest neighbor query are independent and do not depend on each other. In specific implementation, GPU parallel computing can be used to process the source point cloud replica. We can perform batch concurrent queries on points in the dataset to fully utilize computing resources and meet the real-time requirements of the scenario.
[0046] S130. Using the current transformation as the initial value, perform registration on the source point cloud copy and the target point cloud, and output the current transformation based on the registration process; In some embodiments, the Normal Distributions Transform (NDT) algorithm is used to perform registration optimization between the pruned source point cloud copy and the fixed target point cloud based on the current transformation, thereby solving for the optimal rigid body transformation in this iteration.
[0047] This step uses Tcur as the initial value for NDT registration, performs NDT registration on the source point cloud replica and the target point cloud, and outputs the NDT registration result for this round. .
[0048] The NDT registration principle is as follows: the space of the target point cloud T is divided into several voxel grids, and the spatial probability distribution of the point cloud in each voxel is characterized by a three-dimensional normal distribution. During registration, the rigid body transformation parameters are optimized to maximize the sum of the probability densities of each point in the source point cloud copy falling under the normal distribution of the corresponding voxel in the target point cloud.
[0049] Specifically, a two-stage cascaded strategy is adopted, including a coarse-matching sub-step and a fine-matching sub-step, to balance global search capability and local convergence accuracy.
[0050] S130 includes S1301-S1303: S1301. Perform coarse registration on the source point cloud copy and the target point cloud with a first voxel resolution that exceeds the preset voxel resolution to obtain a coarse registration transformation, wherein the preset voxel resolution is the voxel side length. A preset first voxel resolution Δcoarse is obtained, where the first voxel resolution is greater than a preset voxel resolution threshold, meaning the coarse registration voxel size is significantly larger than the fine registration voxel size. On the target point cloud T, a voxel grid is divided using the first voxel resolution Δcoarse. The point cloud falling within each voxel is counted, and the three-dimensional normal distribution parameters of the point cloud within each voxel are calculated.
[0051] Using the current transformation as the initial value, the source point cloud copy is... Each point in According to its transformed position The target voxel to which the point belongs is determined, and the probability density of that point under the normal distribution of the corresponding voxel is calculated. Then, the rigid body transformation parameter T is solved through nonlinear optimization iteration to maximize the sum of the probability densities of all source points.
[0052] Preferably, the maximum number of iterations in the coarse registration stage is set to 60 to 80. Compared to the fine registration stage, coarse registration uses fewer iterations, aiming for rapid search rather than fine convergence, thereby controlling the overall computation time.
[0053] Preferably, when using the first voxel resolution for coarse registration, if the number of points in a certain voxel of the target point cloud T is less than a preset threshold, such as less than 5 points, then a normal distribution is not constructed for that voxel, in order to avoid the problem of singular covariance matrix caused by small samples.
[0054] S1302. Using the transformation output of coarse registration as the initial value, and with a second voxel resolution that does not exceed the preset voxel resolution, continue to perform fine registration after the coarse registration transformation to refine the local alignment. The size of the first voxel resolution is larger than the size of the second voxel resolution. Obtain the transformation result of coarse registration output. This transformation is used as the initial value for the fine registration stage. A preset second voxel resolution Δfine is obtained. The second voxel resolution does not exceed a preset voxel resolution threshold, i.e., it is not greater than the first voxel resolution, and is significantly smaller in value than the coarse registration voxel resolution.
[0055] The target point cloud T is re-divided into voxel grids at a second voxel resolution Δfine. Points falling within each fine voxel are statistically analyzed, and the 3D normal distribution parameters of the point clouds within each fine voxel are calculated. This coarse registration transformation is then applied. As the initial value, for the source point cloud copy Perform NDT fine registration. Since the fine registration stage begins near the candidate transform obtained from coarse registration, the goal of fine registration is to perform fine alignment in local regions and improve registration accuracy.
[0056] Preferably, the second voxel resolution Δfine ranges from 0.5m to 1.5m. This range provides sufficient spatial resolution for point cloud registration, ensuring that the registration accuracy meets the requirements of downstream tasks such as mapping and localization. If the voxel size is too small, there will be too few points within the voxel, leading to unstable estimation of the normal distribution; if the voxel size is too large, the accuracy will be insufficient, and fine alignment will be impossible.
[0057] Preferably, the maximum number of iterations in the fine registration stage is set to 100 to 150. Compared to the coarse registration stage, fine registration uses more iterations, which can further optimize the registration accuracy near the coarse registration result.
[0058] S1303, Output the current cycle transformation corresponding to the final registration process.
[0059] The transformation result of the fine registration output is taken as the final output of this round of NDT registration, denoted as... If the current registration round fails to converge, subsequent residual changes and pruning will not be performed. If a successful registration result already exists, the final successful result will be output and evaluated using B1; otherwise, a failure flag will be returned. Successful results should be saved separately and will not be overwritten by resetting the current transformation.
[0060] The current cycle change It includes rotation and translation components, that is, for any source point Its spatial location after this round of registration is The output of the current cycle transformation It will be used in subsequent steps: for example, as the transformation matrix of the source and replica transformation in the post-registration residual calculation, used to calculate the nearest neighbor Euclidean distance after registration; or as a reference after descending pruning, combined with the benefit analysis results to guide pruning decisions.
[0061] S140 determines the post-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index; The registration residual refers to the Euclidean distance from a point in the source point cloud copy to its nearest neighbor in the target point cloud coordinate system after being transformed by the optimal transformation output of this round of NDT registration. It quantifies the nearest neighbor distance from the registered point to the target point cloud, but does not prove the existence of a real physical correspondence.
[0062] At different types of points, the residuals after registration exhibit drastically different evolutionary patterns, which is the cornerstone that distinguishes this application from existing technologies. Before and after scene changes, there are stable feature points and changed region points. Stable feature points, such as tree trunks and curbs, have small residuals before registration because their initial poses are roughly aligned. However, after NDT is skewed by the changed region, their residuals after registration become very large, resulting in a negative benefit value, i.e., no benefit. Therefore, they can be preferentially retained in the ranking pruning. On the other hand, changed region points, such as the wall points revealed after the removal of fences, have large residuals before registration because they have no corresponding physical structure in the point cloud. However, NDT incorrectly forces them to be matched to the false positions of the old structure, making the residuals after registration very small, resulting in a large positive benefit value, i.e., a false benefit. Therefore, they can be preferentially removed in the ranking pruning. The above are typical phenomena when the initial values are roughly aligned with stable structures and the current registration is disturbed by the changed structure. This does not mean that all stable points necessarily have a negative benefit or that all changed points necessarily have a positive benefit.
[0063] The registration residual represents the current degree of conformity of a point in the NDT algorithm. Because NDT is misled by a large number of points in changing regions, the global transformation suffers from systematic bias. In this case, the degree of conformity given by the registration residual is completely spurious. Therefore, this application uses the spurious decrease in the registration residual to reversely mark the changing regions.
[0064] S150. Calculate the residual before registration minus the residual after registration at the same source point to obtain the change in residual. Residual before registration Subtract the registration residual The difference obtained, that is, the change in residual, is denoted as the benefit. Where "before" represents before registration and "after" represents after registration. Its dimension is distance. Benefit is the change in the Euclidean distance between a point and its nearest neighbors before and after registration.
[0065] The benefit metric quantifies whether the alignment of a point has improved after this round of NDT registration optimization. A benefit > 0 indicates a positive benefit or improvement, meaning the point is closer to the target point cloud after registration, benefiting from the registration optimization. A benefit < 0 indicates a negative benefit, meaning the point is actually farther from the target point cloud after registration, with no improvement. A benefit approximately equal to 0 indicates that the point has not changed much before and after registration, remaining in a relatively stable state.
[0066] Unlike existing technologies, this application prunes based on the change in residual amount, i.e., the benefit, rather than pruning based on the absolute value of the residual amount as in existing technologies.
[0067] Traditional outlier identification relies on the absolute value of residuals, assuming points with large residuals are outliers and points with small residuals are reliable inliers. This criterion holds true in normal noise scenarios, but in scenarios with changing environments, the opposite occurs. Points in changed regions may have smaller residuals after misregistration because they are pulled to the old structural positions, while stable feature points may have larger residuals after misregistration because they are dragged away from their correct corresponding positions by incorrect transformations.
[0068] This application proposes a point reliability criterion (benefit degree) that is opposite to the residual absolute value criterion, prioritizing the removal of points with higher benefit degrees. Through iterative cycles of benefit degree calculation, descending pruning, and resetting initial values, the dominant weight of stable features in registration is gradually increased.
[0069] S160. According to the priority order of the residual change from large to small, remove the source point corresponding to the current residual change to obtain the updated source point cloud copy, and reset the current transformation to the same preset initial transformation as each round. Existing technologies use the absolute value of residuals as a criterion, discarding those with large residuals. As a result, stable feature points are incorrectly discarded due to their large residuals, while points in variable regions are incorrectly retained due to their small residuals, leading to deterioration in registration.
[0070] This application employs a benefit criterion, pruning features with higher benefit values. As a result, stable feature points are correctly preserved because their benefit values are negative, while points in variable regions are correctly pruned because their benefit values are relatively high, thus achieving registration convergence. This solves the technical problem of incorrect pruning direction in traditional methods under changing scenarios, and is the core innovation of this application compared to existing technologies.
[0071] S160 includes S1601-S1603: S1601. Sort the residual changes in descending order to obtain a sequence of residual changes; Obtain the set of output residual changes, where each residual change is related to a point in the source point cloud replica. One-to-one correspondence, meaning each point carries its benefit label. All N... k The points are arranged in descending order of their benefit values to obtain an ordered sequence.
[0072] Preferably, during implementation, to reduce memory overhead, it is not necessary to physically rearrange all points; only the point index array needs to be sorted according to benefit, preserving the original point cloud's memory layout. That is, maintaining a memory array of length N... k The index array is sorted in descending order of benefit, and the sorted index array indicates the benefit ranking of each point.
[0073] S1602. In the source point cloud copy, the point clouds with the highest preset proportion in the residual change sequence are pruned, and the remaining point clouds are retained to obtain the pruned and updated source point cloud copy. Obtain the preset pruning ratio parameter, which represents the proportion of points to be pruned in each iteration relative to the total number of points in the current source point cloud replica. Determine the number of pruning points based on the descending sort results.
[0074] The top n points (those with the highest benefit) after sorting in descending order are identified as the set of points to be pruned. This is done from the current source point cloud replica. The set of points to be pruned is removed, and the remaining points form a copy of the source point cloud for the next iteration. This step prunes the points with the highest benefit, i.e., the points where the residual after registration decreases most significantly compared to the residual before registration, rather than the points with the largest residuals in traditional methods. This sorting is not equivalent to pruning only positively benefiting points, nor does it guarantee the complete retention of stable points.
[0075] S1603. Reset the current transformation to the same preset initial transformation as each round, so as to avoid inheriting the current round transformation.
[0076] Existing iterative methods have drawbacks. In standard ICP (Iterative Closest Point), NDT (Normal Distributions Transform), and TRICP (Trimmed Iterative Closest Point) iterative registration methods, after each iteration, the transformation obtained in this round of optimization is usually used as the initial value for the next iteration. This design assumes that each iteration converges in the correct direction, so inheriting the results from the previous round can accelerate convergence. However, in scenarios where the environment undergoes geometric changes, this assumption no longer holds. Due to the interference of points in the changed region, NDT is skewed in each iteration, leading to... It contains systematic biases. If this bias is inherited as the starting point for the next round, the bias will accumulate in each iteration, making it difficult or even impossible for the algorithm to converge to the correct solution.
[0077] The reset strategy in this application will reset the transformation back to the initial estimate after each round of pruning. Rather than inheritance has been misled. The logic lies in maintaining a consistent starting point for each iteration. The only variable is the percentage of points in the changing region that decreases in each iteration of the source point cloud replica. By progressively eliminating interference sources, NDT is guided to converge in the correct direction under the same initial conditions. This design ensures that the results of each iteration are... The results are used to calculate the benefit and registration residuals for this round. The last successful result is also used for the final output and evaluation, but not as the initial value for the next round, thus breaking the chain of deviation propagation.
[0078] Following S160, steps A1 through A4 are included: After pruning, updating, and transforming / resetting are completed, the algorithm enters the iterative loop decision phase. This phase is responsible for determining whether to continue to the next iteration, or to exit the loop and proceed to the final quality evaluation if the termination condition is met.
[0079] A1. Determine whether the current iteration count has reached the preset maximum iteration count; Get the current completed iteration round k, which is initially 0 and increments after each iteration is completed and step S160 is finished, as well as the preset maximum iteration number parameter K, which is a positive integer and typically ranges from 3 to 4.
[0080] If the current completed iteration k < the maximum number of iterations parameter K, it means that the current number of iterations has not yet reached the upper limit, and the next iteration is allowed to continue as long as the remaining points meet the requirements; if k ≥ K, it means that the preset maximum number of iterations has been reached or exceeded, and the algorithm should terminate the iteration loop and jump to step A4 for final quality evaluation.
[0081] Preferably, the maximum number of iterations K can be adaptively adjusted according to the size of the area of change in the scene: the larger the area of change, the more pruning rounds are required, and the value of K should be increased accordingly; the smaller the area of change, the fewer pruning rounds are required, and the value of K can be decreased accordingly. In practical engineering applications, K=3 can cover most urban road scenes, and K=4 can cope with extremely large-scale change scenes.
[0082] Preferably, in addition to round-based counting, an early stopping mechanism can be set. If the current round k>0 and the transformation increment ∥ΔT∥ of the NDT registration in this round is less than a preset convergence threshold, for example, translation increment < 0.01 m and rotation increment < 0.01, it indicates that the algorithm has converged early and does not need to continue iterating; it can directly jump to step A4. This can reduce unnecessary iteration rounds in scenarios where the proportion of the changed region is low or the initial estimation quality is high, further reducing computational overhead.
[0083] A2. Determine the number of remaining points in the source point cloud replica; Obtain a copy of the source point cloud after the current round of pruning and updating, i.e., the updated source point cloud copy output after the execution is complete, and count the total number of remaining 3D spatial points in this point cloud copy. In each iteration, because some high-benefit points are removed according to the pruning ratio r, the total number of 3D spatial points decreases with each iteration.
[0084] To ensure the effectiveness of subsequent registration, it is necessary to determine whether the total number of points in the 3D space is lower than the preset minimum number of points to retain. The value depends on the specific application scenario and point cloud density. The principle for setting it is to strike a balance between registration accuracy and computational efficiency, ensuring sufficient point cloud samples to support reliable statistical registration while avoiding excessive pruning that could lead to degradation of the source point cloud copy.
[0085] Specifically: if the number of remaining points is greater than or equal to the minimum retention threshold, it means that the number of remaining points still meets the sample size requirement for registration, and the next round of iteration is allowed; if the number of remaining points is less than the minimum retention threshold, it means that the number of remaining points is insufficient, and continuing pruning may cause registration to fail due to insufficient samples. The algorithm should terminate the iteration loop and jump to the final quality assessment.
[0086] Preferably, the minimum number of points to retain can be determined based on the percentage of source points to initial points, for example, retaining at least 500 points and not less than 10% of the initial number of points. In a typical urban road scenario, the source point cloud has approximately 10,000 points after 0.1 m downsampling, so the minimum number of points to retain can be set to 1,000 points.
[0087] Preferably, when determining the remaining number of points, if the pruning operation is not performed because the number of points under the stopping condition is lower than the minimum number of points to retain, then the remaining number of points is the number of source point cloud replicas input in the current round, which is less than the minimum number of points to retain, and the termination condition will be triggered at this time.
[0088] A3. If the loop cutoff condition is not met, return to the step of determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation and the nearest neighbor index. The loop cutoff condition includes the current iteration number reaching the preset maximum iteration number or the remaining number of points being less than the preset number of points threshold. If the current iteration count has not reached the preset maximum iteration count and the remaining points are not less than the preset point threshold, then the loop termination condition is not met, and the next iteration begins.
[0089] The round counter will no longer increment repeatedly, and the current transformation will remain the same as the initial transformation after the reset. Update the source point cloud copy with the pruned new source point cloud copy. That is, based on the updated new source point cloud copy, the current transformation T0, and the reused nearest neighbor index, re-execute the pre-registration residual calculation, NDT registration, post-registration residual calculation, benefit calculation, and pruning update until the cycle termination condition is met.
[0090] If the loop termination condition is met, the iteration loop exits.
[0091] A4. If the cycle cutoff condition is met, then the registration quality is evaluated based on the complete original source point cloud to obtain the registration quality evaluation result.
[0092] Step A4 includes steps B1 through B4: B1. If the loop termination condition is met, the original source point cloud is transformed into the coordinate system of the target point cloud through the transformation obtained from the last successful registration. When the loop termination condition is met, the transformation result output by the last successfully executed NDT registration during the iterative loop is obtained and denoted as the optimal transformation T*, i.e., the final transformation. The original complete source point cloud S retained during the initialization phase is obtained. The original complete source point cloud S and the source point cloud used to generate the copy S′ are from the same data source, the difference being that S was not modified during the entire iterative pruning process, retaining all the original point cloud data. Using the optimal transformation T*, each three-dimensional spatial point in the original complete source point cloud S is transformed... Perform a rigid body transformation to convert the target point cloud T to the global coordinate system.
[0093] The original complete source point cloud is used because it forces the use of the unpruned original complete source point cloud S, rather than the pruned copy S′ used during iteration. This is because the quality assessment should reflect the true alignment effect of the optimal transformation T* on all original data (including points in the changed regions), rather than evaluating only on the pruned subset; different methods such as standard NDT and TRICP are evaluated on the same complete point cloud to ensure the comparability of the evaluation results; downstream tasks such as map incremental updates and change detection need to know the registration quality of the complete point cloud to decide whether to accept the registration result.
[0094] If the iteration loop terminates due to reaching the maximum number of iterations K, then T* is the output of the last round of NDT registration; if the iteration loop terminates due to the source point cloud replica points falling below the minimum value... If the process terminates early, T* will be the output of the last successfully executed NDT registration round. If an NDT registration round fails to converge, the NDT transformation that successfully converged in the previous round will be used as T*. If all rounds fail to converge, a registration failure flag will be returned, and no registration quality assessment will be performed.
[0095] B2. Query the nearest neighbor point point by point in the coordinate system of the target point cloud, and calculate the Euclidean distance between the nearest neighbor points. In the coordinate system of the target point cloud T, for each transformed point, the nearest neighbor index KD-Tree constructed during the initialization phase is invoked to perform a nearest neighbor search, finding the point in the target point cloud T with the closest Euclidean distance. .
[0096] Then calculate the point The final registration residual under the optimal transformation is the value of each transformed point and its nearest neighbor. The Euclidean distance between them.
[0097] Traverse all N points in the original complete source point cloud S, and sequentially perform the above nearest neighbor query and distance calculation to obtain the final registration residual sequence.
[0098] B3. Determine the proportion of the Euclidean distance that does not exceed a preset interior point distance threshold to obtain the interior point rate; Obtain a preset interior point distance threshold τ, which is used to determine whether a point is an interior point. Here, an interior point means that the final nearest neighbor distance does not exceed the threshold, and is not equivalent to having a real physical correspondence.
[0099] Based on the calculated final registration residual sequence, for each point in the original complete source point cloud, determine whether its final registration residual does not exceed the inlier distance threshold τ. Count the number of points that meet the inlier condition and calculate the inlier rate.
[0100] The inlier rate is one of the most crucial indicators for measuring the success of registration and serves as the basis for determining registration success. In scenarios where the environment changes, even if the registration is completely correct, points in the changed areas, such as newly added or removed structures, may not have corresponding physical points in the target point cloud. Their residuals may exceed a threshold τ, thus being classified as outliers. Only under the ideal condition that all stable points are inliers and all changed points are non-inliers, is the inlier rate of correct registration approximately 1-p, where p is the proportion of changed area points to the total number of points in the source point cloud. If the measured inlier rate is significantly lower than this theoretical value, it cannot be concluded solely from this that there is a systematic bias in the registration result; the overlap range, sampling conditions, and independent references should also be considered for judgment.
[0101] The inlier rate is output as part of the registration quality assessment results to downstream tasks such as incremental map updates, change detection, and localization. The inlier distance threshold is preset. For example, in incremental map updates, T* is only accepted as a valid registration result and used for subsequent map fusion if the inlier rate is higher than the preset threshold, such as >60%; otherwise, manual intervention or re-acquisition will be triggered.
[0102] Preferably, the interior distance threshold τ should be matched with the density and accuracy of the target point cloud T. If the point cloud density is high, τ can be a smaller value, such as 0.15m; if the point cloud density is low, such as a voxel resolution of 0.3m, τ can be a larger value, such as 0.30m. The value of τ should not be too large, as this will reduce the discriminative power of the interior point rate, nor should it be too small, as this will cause too many points to be classified as outliers, making the evaluation results too stringent.
[0103] B4. Calculate the overall average residual of all points in the original source point cloud and the average residual of the interior points respectively.
[0104] Based on the calculated final registration residual sequence and the determined inlier classification results, the registration accuracy index and the average residual are calculated.
[0105] Calculate the arithmetic mean of the final registration residuals for all points in the original complete source point cloud S. The overall average residual reflects the average alignment error of the optimal transformation on all point cloud data, including the contribution of points in the transformed region.
[0106] The in-point mean residual is the arithmetic mean of the final registration residuals of all points identified as in-points. The in-point mean residual reflects the geometric alignment on the set of points that meet the distance threshold, but does not guarantee that all variant points or mismatches have been removed; when the number of in-points is 0, this indicator is marked as uncalcifiable.
[0107] The average residual directly reflects the geometric accuracy of the registration and is a key indicator for judging whether the registration result meets the accuracy requirements of downstream tasks. For example, in high-precision map updates for autonomous driving, the registration accuracy is usually required to be better than 0.10 m; in more relaxed scenarios such as park inspection, it can be relaxed to 0.20 m to 0.30 m.
[0108] During the debugging and parameter tuning phase, the average residuals of the standard NDT and the present invention under different scenarios can be compared. If the average residual of the present application is significantly lower than that of the standard NDT and the interior point rate is significantly higher than that of the standard NDT, it can be used as a reference for geometric alignment improvement. However, the actual registration accuracy still needs to be determined by combining the independent reference pose or a verifiable stable structure.
[0109] Preferably, the inlier rate and the average residual can be combined to form a comprehensive quality score, which is then output as a single quantitative value.
[0110] S170. When the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold, repeat the registration process based on the updated source point cloud copy and the reset current transformation. When the iteration is terminated, output the transformation obtained by the last successful registration.
[0111] This application provides a point cloud registration method, apparatus, computer device, and storage medium for changing environments. The method includes: responding to a registration command, initializing to obtain a source point cloud copy, a target point cloud nearest neighbor index, and a current transformation, wherein the target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change; determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index; performing registration on the source point cloud copy and the target point cloud using the current transformation as the initial value, and outputting the current transformation based on the registration process; and determining the current transformation in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The registration residual between the source point cloud copy and the target point cloud in a coordinate system is calculated after registration. The residual change is obtained by subtracting the post-registration residual from the pre-registration residual for the same source point. The source points corresponding to the current residual change are pruned according to the priority order from largest to smallest to obtain an updated source point cloud copy. The current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the current round's transformation. If the preset maximum number of iterations has not been reached and the remaining number of points is not less than a preset point threshold, the registration process is repeated based on the updated source point cloud copy and the reset current transformation. When the iteration terminates, the transformation obtained from the last successful registration is output. This application proposes to select and prune points that may affect registration by comparing the residual changes before and after registration. It focuses on the changed region to avoid the registration being skewed by the changed region. Furthermore, resetting the transformation to the initial value after pruning can prevent the accumulation of deviations during iteration, improving the registration accuracy for point cloud registration in environments with local geometric changes in the fields of autonomous driving and mobile robots.
[0112] Figure 2 This is a schematic block diagram of a point cloud registration device for changing environments provided in an embodiment of this application. Figure 2 As shown, corresponding to the above-described point cloud registration method for changing environments, this application also provides a point cloud registration apparatus 600 for changing environments. This point cloud registration apparatus 600 includes units for executing the above-described point cloud registration method for changing environments, and can be configured in terminals such as desktop computers, tablet computers, and laptops. Specifically, please refer to... Figure 2 The point cloud registration device 600 for changing environments includes an initialization unit 601, a calculation unit 602, a registration unit 603, and a point cloud pruning unit 604, wherein: Initialization unit 601 is used to respond to registration instructions to initialize and obtain a source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. The calculation unit 602 is used to determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation and the nearest neighbor index. The registration unit 603 is used to perform registration on the source point cloud copy and the target point cloud with the current transformation as the initial value, and output the current transformation based on the registration process; The calculation unit 602 is also used to determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation and the nearest neighbor index. The calculation unit 602 is also used to calculate the residual before registration minus the residual after registration at the same source point to obtain the residual change. Point cloud pruning unit 604 is used to prune the source point corresponding to the current residual change in order of priority from large to small to obtain an updated source point cloud copy, and reset the current transformation to the same preset initial transformation as each round, so as to avoid inheriting the current round transformation. The registration unit 603 is used to repeat the registration process based on the updated source point cloud copy and the reset current transformation when the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold. When the iteration is terminated, the transformation obtained by the last successful registration is output.
[0113] In some embodiments, the point cloud pruning unit 604, when performing operations according to the priority order of the residual changes from largest to smallest, prunes the source points corresponding to the current residual change to obtain an updated source point cloud copy, and resets the current transformation to the same preset initial transformation as in each round, specifically for: The residual changes are sorted in descending order to obtain a sequence of residual changes; In the source point cloud copy, the point clouds with the highest preset proportion in the residual change sequence are pruned, and the remaining point clouds are retained to obtain the pruned and updated source point cloud copy. The current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the transformation of the current round.
[0114] In some embodiments, the registration unit 603 performs registration on the source point cloud copy and the target point cloud using the current transform as the initial value, and outputs the current transform based on the registration process, specifically for: Coarse registration is performed on the source point cloud copy and the target point cloud at a first voxel resolution that exceeds the preset voxel resolution to obtain a coarse registration transformation, wherein the preset voxel resolution is the voxel side length. Using the transformation output of coarse registration as the initial value, and with a second voxel resolution that does not exceed the preset voxel resolution, fine registration is performed after the coarse registration transformation to refine the local alignment. The size of the first voxel resolution is larger than the size of the second voxel resolution. Output the current-cycle transformation corresponding to the final registration process.
[0115] In some embodiments, the point cloud registration device 600 for changing environments further includes an iteration unit, which, according to the priority order of the residual changes from largest to smallest, removes the source points corresponding to the current residual changes to obtain an updated source point cloud copy, and resets the current transformation to the same preset initial transformation as in each round. The iteration unit is specifically used for: Determine whether the current iteration count has reached the preset maximum iteration count; Determine the number of remaining points in the source point cloud replica; If the loop cutoff condition is not met, the process returns to the step of determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The loop cutoff condition includes the current iteration count reaching the preset maximum iteration count or the remaining number of points being less than the preset number of points threshold. If the cycle cutoff condition is met, the registration quality is evaluated based on the complete original source point cloud to obtain the registration quality evaluation result.
[0116] In some embodiments, if the iteration unit meets the loop termination condition, it performs a registration quality assessment based on the complete original source point cloud to obtain a registration quality assessment result, specifically used for: If the loop cutoff condition is met, the original source point cloud is transformed into the coordinate system of the target point cloud using the transformation obtained from the last successful registration. In the coordinate system of the target point cloud, query the nearest neighbor point point by point and calculate the Euclidean distance between the nearest neighbor points; The proportion of the Euclidean distances that do not exceed a preset interior point distance threshold is determined to obtain the interior point ratio; The overall average residual of all points in the original source point cloud and the average residual of the interior points are calculated separately.
[0117] In some embodiments, the iterative unit, when performing the determination of the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index, is specifically used for: The source point cloud copy is transformed into the target point cloud coordinate system through the current transformation; In the coordinate system of the target point cloud, the nearest neighbor point is queried point by point and the Euclidean distance between the nearest neighbor points is calculated to obtain the pre-registration residual between the source point cloud copy and the target point cloud.
[0118] In some embodiments, the initialization unit 601, in response to the registration instruction, performs initialization to obtain a source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation, specifically for: In response to the registration command, a copy of the source point cloud is obtained by copying the preset source point cloud; The nearest neighbor index of the target point cloud is obtained by constructing a nearest neighbor index on the preset target point cloud; The current transformation is initialized based on the same preset initial transformation in each round; Initialize the iteration rounds to 0.
[0119] In summary, the point cloud registration device 600 for changing environments in this embodiment of the application initializes in response to a registration command to obtain a source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system is determined. Registration is performed on the source point cloud copy and the target point cloud using the current transformation as the initial value, and the current transformation is output based on the registration process. Based on the source point cloud copy, the current transformation, and the current transformation, the device performs registration on the source point cloud copy and the target point cloud before registration. The nearest neighbor index is used to determine the post-registration residual between the source point cloud copy and the target point cloud in the same coordinate system. The post-registration residual is subtracted from the pre-registration residual for the same source point to obtain the residual change. The source points corresponding to the current residual change are pruned according to the priority order from largest to smallest to obtain the updated source point cloud copy. The current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the current round's transformation. If the preset maximum number of iterations has not been reached and the remaining number of points is not less than a preset point threshold, the registration process is repeated based on the updated source point cloud copy and the reset current transformation. When the iteration terminates, the transformation obtained from the last successful registration is output. This application proposes to select and prune points that may affect registration by comparing the residual changes before and after registration. It focuses on the changed region to avoid the registration being skewed by the changed region. Furthermore, resetting the transformation to the initial value after pruning can prevent the accumulation of deviations during iteration, improving the registration accuracy when performing point cloud registration in environments with local geometric changes in the fields of autonomous driving and mobile robots.
[0120] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the point cloud registration device and each unit for changing environments described above can be found in the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity, these details will not be repeated here.
[0121] The aforementioned point cloud registration device for changing environments can be implemented as a computer program, which can be used in various ways, such as... Figure 3 It runs on the computer device shown.
[0122] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device 700 provided in an embodiment of this application. The computer device 700 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0123] See Figure 3 The computer device 700 includes a processor 702, a memory, and a network interface 705 connected via a system bus 701. The memory may include a non-volatile storage medium 703 and internal memory 704.
[0124] The non-volatile storage medium 703 may store an operating system 7031 and a computer program 7032. The computer program 7032 includes program instructions that, when executed, cause the processor 702 to perform a point cloud registration method for changing environments.
[0125] The processor 702 provides computing and control capabilities to support the operation of the entire computer device 700.
[0126] The internal memory 704 provides an environment for the execution of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can execute a point cloud registration method for changing environments.
[0127] This network interface 705 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 700 to which the present application is applied. The specific computer device 700 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0128] The processor 702 is used to run the computer program 7032 stored in the memory to perform the following steps: In response to the registration command, initialization is performed to obtain the source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system; The source point cloud copy and the target point cloud are registered using the current transformation as the initial value, and the current transformation is output based on the registration process. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system after registration. The change in residual is obtained by subtracting the residual after registration from the residual before registration at the same source point. According to the priority order of the residual change from large to small, the source point corresponding to the current residual change is removed to obtain the updated source point cloud copy, and the current transformation is reset to the same preset initial transformation as in each round. If the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold, the registration process is repeated based on the updated source point cloud copy and the reset current transformation. When the iteration is terminated, the transformation obtained by the last successful registration is output.
[0129] It should be understood that in the embodiments of this application, the processor 702 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0130] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0131] It should be noted that the specific embodiments are merely illustrative examples intended to aid in understanding the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. The scope of protection of this application is determined by the contents of the claims. Specific embodiments, parameter ranges, or technical features described in the specification should not be construed as undue limitation or expansion of the scope of protection of the claims. The technical effects described in the specification are only used to illustrate the innovation of the present invention.
[0132] Therefore, this application also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps: In response to the registration command, initialization is performed to obtain the source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system; The source point cloud copy and the target point cloud are registered using the current transformation as the initial value, and the current transformation is output based on the registration process. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system after registration. The change in residual is obtained by subtracting the residual after registration from the residual before registration at the same source point. According to the priority order of the residual change from large to small, the source point corresponding to the current residual change is removed to obtain the updated source point cloud copy, and the current transformation is reset to the same preset initial transformation as in each round. If the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold, the registration process is repeated based on the updated source point cloud copy and the reset current transformation. When the iteration is terminated, the transformation obtained by the last successful registration is output.
[0133] The storage medium can be any computer-readable storage medium that can store program code, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0134] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0136] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.
[0138] It should be noted that any software tools or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application is authorized (with the knowledge and consent) by the relevant parties or fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0139] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A point cloud registration method for changing environments, characterized in that, The method includes: In response to the registration command, initialization is performed to obtain the source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system; The source point cloud copy and the target point cloud are registered using the current transformation as the initial value, and the current transformation is output based on the registration process. Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system after registration. The change in residual is obtained by subtracting the residual after registration from the residual before registration at the same source point. According to the priority order of the residual change from large to small, the source point corresponding to the current residual change is removed to obtain the updated source point cloud copy, and the current transformation is reset to the same preset initial transformation as each round, so as to avoid inheriting the current round transformation; If the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold, the registration process is repeated based on the updated source point cloud copy and the reset current transformation. When the iteration is terminated, the transformation obtained by the last successful registration is output.
2. The method according to claim 1, characterized in that, According to the priority order of the residual changes from largest to smallest, the source points corresponding to the current residual changes are pruned to obtain updated source point cloud copies, and the current transformation is reset to the same preset initial transformation as in each round, including: The residual changes are sorted in descending order to obtain a sequence of residual changes; In the source point cloud copy, the point clouds with the highest preset proportion in the residual change sequence are pruned, and the remaining point clouds are retained to obtain the pruned and updated source point cloud copy. The current transformation is reset to the same preset initial transformation as in each round to avoid inheriting the transformation of the current round.
3. The method according to claim 1, characterized in that, The source point cloud copy and the target point cloud are registered using the current transformation as the initial value, and the current transformation is output based on the registration process, including: Coarse registration is performed on the source point cloud copy and the target point cloud at a first voxel resolution that exceeds the preset voxel resolution to obtain a coarse registration transformation, wherein the preset voxel resolution is the voxel side length. Using the transformation output of coarse registration as the initial value, and with a second voxel resolution that does not exceed the preset voxel resolution, fine registration is performed after the coarse registration transformation to refine the local alignment. The size of the first voxel resolution is larger than the size of the second voxel resolution. Output the current-cycle transformation corresponding to the final registration process.
4. The method according to claim 1, characterized in that, Following the priority order of the residual changes from largest to smallest, the source points corresponding to the current residual change are pruned to obtain updated source point cloud copies. Then, the current transformation is reset to the same preset initial transformation as in each round, including: Determine whether the current iteration count has reached the preset maximum iteration count; Determine the number of remaining points in the source point cloud replica; If the loop cutoff condition is not met, the process returns to the step of determining the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The loop cutoff condition includes the current iteration count reaching the preset maximum iteration count, or the remaining number of points being less than the preset number of points threshold. If the cycle cutoff condition is met, the registration quality is evaluated based on the complete original source point cloud to obtain the registration quality evaluation result.
5. The method according to claim 4, characterized in that, If the cycle cutoff condition is met, a registration quality assessment is performed based on the complete original source point cloud to obtain the registration quality assessment result, including: If the loop cutoff condition is met, the original source point cloud is transformed into the coordinate system of the target point cloud using the transformation obtained from the last successful registration. In the coordinate system of the target point cloud, query the nearest neighbor point point by point and calculate the Euclidean distance between the nearest neighbor points; The proportion of the Euclidean distances that do not exceed a preset interior point distance threshold is determined to obtain the interior point ratio; The overall average residual of all points in the original source point cloud and the average residual of the interior points are calculated separately.
6. The method according to claim 1, characterized in that, Based on the source point cloud copy, the current transformation, and the nearest neighbor index, determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system, including: The source point cloud copy is transformed into the target point cloud coordinate system through the current transformation; In the coordinate system of the target point cloud, the nearest neighbor point is queried point by point and the Euclidean distance between the nearest neighbor points is calculated to obtain the pre-registration residual between the source point cloud copy and the target point cloud.
7. The method according to claim 1, characterized in that, In response to the registration command, initialization is performed to obtain a copy of the source point cloud corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation, including: In response to the registration command, a copy of the source point cloud is obtained by copying the preset source point cloud; The nearest neighbor index of the target point cloud is obtained by constructing a nearest neighbor index on the preset target point cloud; The current transformation is initialized based on the same preset initial transformation in each round; Initialize the iteration rounds to 0.
8. A point cloud registration device for changing environments, characterized in that, The device includes: An initialization unit is used to respond to a registration command by initializing to obtain a source point cloud copy corresponding to the source point cloud, the nearest neighbor index of the target point cloud, and the current transformation. The target point cloud is the point cloud before the scene change, and the source point cloud is the point cloud after the scene change. The calculation unit is used to determine the pre-registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The registration unit is used to perform registration on the source point cloud copy and the target point cloud with the current transformation as the initial value, and output the current transformation based on the registration process; The computing unit is also used to determine the registration residual between the source point cloud copy and the target point cloud in the same coordinate system based on the source point cloud copy, the current transformation, and the nearest neighbor index. The calculation unit is also used to calculate the residual before registration minus the residual after registration at the same source point to obtain the residual change. The point cloud pruning unit is used to prune the source points corresponding to the current residual change in order of priority from large to small to obtain an updated source point cloud copy, and reset the current transformation to the same preset initial transformation as each round, so as to avoid inheriting the current round transformation. The registration unit is used to repeat the registration process based on the updated source point cloud copy and the reset current transformation when the preset maximum number of iterations has not been reached and the number of remaining points is not less than the preset number of points threshold. When the iteration is terminated, the transformation obtained by the last successful registration is output.
9. A point cloud registration computer device for changing environments, characterized in that, The method includes a memory, a processor, and a point cloud registration program for changing environments stored in the memory and executable on the processor. The processor executes the point cloud registration program for changing environments to implement the steps of the point cloud registration method for changing environments as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a program for implementing a point cloud registration method for changing environments, which is executed by a processor to implement the steps of the point cloud registration method for changing environments as described in any one of claims 1 to 7.
