Point cloud registration method and device based on random sampling and iterative optimization
By identifying and eliminating abnormal points in point cloud registration based on random sampling and iterative optimization methods, the problem of noise and abnormal points affecting registration accuracy in the prior art is solved, and higher point cloud registration accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411592020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-07
AI Technical Summary
When the existing point cloud registration method processes data containing noise and abnormal points, the registration accuracy is low, it is easy to fall into local optimization, and has high dependence on initial alignment.
The point cloud registration method based on random sampling and iterative optimization is adopted to randomly select a subset of point clouds for preliminary registration, identify and eliminate abnormal points, and gradually improve the registration accuracy.
It significantly improves the accuracy and data utilization of point cloud registration, reduces the impact of noise and abnormal points on the registration results, and improves the stability of the registration process.
Smart Images

Figure CN119579659A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of point cloud registration, and in particular to a point cloud registration method and device based on random sampling and iterative optimization. Background Art
[0002] In modern industrial and engineering applications, 3D point cloud data processing technology is widely used in building information modeling (BIM), autonomous driving, robot navigation, 3D reconstruction of bridge components, etc. Point cloud registration technology is a key step in these applications, which aims to accurately align point cloud data from different perspectives or at different times to form a complete and high-precision 3D model.
[0003] Due to factors such as errors in the scanning process, environmental interference, limitations of the measuring equipment, and manufacturing errors of the point cloud acquisition objects, point cloud data usually contains noise and outliers to varying degrees. Existing point cloud registration methods such as the ICP (Iterative Closest Point) algorithm and the UMEYAMA algorithm can align point cloud data to a certain extent, but when processing data containing noise and outliers, they are often greatly affected, resulting in a decrease in registration accuracy. The ICP algorithm is highly dependent on initial alignment and is prone to falling into local optimality, especially in the presence of a large amount of noise and outliers, resulting in unstable convergence results. The UMEYAMA algorithm assumes that the noise is Gaussian distributed during the calculation process. For outliers with non-Gaussian distribution and a large amount of noise, its matching effect is poor, and it is difficult to accurately align point cloud data. Summary of the invention
[0004] The present application provides a point cloud registration method and device based on random sampling and iterative optimization, which can solve the technical problem of low registration accuracy when processing data containing noise and abnormal points in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a point cloud registration method based on random sampling and iterative optimization, and the point cloud registration method based on random sampling and iterative optimization includes:
[0006] Perform preliminary registration on the first point cloud and the second point cloud: randomly extract a target number of points from the first point cloud to obtain a first subset, obtain corresponding points of all points in the first subset from the second point cloud to obtain a second subset, register the first subset and the second subset to obtain a first similarity transformation matrix, and transform the second subset according to the first similarity transformation matrix to obtain a third subset;
[0007] If the deviation of any point pair in the first subset and the third subset is greater than or equal to the deviation threshold, the first point cloud and the second point cloud are preliminarily re-registered;
[0008] If the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, the second point cloud is transformed according to the first similarity transformation matrix to obtain a third point cloud, and an abnormal point is determined from the first point cloud, wherein the deviation between the abnormal point and the corresponding point in the third point cloud is greater than or equal to the deviation threshold;
[0009] All abnormal points are removed from the first point cloud to obtain a fourth subset, and corresponding points of all abnormal points are removed from the second point cloud to obtain a fifth subset. The fourth subset and the fifth subset are registered to obtain a second similarity transformation matrix.
[0010] Furthermore, in one embodiment, before the step of re-registering the first point cloud and the second point cloud, the method further includes:
[0011] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is greater than a preset lower limit, the number of targets is reduced.
[0012] Furthermore, in one embodiment, before the step of re-registering the first point cloud and the second point cloud, the method further includes:
[0013] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is equal to a preset lower limit, the deviation threshold is increased.
[0014] Furthermore, in one embodiment, after the step of transforming the second point cloud according to the first similarity transformation matrix to obtain the third point cloud and determining the abnormal points from the first point cloud, the method further includes:
[0015] If the number of abnormal points is greater than or equal to the number threshold, the target number is increased and / or the deviation threshold is reduced, and the first point cloud and the second point cloud are preliminarily registered again.
[0016] Furthermore, in one embodiment, after the step of registering the fourth subset and the fifth subset to obtain the second similarity transformation matrix, the following step is further included:
[0017] Transforming the second point cloud according to the second similarity transformation matrix to obtain a fourth point cloud;
[0018] Output the deviation of each point pair in the first point cloud and the fourth point cloud.
[0019] In a second aspect, an embodiment of the present application further provides a point cloud registration device based on random sampling and iterative optimization, the point cloud registration device based on random sampling and iterative optimization comprising:
[0020] A preliminary registration module is used to perform preliminary registration on the first point cloud and the second point cloud: randomly extract a target number of points from the first point cloud to obtain a first subset, obtain corresponding points of all points in the first subset from the second point cloud to obtain a second subset, register the first subset and the second subset to obtain a first similarity transformation matrix, and transform the second subset according to the first similarity transformation matrix to obtain a third subset;
[0021] an iterative optimization module, configured to re-perform a preliminary registration on the first point cloud and the second point cloud if the deviation of any point pair in the first subset and the third subset is greater than or equal to a deviation threshold;
[0022] an anomaly locating module, for, if the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, transforming the second point cloud according to the first similarity transformation matrix to obtain a third point cloud, and determining an abnormal point from the first point cloud, wherein the deviation of the abnormal point from the corresponding point in the third point cloud is greater than or equal to the deviation threshold;
[0023] The final registration module is used to remove all abnormal points from the first point cloud to obtain a fourth subset, remove corresponding points of all abnormal points from the second point cloud to obtain a fifth subset, and register the fourth subset and the fifth subset to obtain a second similarity transformation matrix.
[0024] Furthermore, in one embodiment, the iterative optimization module is also used to:
[0025] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is greater than a preset lower limit, the number of targets is reduced.
[0026] Furthermore, in one embodiment, the iterative optimization module is also used to:
[0027] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is equal to a preset lower limit, the deviation threshold is increased.
[0028] Furthermore, in one embodiment, the iterative optimization module is also used to:
[0029] If the number of abnormal points is greater than or equal to the number threshold, the target number is increased and / or the deviation threshold is reduced, and the first point cloud and the second point cloud are preliminarily registered again.
[0030] Furthermore, in one embodiment, the point cloud registration device based on random sampling and iterative optimization further includes a deviation output module, which is used to:
[0031] Transforming the second point cloud according to the second similarity transformation matrix to obtain a fourth point cloud;
[0032] Output the deviation of each point pair in the first point cloud and the fourth point cloud.
[0033] In this application, two subsets are obtained by random sampling of the two point clouds to be registered, and the two subsets are preliminarily registered. If there are point pairs with large deviations after the preliminary registration, it means that abnormal point pairs have been extracted, and random sampling needs to be performed again until there are no point pairs with large deviations, indicating that the two subsets have successfully avoided all abnormal point pairs. The abnormal point pairs are removed from the two point clouds to be registered with the help of their similarity transformation matrix. After removing the abnormal point pairs, the two point clouds are finally registered to obtain a high-precision similarity transformation matrix. Through this application, when processing point cloud data containing noise and abnormal points, the registration accuracy and data utilization can be significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of a process of a point cloud registration method based on random sampling and iterative optimization in an embodiment of the present application;
[0035] Figure 2 This is a schematic diagram of a process for updating a target quantity in an embodiment of the present application;
[0036] Figure 3 Schematic diagram of functional modules of a point cloud registration device based on random sampling and iterative optimization in one embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0039] In a first aspect, an embodiment of the present application provides a point cloud registration method based on random sampling and iterative optimization.
[0040] Figure 1 A flow chart of a point cloud registration method based on random sampling and iterative optimization in one embodiment of the present application is shown.
[0041] Reference Figure 1 In one embodiment, a point cloud registration method based on random sampling and iterative optimization includes the following steps:
[0042] S1. Preliminary registration of the first point cloud and the second point cloud: randomly extract a target number of points from the first point cloud to obtain a first subset, obtain corresponding points of all points in the first subset from the second point cloud to obtain a second subset, align the first subset and the second subset to obtain a first similarity transformation matrix, and transform the second subset according to the first similarity transformation matrix to obtain a third subset.
[0043] Specifically, the first point cloud and the second point cloud are not point cloud data directly obtained by scanning with an acquisition device (such as a handheld 3D laser scanner), but point cloud data that has undergone certain preprocessing, each point therein representing a certain feature on the physical object. The number of points in the first point cloud and the second point cloud is equal, and the points correspond one to one. In this article, two points with a corresponding relationship are called a point pair.
[0044] The first point cloud and the second point cloud may be obtained from point cloud data collected from the same entity object at different times and different perspectives, and the point pair represents the same feature on the entity object. The first point cloud and the second point cloud may also be obtained from point cloud data on the assembly contact surfaces of the two entity objects, and the point pair represents two features that are approximately overlapped after the two entity objects are assembled.
[0045] For example, a handheld 3D laser scanner is used to collect original point cloud data of two components to be connected, a straight-through filter is used to preprocess the original point cloud data to eliminate irrelevant data points, voxel down-sampling technology is used to reduce the total number of data points and maintain the integrity of the data structure, and point cloud segmentation technology is used to divide the overall structure into multiple parts with unique features. By fitting a cylindrical model and projecting it onto a corresponding plane, the center point coordinates and diameter of the bolt hole are accurately determined, and the center points of the bolt hole groups of the two components to be connected form the first point cloud and the second point cloud.
[0046] The first point cloud is the target point cloud, and the second point cloud is the source point cloud. Since there may be some abnormal point pairs in the first point cloud and the second point cloud, when the normal point pairs are almost overlapped, there are still large deviations in the abnormal point pairs. If the first point cloud and the second point cloud are directly globally aligned, the deviations of the abnormal point pairs will be distributed to the normal point pairs, resulting in a decrease in the overall alignment accuracy.
[0047] In this step, a part of point pairs are randomly extracted from the first point cloud and the second point cloud. If all the extracted point pairs are normal, on the one hand, the deviation of each point pair in the first subset and the second subset after alignment according to the first similarity transformation matrix is small, that is, the deviation of each point pair in the first subset and the third subset is small, and on the other hand, the first similarity transformation matrix is close to the similarity transformation matrix of all normal point pairs in the first point cloud and the second point cloud (referred to as the ideal similarity transformation matrix).
[0048] It should be noted that the number of targets can be configured according to the scale of the first point cloud and the second point cloud. The smaller the number of targets, the easier it is to avoid abnormal point pairs, but the small sample size of normal point pairs will lead to insufficient representativeness, making it easy for the first similarity transformation matrix to deviate greatly from the ideal similarity transformation matrix. Correspondingly, the larger the number of targets, the easier it is to draw abnormal point pairs, but if the abnormal point pairs are successfully avoided, the first similarity transformation matrix will be closer to the ideal similarity transformation matrix.
[0049] S2. If the deviation of any point pair in the first subset and the third subset is greater than or equal to the deviation threshold, the first point cloud and the second point cloud are preliminarily re-registered.
[0050] In this step, if the deviation of any point pair in the first subset and the third subset is greater than or equal to the deviation threshold, it means that the first subset and the second subset randomly sampled contain abnormal point pairs, resulting in the failure of preliminary alignment, and preliminary alignment needs to be performed again, that is, step S1 is re-executed.
[0051] Optionally, the deviation may be the distance between the point pairs in the X, Y, and Z directions, corresponding to three deviation thresholds in the X, Y, and Z directions, or may be the Euclidean distance between the point pairs.
[0052] For example, assuming that the first point cloud and the second point cloud are the center points of the bolt hole groups on the assembly contact surfaces of the two components, and it is desired to exclude abnormal point pairs caused by manufacturing errors of the bolt holes, the deviation threshold can be set with reference to the diameter of the bolt holes. For example, for a bolt hole with a diameter of 30 mm, the deviation threshold for measuring the Euclidean distance between point pairs can be set to 10 mm.
[0053] S3. If the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, the second point cloud is transformed according to the first similarity transformation matrix to obtain a third point cloud, and the abnormal point is determined from the first point cloud, wherein the deviation between the abnormal point and the corresponding point in the third point cloud is greater than or equal to the deviation threshold.
[0054] In this step, the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, indicating that the first subset and the second subset randomly sampled do not contain abnormal point pairs, and the preliminary alignment is successful. The second point cloud is preliminarily aligned to the first point cloud according to the first similarity transformation matrix. After alignment, the point pairs whose deviations are greater than or equal to the deviation threshold are abnormal point pairs and need to be eliminated, otherwise it will affect the alignment of the first point cloud and the second point cloud.
[0055] It should be noted that, since the first subset and the second subset have been preliminarily aligned and the deviation calculated through the first similarity transformation matrix, only the other point pairs in the first point cloud and the second point cloud may be preliminarily aligned and the deviation calculated subsequently to reduce the amount of calculation.
[0056] S4. Eliminate all abnormal points from the first point cloud to obtain a fourth subset, eliminate corresponding points of all abnormal points from the second point cloud to obtain a fifth subset, and align the fourth subset and the fifth subset to obtain a second similarity transformation matrix.
[0057] In this step, the first point cloud and the second point cloud with all abnormal point pairs removed are finally aligned to obtain a second similarity transformation matrix.
[0058] It should be noted that the difference between the preliminary registration and the final registration lies mainly in the scale of the point pairs involved in the registration. The preliminary registration and the final registration can use the same or different point cloud registration algorithms.
[0059] Optionally, the point cloud registration algorithm may adopt the UMEYAMA algorithm to ensure the robustness and accuracy of the registration process. The similarity transformation matrix usually includes a rotation matrix, a translation vector and a scaling factor.
[0060] Therefore, in this embodiment, two subsets are obtained by random sampling of the two point clouds to be registered, and the two subsets are preliminarily registered. If there are point pairs with large deviations after the preliminary registration, it means that abnormal point pairs have been extracted, and random sampling needs to be performed again until there are no point pairs with large deviations, indicating that the two subsets have successfully avoided all abnormal point pairs, and the abnormal point pairs are eliminated from the two point clouds to be registered with the help of their similarity transformation matrix. After eliminating the abnormal point pairs, the two point clouds are finally registered to obtain a high-precision similarity transformation matrix. Through this embodiment, when processing point cloud data containing noise and abnormal points, the registration accuracy and data utilization rate can be significantly improved.
[0061] Furthermore, in one embodiment, before the step of re-registering the first point cloud and the second point cloud, the method further includes:
[0062] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is greater than a preset lower limit, the number of targets is reduced.
[0063] In this embodiment, the number of targets decreases in stages as the number of iterations increases. In the previous iteration rounds, a larger number of targets is first tried, and the reliability of the first similarity transformation matrix is prioritized. After multiple preliminary registration failures, a smaller number of targets is used to improve the success rate of the preliminary registration and avoid taking too long overall time, thereby taking into account both the reliability and efficiency of the preliminary registration.
[0064] For example, the preset lower limit is equal to 4. According to actual experience, when the number of point pairs is less than 4, the registration result has no reference value.
[0065] Figure 2 A schematic diagram of a process for updating a target quantity in an embodiment of the present application is shown.
[0066] Reference Figure 2 First, determine the number of targets and perform preliminary alignment. If successful, output the first similarity transformation matrix and end the iteration. If failed, the number of preliminary alignments increases by one, and the initial value is zero. If the number of preliminary alignments reaches the threshold and the number of targets is greater than the preset lower limit, reduce the number of targets and perform preliminary alignment again. Otherwise, perform preliminary alignment again directly.
[0067] Furthermore, in one embodiment, before the step of re-registering the first point cloud and the second point cloud, the method further includes:
[0068] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is equal to a preset lower limit, the deviation threshold is increased.
[0069] In this embodiment, when the number of targets is equal to the preset lower limit, the preliminary alignment cannot be successfully completed within the number threshold, which means that the deviation threshold may be set too small, and some normal point pairs are misjudged as abnormal point pairs, resulting in unsuccessful preliminary alignment. By increasing the deviation threshold, the success rate of the preliminary alignment can be further improved.
[0070] Furthermore, in one embodiment, after the step of transforming the second point cloud according to the first similarity transformation matrix to obtain the third point cloud and determining the abnormal points from the first point cloud, the method further includes:
[0071] If the number of abnormal points is greater than or equal to the number threshold, the target number is increased and / or the deviation threshold is reduced, and the first point cloud and the second point cloud are preliminarily registered again.
[0072] In this embodiment, considering that under normal circumstances, the number of abnormal point pairs in the first point cloud and the second point cloud cannot be too many, at least cannot be more than the number of normal point pairs, if the initial registration is successful, but after aligning the first point cloud and the second point cloud according to the first similarity transformation matrix, the number of abnormal point pairs detected is too large, it means that at least one of the target number and the deviation threshold is set unreasonably, resulting in the unreliability of the first similarity transformation matrix. Therefore, it is necessary to set the requirements for the success of the initial registration more strictly, that is, it is necessary to reduce the success rate of the initial registration, which can be achieved by increasing the number of targets and reducing the deviation threshold.
[0073] Furthermore, in one embodiment, after the step of registering the fourth subset and the fifth subset to obtain the second similarity transformation matrix, the following step is further included:
[0074] Transforming the second point cloud according to the second similarity transformation matrix to obtain a fourth point cloud;
[0075] Output the deviation of each point pair in the first point cloud and the fourth point cloud.
[0076] In this embodiment, the deviation between the first point cloud and the second point cloud after being aligned by the second similarity transformation matrix is output to show the deviation between normal point pairs and abnormal point pairs, thereby providing more reference information.
[0077] For example, when the first point cloud and the second point cloud are the center points of the bolt hole groups on the assembly contact surfaces of the two components, the deviation of each point pair in the first point cloud and the fourth point cloud can reflect the processing errors of the bolt hole groups on the two components.
[0078] The following experimental data are provided to prove the implementation effect of this scheme.
[0079] Now suppose there are two groups of point clouds, A and B. Point cloud B is obtained by rotating point cloud A 30° around the x-axis, 45° around the y-axis, and 60° around the z-axis, and moving 500 mm along the positive direction of the x-axis. In addition, a deviation of 100 mm in the positive x-direction is given to points 28, 46, and 54 in point cloud B. Point clouds A and B are shown in Table 1.
[0080] Table 1
[0081]
[0082]
[0083]
[0084] The A point cloud and the B point cloud are directly registered using the UMEYAMA algorithm. The results are shown in Table 2.
[0085] Table 2
[0086]
[0087]
[0088] The preliminary and final registrations proposed in this scheme are performed on point cloud A and point cloud B through UMEYAMA, and the results are shown in Table 3. It can be seen that this scheme can accurately identify and remove abnormal point pairs, significantly improving the registration accuracy.
[0089] Table 3
[0090]
[0091]
[0092] In a second aspect, an embodiment of the present application also provides a point cloud registration device based on random sampling and iterative optimization.
[0093] Figure 3 A schematic diagram of functional modules of a point cloud registration device based on random sampling and iterative optimization in one embodiment of the present application is shown.
[0094] Reference Figure 3 In one embodiment, a point cloud registration device based on random sampling and iterative optimization includes:
[0095] The preliminary registration module 10 is used to perform preliminary registration on the first point cloud and the second point cloud: randomly extract a target number of points from the first point cloud to obtain a first subset, obtain corresponding points of all points in the first subset from the second point cloud to obtain a second subset, register the first subset and the second subset to obtain a first similarity transformation matrix, and transform the second subset according to the first similarity transformation matrix to obtain a third subset;
[0096] an iterative optimization module 20, configured to re-perform a preliminary registration on the first point cloud and the second point cloud if the deviation of any point pair in the first subset and the third subset is greater than or equal to a deviation threshold;
[0097] an anomaly locating module 30, for, if the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, transforming the second point cloud according to the first similarity transformation matrix to obtain a third point cloud, and determining an abnormal point from the first point cloud, wherein the deviation of the abnormal point from the corresponding point in the third point cloud is greater than or equal to the deviation threshold;
[0098] The final registration module 40 is used to remove all abnormal points from the first point cloud to obtain a fourth subset, remove corresponding points of all abnormal points from the second point cloud to obtain a fifth subset, and register the fourth subset and the fifth subset to obtain a second similarity transformation matrix.
[0099] Furthermore, in one embodiment, the iterative optimization module 20 is further configured to:
[0100] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is greater than a preset lower limit, the number of targets is reduced.
[0101] Furthermore, in one embodiment, the iterative optimization module 20 is further configured to:
[0102] If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is equal to a preset lower limit, the deviation threshold is increased.
[0103] Furthermore, in one embodiment, the iterative optimization module 20 is further configured to:
[0104] If the number of abnormal points is greater than or equal to the number threshold, the target number is increased and / or the deviation threshold is reduced, and the first point cloud and the second point cloud are preliminarily registered again.
[0105] Furthermore, in one embodiment, the point cloud registration device based on random sampling and iterative optimization further includes a deviation output module, which is used to:
[0106] Transforming the second point cloud according to the second similarity transformation matrix to obtain a fourth point cloud;
[0107] Output the deviation of each point pair in the first point cloud and the fourth point cloud.
[0108] Among them, the functional implementation of each module in the above-mentioned point cloud registration device based on random sampling and iterative optimization corresponds to the steps in the above-mentioned point cloud registration method embodiment based on random sampling and iterative optimization, and its functions and implementation process will not be repeated here one by one.
[0109] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0110] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0111] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0112] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0113] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0115] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A point cloud registration method based on random sampling and iterative optimization, characterized in that: The point cloud registration method based on random sampling and iterative optimization includes: Perform preliminary registration on the first point cloud and the second point cloud: randomly extract a target number of points from the first point cloud to obtain a first subset, obtain corresponding points of all points in the first subset from the second point cloud to obtain a second subset, register the first subset and the second subset to obtain a first similarity transformation matrix, and transform the second subset according to the first similarity transformation matrix to obtain a third subset; If the deviation of any point pair in the first subset and the third subset is greater than or equal to the deviation threshold, the first point cloud and the second point cloud are preliminarily re-registered; If the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, the second point cloud is transformed according to the first similarity transformation matrix to obtain a third point cloud, and an abnormal point is determined from the first point cloud, wherein the deviation between the abnormal point and the corresponding point in the third point cloud is greater than or equal to the deviation threshold; All abnormal points are removed from the first point cloud to obtain a fourth subset, and corresponding points of all abnormal points are removed from the second point cloud to obtain a fifth subset. The fourth subset and the fifth subset are registered to obtain a second similarity transformation matrix.
2. The point cloud registration method based on random sampling and iterative optimization according to claim 1, characterized in that: Before the step of re-registering the first point cloud and the second point cloud preliminarily, the method further includes: If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is greater than a preset lower limit, the number of targets is reduced.
3. The point cloud registration method based on random sampling and iterative optimization according to claim 2, characterized in that: Before the step of re-registering the first point cloud and the second point cloud preliminarily, the method further includes: If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is equal to a preset lower limit, the deviation threshold is increased.
4. The point cloud registration method based on random sampling and iterative optimization according to claim 1, characterized in that: After the step of transforming the second point cloud according to the first similarity transformation matrix to obtain the third point cloud and determining the abnormal points from the first point cloud, the method further includes: If the number of abnormal points is greater than or equal to the number threshold, the target number is increased and / or the deviation threshold is reduced, and the first point cloud and the second point cloud are preliminarily registered again.
5. The point cloud registration method based on random sampling and iterative optimization according to any one of claims 1 to 4, characterized in that: After the step of registering the fourth subset and the fifth subset to obtain a second similarity transformation matrix, the method further includes: Transforming the second point cloud according to the second similarity transformation matrix to obtain a fourth point cloud; Output the deviation of each point pair in the first point cloud and the fourth point cloud.
6. A point cloud registration device based on random sampling and iterative optimization, characterized in that: The point cloud registration device based on random sampling and iterative optimization includes: A preliminary registration module is used to perform preliminary registration on the first point cloud and the second point cloud: randomly extract a target number of points from the first point cloud to obtain a first subset, obtain corresponding points of all points in the first subset from the second point cloud to obtain a second subset, register the first subset and the second subset to obtain a first similarity transformation matrix, and transform the second subset according to the first similarity transformation matrix to obtain a third subset; an iterative optimization module, configured to re-perform a preliminary registration on the first point cloud and the second point cloud if the deviation of any point pair in the first subset and the third subset is greater than or equal to a deviation threshold; an anomaly locating module, for, if the deviation of each point pair in the first subset and the third subset is less than the deviation threshold, transforming the second point cloud according to the first similarity transformation matrix to obtain a third point cloud, and determining an abnormal point from the first point cloud, wherein the deviation of the abnormal point from the corresponding point in the third point cloud is greater than or equal to the deviation threshold; The final registration module is used to remove all abnormal points from the first point cloud to obtain a fourth subset, remove corresponding points of all abnormal points from the second point cloud to obtain a fifth subset, and register the fourth subset and the fifth subset to obtain a second similarity transformation matrix.
7. The point cloud registration device based on random sampling and iterative optimization according to claim 6, characterized in that: The iterative optimization module is also used to: If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is greater than a preset lower limit, the number of targets is reduced.
8. The point cloud registration device based on random sampling and iterative optimization according to claim 7, characterized in that: The iterative optimization module is also used to: If the number of times the first point cloud and the second point cloud are preliminarily registered with the current number of targets reaches a number threshold, and the current number of targets is equal to a preset lower limit, the deviation threshold is increased.
9. The point cloud registration device based on random sampling and iterative optimization according to claim 6, characterized in that: The iterative optimization module is also used to: If the number of abnormal points is greater than or equal to the number threshold, the target number is increased and / or the deviation threshold is reduced, and the first point cloud and the second point cloud are preliminarily registered again.
10. The point cloud registration device based on random sampling and iterative optimization according to any one of claims 6 to 9, characterized in that: The point cloud registration device based on random sampling and iterative optimization also includes a deviation output module for: Transforming the second point cloud according to the second similarity transformation matrix to obtain a fourth point cloud; Output the deviation of each point pair in the first point cloud and the fourth point cloud.