Point cloud registration method, apparatus, and electronic device
By performing voxelization and coarse-fine registration on point cloud data, the problems of large error and high computational complexity in point cloud registration of the ICP algorithm are solved, achieving efficient and accurate point cloud registration and improving positioning accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-03-31
AI Technical Summary
Existing ICP point cloud registration algorithms are prone to large registration errors when the features of point cloud data differ significantly. Furthermore, they are computationally complex and inefficient, making it difficult to meet the needs of practical applications.
By voxelizing the point cloud data, the data is simplified, and fine registration is performed using coarse registration and nearest-point iteration algorithms, thereby reducing data complexity and improving registration efficiency and accuracy.
Without losing point cloud data features, it significantly improves the efficiency and accuracy of point cloud registration, reduces computational load and cost, and enhances positioning accuracy.
Smart Images

Figure CN115511930B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a point cloud registration method, apparatus, and electronic device. Background Technology
[0002] LiDAR can perform localization by registering two adjacent frames of point cloud data. Registration yields the rotation and translation transformations between the two point clouds, i.e., the transformation matrix between the two frames. This transformation matrix can represent the motion changes of the LiDAR itself and is typically solved using ICP (Iterative Closest Point) algorithm. The classic ICP algorithm has two major drawbacks. First, it is prone to significant errors due to the similarity of the point cloud data. ICP point cloud registration is more suitable for two frames of point cloud data with high similarity. If the features of the two frames differ significantly, it will interfere with the convergence process of point cloud registration, leading to large registration errors. Second, the classic ICP point cloud registration algorithm needs to process all points in the two frames. During point-to-point registration search, it consumes a lot of resources, resulting in long registration times, low efficiency, and poor practical application. Summary of the Invention
[0003] This invention aims to at least partially solve one of the technical problems in related technologies. One objective of this invention is to propose a point cloud registration method that reduces the complexity of point cloud data without losing point cloud data features, effectively improving the efficiency and accuracy of registration, thereby improving the accuracy of positioning.
[0004] To achieve the above objectives, a first aspect of the present invention proposes a point cloud registration method, the method comprising: acquiring input point cloud data and performing voxelization on the input point cloud data; simplifying the input point cloud data according to the result of the voxelization to obtain simplified point cloud data; performing coarse registration on the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix; transforming the simplified point cloud data using the preliminary transformation matrix to obtain first transformed point cloud data; and performing fine registration on the first transformed point cloud data and the point cloud data to be registered using a nearest-point iteration algorithm, so that the final registration accuracy is less than a preset minimum distance threshold.
[0005] In addition, the point cloud registration method proposed in the above embodiments of the present invention may also have the following additional technical features:
[0006] According to an embodiment of the present invention, the voxelization process of the input point cloud data includes: determining the maximum and minimum values of the input point cloud data in the X, Y, and Z axis directions; calculating the difference between the maximum value and the corresponding minimum value to obtain the side length of the three-dimensional range of the input point cloud data; calculating the side length of the voxel grid based on the total number of points in the input point cloud data and the preset number of points contained in a single voxel grid; calculating the number of all voxel grids in the X, Y, and Z axis directions based on the side length of each voxel grid and the side length of the three-dimensional range; and numbering each voxel grid to obtain the result of the voxelization process.
[0007] According to one embodiment of the present invention, the side length of the voxel grid is calculated by the following formula:
[0008]
[0009] Where, length represents the side length of the voxel grid, k1 represents the preset number of points in a single voxel grid, n represents the total number of points in the input point cloud data, and l x The length of the input point cloud data along the X-axis is represented by l. y The length of the input point cloud data along the Y-axis is represented by l. z This represents the range and side length of the input point cloud data along the Z-axis.
[0010] According to an embodiment of the present invention, the simplification of the input point cloud data based on the result of voxelization includes: for each voxel square, calculating the centroid based on the point cloud data within the voxel square; if the centroid is a point in the point cloud data within the corresponding voxel square, then using the centroid to represent the point cloud data within the corresponding voxel square; if the centroid is not a point in the point cloud data within the corresponding voxel square, then using the point in the point cloud data within the corresponding voxel square that is closest to the centroid to represent the point cloud data within the corresponding voxel square.
[0011] According to one embodiment of the present invention, the coarse registration of the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix includes: for each point in the simplified point cloud data, determining the nearest neighbor point of that point in the point cloud data to be registered, obtaining a nearest neighbor pair, and calculating the vector of the nearest neighbor pair; filtering the nearest neighbor points according to the vector of each nearest neighbor pair to obtain a target point pair; and obtaining the preliminary transformation matrix according to the target point pair.
[0012] According to an embodiment of the present invention, the step of filtering the nearest neighbor points based on the vectors of each nearest neighbor pair to obtain a target point pair includes: for a point p in the simplified point cloud data, determining the k nearest neighbor points of point p in the simplified point cloud data; calculating the vector angle between a first vector and each second vector, wherein the first vector is the vector of the nearest neighbor pair of point p, and the second vector is the vector of the nearest neighbor pair corresponding to the point among the k nearest neighbors; calculating the mean of the vector angles, and determining whether the mean is less than a preset threshold; if so, determining the nearest neighbor pair of point p as the target point pair.
[0013] According to an embodiment of the present invention, obtaining the preliminary transformation matrix based on the target point pair includes: calculating a first centroid based on the points of the input point cloud data in the target point pair, and calculating a second centroid based on the points of the point cloud data to be registered in the target point pair; calculating a covariance matrix based on the first centroid, the second centroid, and the target point pair; constructing a symmetric matrix based on the covariance matrix, and calculating the eigenvectors of the symmetric matrix; calculating a rotation matrix based on the eigenvectors, and calculating a translation matrix based on the rotation matrix, the first centroid, and the second centroid; and obtaining the preliminary transformation matrix based on the rotation matrix and the translation matrix.
[0014] According to one embodiment of the present invention, the step of performing fine registration of the first transformed point cloud data and the point cloud data to be registered using the nearest point iteration algorithm, so that the final registration accuracy is less than a preset minimum distance threshold, includes: calculating the distance between the first transformed point cloud data and the point cloud data to be registered; determining whether the distance is less than the preset minimum distance threshold; if not, updating the simplified point cloud data to the first transformed point cloud data, and returning to the step of performing coarse registration of the simplified point cloud data and the point cloud data to be registered; if yes, determining that the registration is complete.
[0015] To achieve the above objectives, a second aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the point cloud registration method as described above.
[0016] To achieve the above objectives, a third aspect of the present invention provides a point cloud registration device, the device comprising: an acquisition module for acquiring input point cloud data and performing voxelization processing on the input point cloud data; a simplification module for simplifying the input point cloud data according to the result of the voxelization processing to obtain simplified point cloud data; a coarse registration module for performing coarse registration on the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix; a transformation module for transforming the simplified point cloud data using the preliminary transformation matrix to obtain first transformed point cloud data; and a fine registration module for performing fine registration on the first transformed point cloud data and the point cloud data to be registered using a nearest-point iteration algorithm to ensure that the final registration accuracy is less than a preset minimum distance threshold.
[0017] The point cloud registration method, apparatus, and electronic device of this invention acquire input point cloud data and perform voxelization on the input point cloud data; based on the result of the voxelization, the input point cloud data is simplified, and coarse registration is performed between the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix; the simplified point cloud data is transformed using the preliminary transformation matrix to obtain first transformed point cloud data; then, the nearest point iteration algorithm is used to perform fine registration between the first transformed point cloud data and the point cloud data to be registered to ensure that the final registration accuracy is less than a preset minimum distance threshold. Voxelization of the point cloud data reduces data complexity without losing point cloud data features, effectively improving registration efficiency, reducing computational load, and consuming less computational resources, thus significantly reducing computational costs. Furthermore, performing coarse registration on nearest point pairs before fine registration, and implementing secondary filtering, filters out incorrectly registered point pairs, improving the accuracy of point cloud registration and thereby improving positioning accuracy. Attached Figure Description
[0018] Figure 1 This is a flowchart of a point cloud registration method according to an embodiment of the present invention;
[0019] Figure 2 This is a flowchart of a voxelization process for input point cloud data according to an embodiment of the present invention;
[0020] Figure 3 This is a flowchart illustrating the simplification of input point cloud data according to an embodiment of the present invention;
[0021] Figure 4 This is a flowchart of a coarse registration process for simplified point cloud data and point cloud data to be registered, according to an embodiment of the present invention.
[0022] Figure 5 This is a flowchart of an embodiment of the present invention for filtering nearest neighbors based on the vectors of each nearest neighbor pair;
[0023] Figure 6This is a flowchart of obtaining a preliminary transformation matrix based on target point pairs according to an embodiment of the present invention;
[0024] Figure 7 This is a flowchart of a nearest point iterative algorithm for fine registration according to an embodiment of the present invention;
[0025] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention;
[0026] Figure 9 This is a schematic diagram of the point cloud registration device according to an embodiment of the present invention. Detailed Implementation
[0027] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0028] The point cloud registration method, apparatus, storage medium, and electronic device of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0029] Figure 1 This is a flowchart of a point cloud registration method according to an embodiment of the present invention.
[0030] In embodiments of the present invention, such as Figure 1 As shown, point cloud registration methods include:
[0031] S1: Acquire the input point cloud data and perform voxelization on the input point cloud data.
[0032] Specifically, the process involves acquiring input point cloud data and registering it with the point cloud data to be registered. Traditional point cloud registration methods require processing all points in the input point cloud data, resulting in high computational costs, long registration times, low efficiency, and poor practical applicability. This invention performs voxelization on the input point cloud data before registering it with the point cloud data to be registered. This reduces data complexity without losing point cloud data features, effectively improving registration efficiency.
[0033] In embodiments of the present invention, such as Figure 2 As shown, the input point cloud data undergoes voxelization processing, including:
[0034] S11, determine the maximum and minimum values of the input point cloud data in the X, Y, and Z axis directions.
[0035] S12, calculate the difference between the maximum value and the corresponding minimum value to obtain the 3D range side length of the input point cloud data.
[0036] S13, calculate the side length of the voxel grid based on the total number of points in the input point cloud data and the preset number of points contained in a single voxel grid.
[0037] S14. Calculate the number of all voxel squares in the X, Y, and Z axes based on the side length of each voxel square and the side length of the solid range.
[0038] S15, number each voxel square to obtain the voxelization result.
[0039] Specifically, the maximum and minimum values of the input point cloud data in the X, Y, and Z axis directions are determined and denoted as x, y, and z, respectively. max y max z max x min y min z min Then, the differences between the maximum and corresponding minimum values of the input point cloud data along the X, Y, and Z axes are calculated to obtain the 3D extent side length of the input point cloud data. The 3D extent side length of the input point cloud data is calculated using the following formula:
[0040] l x =x max -x min
[0041] l y =y max -y min
[0042] l z =z max -z min
[0043] Among them, l x This represents the side length of the solid range of the input point cloud data along the X-axis direction, l y This represents the side length of the solid range of the input point cloud data along the Y-axis, l z This represents the side length of the solid range of the input point cloud data along the Z-axis, x. max This represents the maximum value of the input point cloud data along the X-axis and y-axis. max This represents the maximum value of the input point cloud data along the Y-axis and z-axis. max This represents the maximum value of the input point cloud data along the Z-axis, x min This represents the minimum value of the input point cloud data along the X-axis and y-axis. min This represents the minimum value of the input point cloud data along the Y-axis and z-axis. min This represents the minimum value of the input point cloud data along the Z-axis.
[0044] More specifically, after obtaining the 3D range side length of the input point cloud data, the side length of a single voxel grid can be obtained based on the total number of points in the input point cloud data and the preset number of points contained in a single voxel grid.
[0045] In an embodiment of the present invention, the side length of the voxel grid is calculated using the following formula:
[0046]
[0047] Where length represents the side length of the voxel square, k1 represents the preset number of points in a single voxel square, n represents the total number of points in the input point cloud data, and l x This represents the range and side length of the input point cloud data along the X-axis. y Indicates the range of the input point cloud data along the Y-axis, l z This indicates the range and side length of the input point cloud data along the Z-axis.
[0048] It should be noted that the preset number of points for a single voxel grid can be pre-set or adaptively adjusted according to the total number of points in the input point cloud data.
[0049] More specifically, after obtaining the side lengths of the voxel grids, the number of voxel grids along the X, Y, and Z axes can be determined based on the side lengths of the voxel grids and the side lengths of the solid area. The number of voxel grids along the X, Y, and Z axes can be calculated using the following formula:
[0050] num = M * N * L
[0051]
[0052] Where M represents the number of voxel squares in the X-axis direction, N represents the number of voxel squares in the Y-axis direction, L represents the number of voxel squares in the Z-axis direction, and num represents the total number of voxel squares.
[0053] After obtaining the number of voxel squares along the X, Y, and Z axes, each voxel square is numbered using the following formula:
[0054]
[0055] The voxel squares are numbered (i,j,k).
[0056] After voxelizing the input point cloud data, a voxel grid is used to simplify the data and reduce the computational load for point cloud registration. Voxelizing the input point cloud data reduces its complexity without losing its features, effectively improving registration efficiency.
[0057] S2, based on the results of voxelization, the input point cloud data is simplified to obtain simplified point cloud data.
[0058] Specifically, the input point cloud data is simplified based on the results of voxelization, with one centroid in each voxel square representing all the point clouds in the voxel square, in order to simplify the point cloud data.
[0059] In one embodiment of the present invention, such as Figure 3 As shown, the input point cloud data is simplified based on the results of voxelization, including:
[0060] S21, For each voxel square, calculate the centroid based on the point cloud data within that voxel square.
[0061] S22. If the centroid is a point in the point cloud data within the corresponding voxel grid, then the centroid is used to represent the point cloud data within the corresponding voxel grid.
[0062] S23. If the centroid is not a point in the point cloud data within the corresponding voxel grid, then the point in the point cloud data within the corresponding voxel grid that is closest to the centroid is used to represent the point cloud data within the corresponding voxel grid.
[0063] Specifically, to use one centroid in each voxel square to represent all the point clouds in each voxel square, the centroid in each voxel square must first be calculated.
[0064] In an embodiment of the present invention, the centroid of each voxel square is calculated using the following formula:
[0065]
[0066] Among them, centroid ijk p represents the centroid corresponding to the voxel square numbered (i,j,k). a k represents the a-th point in the point cloud data within the voxel grid, and k2 represents the number of points in the point cloud data within the voxel grid.
[0067] It should be noted that the number of points in the point cloud data within each voxel square may be the same or different, and k2 is determined by the voxel square numbered (i,j,k).
[0068] More specifically, after calculating the centroid of each voxel square, if the calculated centroid coincides with a point in the point cloud data within the corresponding voxel square (i.e., the corresponding voxel square has a centroid), then this centroid is used to represent all point cloud data within the corresponding voxel square. If no point in the corresponding voxel square coincides with the calculated centroid, then the point in the point cloud data within the corresponding voxel square that is closest to the centroid is used to represent the point cloud data within the corresponding voxel square. Using the centroid of the voxel square to represent the point cloud data within the voxel square yields simplified point cloud data, significantly reducing the amount of point cloud data that needs to be calculated, and also reducing the computational load on the input point cloud data.
[0069] S3. Perform coarse registration on the simplified point cloud data and the point cloud data to be registered to obtain the preliminary transformation matrix.
[0070] Specifically, after using voxelization to represent the input point cloud data, simplified point cloud data is obtained, and coarse registration is performed between the simplified point cloud data and the point cloud data to be registered.
[0071] In embodiments of the present invention, such as Figure 4 As shown, coarse registration is performed on the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix, including:
[0072] S31. For each point in the simplified point cloud data, determine the nearest neighbor point in the point cloud data to be registered, obtain the nearest neighbor pair, and calculate the vector of the nearest neighbor pair.
[0073] Specifically, for every point in the simplified point cloud data, there must be a nearest neighbor point in the point cloud data to be registered. A point in the simplified point cloud data and its nearest neighbor in the point cloud data to be registered form a nearest neighbor pair, and the vector of the nearest neighbor pair is obtained. The distance between each point in the simplified point cloud data and the point in the point cloud data to be registered can be calculated using the following formula.
[0074] d(p i ,X)=min xj∈X ||x j -p i ||
[0075] Where, p i Let X represent a point in the simplified point cloud data, and let X represent the point cloud data to be registered. j This represents a point in the point cloud data to be registered. The point with the smallest value among all calculated results is selected as the nearest neighbor of that point in the simplified point cloud data, and the vector of the nearest neighbor pair is calculated.
[0076] S32, filter the nearest neighbor points according to the vectors of each nearest neighbor pair to obtain the target point pair.
[0077] Specifically, by using the above calculation method to simplify the point cloud data, each point cloud has a nearest neighbor point. However, the distance between the nearest neighbor pairs can be large or small. This invention filters the nearest neighbor points and removes point pairs with excessively large distances between them to improve the accuracy of subsequent point cloud registration.
[0078] In embodiments of the present invention, such as Figure 5 As shown, the nearest neighbor points are filtered based on the vectors of each nearest neighbor pair to obtain the target point pairs, including:
[0079] S321, For point p in the simplified point cloud data, determine the k nearest neighbors of point p in the simplified point cloud data.
[0080] S322, calculate the angle between the first vector and each of the second vectors, where the first vector is the vector of the nearest neighbor pair of point p, and the second vector is the vector of the nearest neighbor pair of the points among the k nearest neighbors.
[0081] S323, calculate the mean of the angle between the vectors and determine whether the mean is less than a preset threshold.
[0082] S324, if so, then determine the nearest neighbor pair of point p as the target point pair.
[0083] Specifically, for each point p in the simplified point cloud data, the k nearest neighbors of point p in the simplified point cloud data are determined. This can be done by determining the k nearest neighbors of p in the simplified point cloud data within a sphere with point p as the center and r as the radius. The vector of the nearest neighbor pair of point p is the first vector, and the vector of the nearest neighbor pair of the k nearest neighbors of point p is the second vector. The angle between the first vector and each second vector is calculated.
[0084] More specifically, the mean of the angles between the first vector and each of the second vectors can be calculated using the following formula:
[0085]
[0086] in, Let be the mean of the angles between the first vector and each of the second vectors. Let k be the function for calculating the angle between vectors, k represents the number of nearest neighbors of point p in the simplified point cloud data, and e is the function for calculating the angle between vectors. i Denotes the first vector. Represents a simplified point cloud p i The vector from the Kth nearest neighbor to the point cloud data to be registered.
[0087] The mean of the angle between the first vector and each second vector is obtained through the above calculation. If the mean is less than the preset threshold, the nearest neighbor pair of point p is determined as the target point pair. If the mean is greater than the preset threshold, the point pair is determined to be an incorrectly matched point pair, and point p is eliminated. After the above elimination method is applied to each point in the simplified point cloud, the target point pair set is obtained.
[0088] S33, obtain the preliminary transformation matrix based on the target point pair.
[0089] Specifically, the target point pairs after the above screening meet both the requirements of nearest neighbor points and the requirements of vector angle. Calculating the preliminary transformation matrix using the target point pairs greatly improves the accuracy of the preliminary transformation matrix.
[0090] In embodiments of the present invention, such as Figure 6 As shown, the preliminary transformation matrix is obtained based on the target point pairs, including:
[0091] S331, calculate the first centroid based on the points in the input point cloud data of the target point pair, and calculate the second centroid based on the points in the point cloud data to be registered in the target point pair.
[0092] S332, calculate the covariance matrix based on the first centroid, the second centroid, and the target point pair.
[0093] S333, construct a symmetric matrix based on the covariance matrix, and calculate the eigenvectors of the symmetric matrix.
[0094] S334, calculate the rotation matrix based on the eigenvectors, and calculate the translation matrix based on the rotation matrix, the first centroid, and the second centroid.
[0095] S335, the preliminary transformation matrix is obtained based on the rotation matrix and translation matrix.
[0096] Specifically, the first centroid is calculated for the points in the input point cloud data of the target point pair, and the second centroid is calculated for the points in the point cloud data to be registered in the target point pair. The number of points in the input point cloud data of the target point pair is the same as the number of points in the point cloud data to be registered. The first and second centroids are calculated using the following formula:
[0097]
[0098] Among them, u p As the first mass center, u x It is the second mass center.
[0099] The covariance matrix is calculated using the following formula based on the first centroid, the second centroid, and the target point pair:
[0100]
[0101] Then, a symmetric matrix is constructed based on the covariance matrix, and the eigenvectors of the symmetric matrix are calculated. Let the eigenvectors of the symmetric matrix be q.
[0102] q = [q0 q1 q2 q3] T
[0103] The rotation matrix R can be calculated from the eigenvectors, using the following formula:
[0104]
[0105] Then, based on the rotation matrix R and the first centroid u p Second mass center u x The translation matrix T is calculated using the following formula:
[0106] T = u x -Ru p
[0107] The initial transformation matrix is RT.
[0108] S4. The simplified point cloud data is transformed using the preliminary transformation matrix to obtain the first transformed point cloud data.
[0109] S5. The nearest point iteration algorithm is used to perform fine registration of the first transformed point cloud data and the point cloud data to be registered, so that the final registration accuracy is less than the preset minimum distance threshold.
[0110] Specifically, after obtaining the first transformed point cloud data, the nearest point iterative algorithm is used to perform fine registration of the point cloud data to be registered until the iterative algorithm converges and the optimal transformation matrix is obtained.
[0111] In embodiments of the present invention, such as Figure 7 As shown, the nearest-point iterative algorithm is used to perform fine registration of the first transformed point cloud data and the point cloud data to be registered, so that the final registration accuracy is less than a preset minimum distance threshold, including:
[0112] S51, calculate the distance between the first transformed point cloud data and the point cloud data to be registered.
[0113] S52, determine whether the distance is less than the preset minimum distance threshold.
[0114] S53, if not, update the simplified point cloud data to the first transformed point cloud data, and return to the step of coarse registration of the simplified point cloud data and the point cloud data to be registered.
[0115] S54, if yes, then registration is confirmed to be complete.
[0116] Specifically, after the initial transformation matrix, the first transformed point cloud data is obtained. Point cloud registration is then determined based on this data, and a minimum distance criterion for point cloud registration is set, denoted as d.min The preset minimum distance threshold is calculated using the following formula.
[0117]
[0118] More specifically, the above formula uses minimizing the Euclidean distance and representing the accuracy of point cloud registration. During the iterative calculation process, each transformation is performed, and f and d are... min Compare once, if f is greater than d min This indicates a poor registration result, requiring the calculation to be restarted from the initial coarse registration steps using the simplified point cloud data and the point cloud data to be registered. If f is less than d... min This indicates that the matching result is good and the algorithm has converged. At this point, the iteration will stop. The transformation matrix obtained when the algorithm converges is the optimal transformation matrix, and the registration is confirmed to be complete.
[0119] The registration results of the traditional point cloud registration method and the point cloud registration method of this invention are represented by positioning and attitude accuracy. The true positioning value is the fixed solution positioning result of GPS. The EVO evaluation system is used for evaluation. The positioning error comparison results are shown in Table 1 below:
[0120]
[0121] Table 1
[0122] As can be seen, the point cloud registration method of the present invention can greatly reduce positioning error and improve positioning accuracy. The maximum positioning error is reduced by 62%, the minimum positioning error is reduced by 87%, and the average positioning accuracy is improved by 49%.
[0123] Based on the fixed attitude solution obtained from GPS, the comparison of attitude errors before and after registration using the traditional point cloud registration method and the point cloud registration method of this invention is shown in Table 2.
[0124]
[0125] Table 2
[0126] As can be seen, the point cloud registration method of the present invention can greatly reduce attitude errors and improve attitude accuracy. The maximum value of the heading angle error is reduced by 63%, the minimum value of the heading angle error is reduced by 85%, and the average heading angle accuracy is improved by 51%; the maximum value of the roll angle error is reduced by 92%, the minimum value of the roll angle error is reduced by 77%, and the average roll angle accuracy is improved by 80%; the maximum value of the pitch angle error is reduced by 72%, the minimum value of the pitch angle error is reduced by 66%, and the average pitch angle accuracy is improved by 75%.
[0127] The registration efficiency of the traditional point cloud registration method and the point cloud registration method of this invention is reflected by the registration time after rotating at different angles. Starting from 5 degrees, data was collected every 10 degrees, and data was collected sequentially from 5 to 175 degrees. The comparison results are shown in Table 3.
[0128]
[0129] Table 3
[0130] As can be seen from the registration time comparison table, the average registration time of the traditional point cloud registration method between 5 and 175 degrees is 9.0775 seconds, while the average registration time of the point cloud registration method of the present invention is 2.5641 seconds, which reduces the average registration time by 354% and greatly improves the registration efficiency.
[0131] The point cloud registration method of this invention first acquires input point cloud data and performs voxelization on it. Based on the voxelization result, the input point cloud data is simplified, and coarse registration is performed between the simplified point cloud data and the point cloud data to be registered, resulting in a preliminary transformation matrix. The simplified point cloud data is then transformed using the preliminary transformation matrix to obtain first transformed point cloud data. Finally, a nearest-point iteration algorithm is used to perform fine registration between the first transformed point cloud data and the point cloud data to be registered, ensuring that the final registration accuracy is less than a preset minimum distance threshold. Voxelization of the point cloud data reduces data complexity without losing point cloud data features, effectively improving registration efficiency, reducing computational load, and consuming less computational resources, thus significantly reducing computational costs. Furthermore, performing coarse registration on nearest point pairs before fine registration, and implementing a secondary screening, filters out incorrectly registered point pairs, improving the accuracy of point cloud registration and thereby improving positioning accuracy.
[0132] The present invention also proposes an electronic device.
[0133] In embodiments of the present invention, such as Figure 8 As shown, the electronic device 100 includes a memory 10 and a processor 20. The memory 10 stores a computer program, and when the computer program is executed by the processor 20, it implements the point cloud registration method described above.
[0134] The present invention also proposes a point cloud registration device.
[0135] In embodiments of the present invention, such as Figure 9As shown, the point cloud registration device 200 includes: an acquisition module 30, used to acquire input point cloud data and perform voxelization processing on the input point cloud data; a simplification module 40, used to simplify the input point cloud data according to the result of voxelization processing to obtain simplified point cloud data; a coarse registration module 50, used to perform coarse registration on the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix; a transformation module 60, used to transform the simplified point cloud data using the preliminary transformation matrix to obtain first transformed point cloud data; and a fine registration module 70, used to perform fine registration on the first transformed point cloud data and the point cloud data to be registered using the nearest point iteration algorithm to ensure that the final registration accuracy is less than a preset minimum distance threshold.
[0136] It should be noted that other specific embodiments of the point cloud registration device of the present invention can be found in the specific embodiments of the point cloud registration method of the above embodiments of the present invention.
[0137] The point cloud registration method, apparatus, and electronic device of this invention acquire input point cloud data and perform voxelization on the input point cloud data; based on the result of the voxelization, the input point cloud data is simplified, and coarse registration is performed between the simplified point cloud data and the point cloud data to be registered to obtain a preliminary transformation matrix; the simplified point cloud data is transformed using the preliminary transformation matrix to obtain first transformed point cloud data; then, the nearest point iteration algorithm is used to perform fine registration between the first transformed point cloud data and the point cloud data to be registered to ensure that the final registration accuracy is less than a preset minimum distance threshold. Voxelization of the point cloud data reduces data complexity without losing point cloud data features, effectively improving registration efficiency, reducing computational load, and consuming less computational resources, thus significantly reducing computational costs. Furthermore, performing coarse registration on nearest point pairs before fine registration, and implementing secondary filtering, filters out incorrectly registered point pairs, improving the accuracy of point cloud registration and thereby improving positioning accuracy.
[0138] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0139] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0140] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0141] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0142] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0143] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0144] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0145] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A point cloud registration method, characterized in that, The method comprises: acquiring input point cloud data and voxelizing the input point cloud data; reducing the input point cloud data according to the result of voxelization to obtain reduced point cloud data; coarsely registering the reduced point cloud data and to-be-registered point cloud data to obtain a preliminary transformation matrix; transforming the reduced point cloud data using the preliminary transformation matrix to obtain first transformed point cloud data; precisely registering the first transformed point cloud data and the to-be-registered point cloud data using a nearest point iteration algorithm so that the final registration accuracy is less than a preset minimum distance threshold; wherein the coarse registration of the reduced point cloud data and the to-be-registered point cloud data to obtain the preliminary transformation matrix comprises: for each point in the reduced point cloud data, determining the nearest neighbor point of the point in the to-be-registered point cloud data to obtain a nearest neighbor point pair, and calculating a vector of the nearest neighbor point pair; screening the nearest neighbor points according to the vectors of the nearest neighbor point pairs to obtain a target point pair; obtaining the preliminary transformation matrix according to the target point pair; the voxelization of the input point cloud data comprises: determining the maximum and minimum values of the input point cloud data in X, Y and Z axis directions; calculating the difference between the maximum and minimum values to obtain the edge length of the three-dimensional range of the input point cloud data; calculating the edge length of the voxel square according to the total number of points of the input point cloud data and the preset number of points contained in a single voxel square; calculating the number of all voxel squares in X, Y and Z axis directions according to the edge length of each voxel square and the edge length of the three-dimensional range; numbering each voxel square to obtain the result of voxelization; the reduction of the input point cloud data according to the result of voxelization comprises: for each voxel square, calculating the centroid of the point cloud data in the voxel square; if the centroid is a point of the point cloud data in the corresponding voxel square, using the centroid to represent the point cloud data in the corresponding voxel square; if the centroid is not a point of the point cloud data in the corresponding voxel square, using the point in the point cloud data in the corresponding voxel square closest to the centroid to represent the point cloud data in the corresponding voxel square.
2. The point cloud registration method of claim 1, wherein, The edge length of the voxel square is calculated by the following formula: wherein, represents a side length of the voxel grid, k1 represents a preset point number of the single voxel grid, and n represents a total point number of the input point cloud data, represents a range side length of the input point cloud data in an X-axis direction, represents a range side length of the input point cloud data in a Y-axis direction, represents a range side length of the input point cloud data in a Z-axis direction.
3. The point cloud registration method of claim 1, wherein, the screening of the nearest neighbor points according to the vectors of the nearest neighbor point pairs to obtain a target point pair comprises: for a point p in the reduced point cloud data, determining the k-nearest neighbor points of the point p in the reduced point cloud data; calculating the vector included angle of the first vector and each second vector, wherein the first vector is the vector of the nearest neighbor point pair of the point p, and the second vector is the vector of the nearest neighbor point pair corresponding to the point in the k-nearest neighbor points; calculating the mean value of the vector included angles and determining whether the mean value is less than a preset threshold; if yes, the nearest neighbor point pair of the point p is determined as the target point pair.
4. The point cloud registration method of claim 1 or 3, wherein, the obtaining of the preliminary transformation matrix according to the target point pair comprises: calculating a first centroid according to the point of the input point cloud data in the target point pair and a second centroid according to the point of the to-be-registered point cloud data in the target point pair; calculating a covariance matrix according to the first centroid, the second centroid and the target point pair; constructing a symmetric matrix according to the covariance matrix and calculating an eigenvector of the symmetric matrix; calculating a rotation matrix according to the eigenvector and a translation matrix according to the rotation matrix, the first centroid and the second centroid; obtaining the preliminary transformation matrix according to the rotation matrix and the translation matrix.
5. The point cloud registration method of claim 1, wherein, The fine registration of the first transformed point cloud data and the point cloud data to be registered by using the nearest point iteration algorithm is to make the final registration accuracy less than a preset minimum distance threshold, and includes: calculating a distance between the first transformed point cloud data and the point cloud data to be registered; judging whether the distance is less than the preset minimum distance threshold; if not, updating the simplified point cloud data as the first transformed point cloud data and returning to the step of the coarse registration of the simplified point cloud data and the point cloud data to be registered; if yes, determining that the registration is completed. 6.An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the point cloud registration method in any one of claims 1-5.
7. A point cloud registration apparatus, characterized by, The device includes: an acquisition module configured to acquire input point cloud data and perform voxelization processing on the input point cloud data; a simplification module configured to simplify the input point cloud data according to a result of the voxelization processing to obtain simplified point cloud data; a coarse registration module configured to coarsely register the simplified point cloud data and point cloud data to be registered to obtain a preliminary transformation matrix; a transformation module configured to transform the simplified point cloud data by using the preliminary transformation matrix to obtain first transformed point cloud data; a fine registration module configured to finely register the first transformed point cloud data and the point cloud data to be registered by using a nearest point iteration algorithm to make final registration accuracy less than a preset minimum distance threshold; the coarse registration module is further configured to determine, for each point in the simplified point cloud data, a nearest neighbor point of the point in the point cloud data to be registered, obtain a nearest neighbor point pair, and calculate a vector of the nearest neighbor point pair; screen the nearest neighbor points according to the vectors of the nearest neighbor point pairs to obtain target point pairs; obtain the preliminary transformation matrix according to the target point pairs; the acquisition module is further configured to determine maximum values and minimum values of the input point cloud data in X, Y and Z axis directions; calculate a difference between the maximum values and the corresponding minimum values to obtain a solid range side length of the input point cloud data; calculate a side length of a voxel square according to a total number of points of the input point cloud data and a preset number of points contained in a single voxel square; calculate the number of all voxel squares in the X, Y and Z axis directions according to the side length of each voxel square and the solid range side length; number each voxel square to obtain a result of the voxelization processing; the simplification module is further configured to calculate a centroid of point cloud data in each voxel square according to the point cloud data in the voxel square; if the centroid is a point of the point cloud data in the corresponding voxel square, use the centroid to represent the point cloud data in the corresponding voxel square; If the centroid is not a point of the point cloud data within the corresponding voxel grid, a point of the point cloud data within the corresponding voxel grid closest to the centroid is used to represent the point cloud data within the corresponding voxel grid.
Citation Information
Patent Citations
Real-time three-dimensional reconstruction method with inertial positioning and point cloud registration coupling complementation
CN106504275A
A fast iteration nearest point registration algorithm based on multiple resolutions
CN109903319A