A three-dimensional point cloud registration method, device, medium and electronic equipment
By using an octree to store point cloud feature points in 3D point cloud registration and introducing reinforcement learning to select the optimal set of feature points, the problem of insufficient accuracy in traditional methods is solved, and efficient global optimization registration is achieved.
Patent Information
- Application Number
- CN202210873867.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-07-20
AI Technical Summary
Traditional 3D point cloud registration methods cannot meet engineering requirements in real-world scenarios due to limitations in point cloud sparsity and insufficient features.
Point cloud feature points are stored using an octree structure, and reinforcement learning is used to select the optimal set of feature points from them. The homogeneous pose transformation matrix is then calculated for point cloud registration.
It achieves globally optimized 3D point cloud registration, improving registration accuracy and efficiency, and meeting engineering requirements.
Smart Images

Figure CN115239779B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional point cloud registration, and particularly relates to a three-dimensional point cloud registration method, device, medium and electronic equipment. BACKGROUND
[0002] 3D point cloud registration is one of the key research problems of computer vision, and has important applications in various visual field engineering applications, such as reverse engineering, simultaneous localization and mapping (SLAM), image processing and pattern recognition. The purpose of point cloud registration is to solve the transformation matrix of point clouds in different poses under the same coordinate, and to realize accurate registration of point clouds under multi-view scenes by using the matrix, and finally to obtain a complete 3D digital model and scene. Traditional 3D point cloud registration methods are mostly based on ICP algorithm or improved algorithms such as NDT algorithm, which are limited to the sparsity of point clouds and the lack of features obtained by principal component analysis, and the registration accuracy in real scenes often cannot meet the engineering requirements. SUMMARY
[0003] Therefore, the embodiments of the present application provide a three-dimensional point cloud registration method, device, medium and electronic equipment to overcome the problem that the registration accuracy of the three-dimensional point cloud registration method in the prior art cannot be low in real scenes and cannot meet the engineering requirements.
[0004] According to a first aspect, the embodiments of the present application provide a three-dimensional point cloud registration method, comprising:
[0005] obtaining original point cloud data corresponding to a target scene under a current view and target point cloud data corresponding to the target scene under a target view;
[0006] extracting the same point cloud feature points from the original point cloud data and the target point cloud data, and storing the extracted feature points in an octree, each leaf node of the octree corresponding to a plurality of point cloud feature points;
[0007] selecting point cloud feature points from each leaf node of the octree to form an optimal point cloud feature point set through reinforcement learning;
[0008] calculating a target homogeneous pose transformation matrix by using the optimal point cloud feature point set and the point cloud feature points in the target point cloud data corresponding to the optimal point cloud feature point set;
[0009] performing point cloud registration on the original point cloud data by using the target homogeneous pose transformation matrix to obtain point cloud registration data under the target view.
[0010] Optionally, the selecting point cloud feature points from each leaf node of the octree to form an initial point cloud feature point set comprises:
[0011] selecting point cloud feature points from each leaf node of the octree to form an initial point cloud feature point set;
[0012] calculating a current homogeneous pose transformation matrix based on the initial point cloud feature point set and point cloud feature points corresponding to the initial point cloud feature point set in the target point cloud data;
[0013] performing point cloud registration on each point cloud feature point of the initial point cloud feature point set using the current homogeneous pose transformation matrix to obtain each registration feature point;
[0014] calculating the Euclidean distance between each registration feature point and the corresponding point cloud feature point in the target point cloud data;
[0015] taking the average of the Euclidean distances of the point cloud feature points other than the current point cloud feature point as the distance feature of the current point cloud feature point;
[0016] performing reinforcement learning update on the initial point cloud feature point set based on the distance features of the point cloud feature points in the initial point cloud feature point set, with the minimum distance feature as the reinforcement learning target, to obtain an optimal point cloud feature point set.
[0017] Optionally, the selecting point cloud feature points from each leaf node of the octree to form an initial point cloud feature point set comprises:
[0018] sequentially and randomly selecting point cloud feature points from each leaf node of the octree to form a plurality of candidate point cloud feature point sets;
[0019] calculating candidate homogeneous pose transformation matrices using each candidate point cloud feature point set and point cloud feature points corresponding to the candidate point cloud feature point set in the target point cloud data;
[0020] performing point cloud registration on each point cloud feature point of the candidate point cloud feature point set using the candidate homogeneous pose transformation matrix;
[0021] calculating the Euclidean distance between each point cloud feature point of the candidate point cloud feature point set after point cloud registration and the corresponding point cloud feature point under the target view angle;
[0022] selecting the initial point cloud feature point set from the plurality of candidate point cloud feature point sets according to the Euclidean distance between each point cloud feature point of the candidate point cloud feature point set after point cloud registration and the corresponding point cloud feature point under the target view angle.
[0023] Optionally, the step of selecting the initial point cloud feature point set from each candidate point cloud feature point set according to the Euclidean distance between the point cloud feature points of each candidate point cloud feature point set after point cloud registration and their corresponding point cloud feature points in the target view includes:
[0024] Based on the Euclidean distance between each candidate point cloud feature point set and its corresponding point cloud feature point in the target view, the mean distance of each candidate point cloud feature point set to all point cloud feature points is calculated.
[0025] The initial point cloud feature point set is selected from each candidate octree according to the average distance of all point cloud feature points corresponding to each candidate point cloud feature point set in ascending order.
[0026] Optionally, the step of updating the initial point cloud feature point set based on the distance features of each point cloud feature point in the initial point cloud feature point set, using the distance features as the reinforcement learning target, to obtain the optimal point cloud feature point set includes:
[0027] Remove the first point cloud feature point with the largest distance feature from the initial point cloud feature set;
[0028] Then, a second point cloud feature point is selected from the leaf node of the octree corresponding to the first point cloud feature point and added to the initial point cloud feature set. The step of calculating the current homogeneous pose transformation matrix based on the initial point cloud feature point set and the point cloud feature points in the target point cloud data that correspond to the initial point cloud feature point set is returned to perform reinforcement learning until the optimal point cloud feature point set is obtained.
[0029] Optionally, extracting point cloud feature points from the original point cloud data that are identical to those in the target point cloud data includes:
[0030] A random sampling consistency algorithm is used to extract point cloud feature points from the original point cloud data that are identical to those in the target point cloud data.
[0031] Optionally, before extracting the same point cloud feature points from the original point cloud data as those in the target point cloud data, the method further includes:
[0032] The origin point cloud data and the target point cloud data are filtered.
[0033] According to a second aspect, embodiments of the present invention provide a three-dimensional point cloud registration device, comprising:
[0034] The acquisition module is used to acquire the origin point cloud data of the target scene in the current view and the target point cloud data in the target view.
[0035] The first processing module is configured to extract the same point cloud feature points from the original point cloud data as in the target point cloud data, and store the extracted feature points in an octree, each leaf node of the octree corresponding to a plurality of point cloud feature points;
[0036] The second processing module is configured to select point cloud feature points from each leaf node of the octree to form an optimal point cloud feature point set through reinforcement learning;
[0037] The third processing module is configured to calculate a target homogeneous pose transformation matrix by using the optimal point cloud feature point set and point cloud feature points corresponding to the optimal point cloud feature point set in the target point cloud data.
[0038] The fourth processing module is configured to perform point cloud registration on the original point cloud data by using the target homogeneous pose transformation matrix to obtain point cloud registration data under the target view angle.
[0039] According to a third aspect, an electronic device is provided, including:
[0040] The memory and the processor are connected with each other in communication, the memory stores computer instructions, and the processor executes the computer instructions to perform the method in the first aspect or any optional implementation manner thereof.
[0041] According to a fourth aspect, a computer readable storage medium is provided, which stores computer instructions for causing a computer to perform the method in the first aspect or any optional implementation manner thereof.
[0042] The technical scheme of the present application has the following advantages:
[0043] The 3D point cloud registration method provided in this invention involves: acquiring the original point cloud data of the target scene from the current viewpoint and the target point cloud data from the target viewpoint; extracting point cloud feature points identical to those in the target point cloud data from the original point cloud data and storing the extracted feature points in an octree, where each leaf node of the octree corresponds to several point cloud feature points; selecting point cloud feature points from each leaf node of the octree through reinforcement learning to form an optimal point cloud feature point set; calculating the target homogeneous pose transformation matrix using the optimal point cloud feature point set and the point cloud feature points in the target point cloud data corresponding to the optimal point cloud feature point set; and performing point cloud registration on the original point cloud data using the target homogeneous pose transformation matrix to obtain the point cloud registration data from the target viewpoint. By utilizing an octree data structure to store point cloud feature points, and then introducing reinforcement learning to learn from the point cloud feature points in the octree to find the optimal feature points, the learning process ensures that the range of point cloud feature points is traversed. This cleverly solves the problem that traditional methods only obtain local optima, achieving globally optimized 3D point cloud registration and improving the accuracy of point cloud registration to meet engineering requirements. Furthermore, by first extracting the matching point cloud feature points and using the extracted point cloud feature points as reinforcement learning input data, the accuracy of optimal feature point extraction is guaranteed while greatly improving the efficiency of point cloud registration. Attached Figure Description
[0044] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0045] Figure 1 This is a flowchart of a three-dimensional point cloud registration method according to an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram illustrating the specific process of implementing the three-dimensional point cloud registration function in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of an octree data structure according to an embodiment of the present invention;
[0048] Figure 4 This is a diagram of the basic reinforcement learning model in an embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram illustrating the specific process of the interaction between the octree and the environment in an embodiment of the present invention;
[0050] Figure 6 This is a diagram illustrating the specific working process of 3D point cloud registration in an embodiment of the present invention.
[0051] Figure 7 FIG. 1 is a structural schematic diagram of a three-dimensional point cloud registration device according to an embodiment of the present application;
[0052] Figure 8 FIG. 2 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0054] The technical features involved in different embodiments of the present application described below can be combined with each other as long as there is no conflict.
[0055] 3D point cloud registration is one of the key research problems in computer vision and has important applications in various visual field engineering applications, such as reverse engineering, simultaneous localization and mapping (SLAM), image processing and pattern recognition, etc. The purpose of point cloud registration is to solve the transformation matrix of point clouds in different poses in the same coordinate, to realize accurate registration of point clouds in multi-view scenes by using the matrix, and finally to obtain a complete 3D digital model and scene. Traditional 3D point cloud registration methods are mostly based on ICP algorithm or improved algorithms such as NDT algorithm, which are limited to the sparsity of point clouds and the lack of features obtained by principal component analysis, and the registration accuracy in real scenes often cannot meet the engineering requirements.
[0056] Based on the above problems, the embodiments of the present application provide a three-dimensional point cloud registration method, as shown in FIG. 1, which specifically includes the following steps: Figure 1
[0057] Step S101: Obtain the original point cloud data corresponding to a target scene in a current view and the target point cloud data corresponding to the target scene in a target view.
[0058] In practical applications, in order to solve the multi-camera point cloud registration and the next step of multi-view point cloud fusion, it is necessary to perform multi-angle shooting on a scene space requiring point cloud fusion based on multiple cameras, and then process the point cloud data of the multiple cameras to realize three-dimensional point cloud registration and fusion, and even reconstruction. In the embodiment of the present application, taking the shooting of point cloud data by two cameras at different angles as an example, the point cloud data obtained by the camera 1 is the original point cloud data, and the point cloud data obtained by the camera 2 is the target point cloud data. The key to realizing the registration of the original point cloud data and the target point cloud data is to obtain the homogeneous pose transformation matrix (hereinafter referred to as the RT matrix) between them. It should be noted that the three-dimensional point cloud registration method provided in the embodiment of the present application can also be applied to the fusion of point cloud data shot by multiple cameras at different angles. By performing point cloud registration on the point cloud data shot by multiple cameras and the target point cloud data, that is, by using the point cloud registration result obtained by using the three-dimensional point cloud registration method provided in the embodiment of the present application to perform point cloud fusion of multiple cameras, the specific implementation process from point cloud registration to point cloud fusion is the prior art, which will not be described here.
[0059] Step S102: Extract the same point cloud feature points from the original point cloud data and the target point cloud data, and store the extracted feature points in the octree.
[0060] Each leaf node of the octree corresponds to a plurality of point cloud feature points.
[0061] Specifically, in the embodiment of the present application, as shown in Figure 2 First, the original point cloud data and the target point cloud data are filtered to exclude the interference of outliers. Then, the same point cloud feature points are extracted from the original point cloud data and the target point cloud data by using the random sample consensus algorithm. In practical applications, the point cloud feature point sets of the camera 1 and the camera 2 are extracted respectively, and the extracted point cloud feature point set of the camera 1 is denoted as Pointcloud1, and the point cloud feature point set of the camera 2 is denoted as Pointcloud2. It should be noted that in practical applications, other algorithms can also be used to extract point cloud feature points from point cloud data at different angles, such as 4PCS and super-4PCS algorithms, and the present application is not limited thereto.
[0062] Thus, by using the random sample consensus algorithm, the mathematical model is estimated from the pre-registered large amount of point cloud data by using the iterative method, the matching feature points are extracted, and the extracted feature points are used as the reinforcement learning input data, which ensures the accuracy of the optimal feature point extraction and greatly improves the efficiency of the point cloud registration.
[0063] Octree is a tree data structure used to describe three-dimensional space: the point cloud data obtained by radar, laser scanning, stereo camera and other three-dimensional measurement devices has the characteristics of large data volume and uneven distribution, and the point cloud data mainly represents a large number of point sets on the target surface, and does not have the set topological information of the traditional grid data. Therefore, the most core problem in point cloud data processing is to establish the topological relationship between discrete points. The octree structure divides the geometric entity of three-dimensional space into voxels, as shown in Figure 3 The octree structure divides the geometric entity of three-dimensional space into voxels, as shown in
[0064] Step S103: selecting point cloud feature points from each leaf node of the octree to form an optimal point cloud feature point set through reinforcement learning.
[0065] Specifically, the eight leaf nodes of the above-mentioned octree are denoted as OCPointcloud. Next, OCPointcloud is used as input to learn the strategy of selecting the optimal feature points corresponding to the next optimal state through the reinforcement learning PPO algorithm, and the optimal feature point set composed of the eight optimal feature points of the two groups of point clouds is iteratively calculated through the strategy. It should be noted that in actual application, the Lagrange multiplier method, genetic algorithm, EM algorithm, etc. can also be used for implementation, and the PPO algorithm selected in the embodiment of the present application has the advantages of high answer confidence, small variance, and high robustness of the algorithm compared with other algorithms.
[0066] Step S104: calculating the target homogeneous pose transformation matrix using the optimal point cloud feature point set and the point cloud feature points corresponding to the optimal point cloud feature point set in the target point cloud data.
[0067] Specifically, since the point cloud feature points in the optimal point cloud feature point set are the feature points that can best reflect the characteristics of the point cloud data, the accuracy of the RT matrix can be guaranteed through the optimal point cloud feature point set, thereby improving the accuracy of point cloud registration. How to calculate the RT matrix using the two groups of feature points is a prior art, and will not be described here.
[0068] Step S105: Point cloud registration is performed on the original point cloud data by using the target homogeneous pose transformation matrix to obtain point cloud registration data under the target view angle.
[0069] Specifically, on the basis of the known RT matrix, the process of implementing point cloud registration by using the RT matrix is a prior art, and will not be described here.
[0070] By performing the above steps, the three-dimensional point cloud registration method provided by the embodiment of the application stores the point cloud feature points by using the octree data structure, then introduces reinforcement learning to learn and find the optimal feature points of the point cloud feature points in the octree, ensures the range of traversing the point cloud feature points in the learning process, and ingeniously solves the problem of the local optimal status of the traditional optimal points, realizes the globally optimized 3D point cloud registration, improves the accuracy of the point cloud registration, meets the engineering requirements, and by extracting the matching point cloud feature points first, uses the extracted point cloud feature points as the input data of the reinforcement learning, ensures the accuracy of the optimal feature point extraction while greatly improving the efficiency of the point cloud registration.
[0071] Specifically, in an embodiment, the above step S103 specifically includes the following steps:
[0072] Step S301: Selecting point cloud feature points from each leaf node of the octree to form an initial point cloud feature point set.
[0073] Specifically, the above step S301 forms a plurality of candidate point cloud feature point sets by sequentially and randomly selecting point cloud feature points from each leaf node of the octree; calculates candidate homogeneous pose transformation matrices by using each candidate point cloud feature point set and the point cloud feature points in the target point cloud data corresponding to the candidate point cloud feature point set; performs point cloud registration on each point cloud feature point of the candidate point cloud feature point set by using the candidate homogeneous pose transformation matrix; calculates the Euclidean distances between the point cloud feature points of each candidate point cloud feature point set after the point cloud registration and the corresponding point cloud feature points under the target view angle; and filters the initial point cloud feature point set from each candidate point cloud feature point set according to the Euclidean distances between the point cloud feature points of each candidate point cloud feature point set after the point cloud registration and the corresponding point cloud feature points under the target view angle.
[0074] Further, based on the Euclidean distances between the point cloud feature points of each candidate point cloud feature point set after the point cloud registration and the corresponding point cloud feature points under the target view angle, the distance mean values of all point cloud feature points corresponding to each candidate point cloud feature point set are calculated respectively; and the initial point cloud feature point set is filtered from each candidate octree according to the distance mean values of all point cloud feature points corresponding to each candidate point cloud feature point set in the order from small to large.
[0075] Currently in the field of machine learning, according to the different ways of learning system and environment interaction, machine learning can be roughly divided into three learning methods, which are reinforcement learning, supervised learning and unsupervised learning. With the development of information technology, intelligent algorithms represented by reinforcement learning and adaptive characteristics are more and more used in various industries. Reinforcement learning is an unsupervised learning method, and the agent learns to choose the optimal or near-optimal behavior through repeated interaction with the dynamic environment to achieve its long-term goal. The four key elements of reinforcement learning method are state, action, policy and reward, as shown in Figure 4
[0076] Specifically, the embodiment of the present application provides a PPO algorithm to learn the required global optimal feature point set for point cloud registration. First, the state is the initialization result after the first interaction with the environment in the octree, as shown in the following Figure 5 In order to save the learning time of optimal feature points, RANSAC algorithm is used to extract the point cloud set that can reflect the skeleton features of the point cloud data. On this basis, in order to further improve the efficiency of learning based on PPO strategy and the accuracy of optimal feature point learning for large-scale point cloud data, the state selected is the state after the initialization screening based on the point cloud data stored in the octree. This paper uses an unreturned way to extract 8 points to calculate the RT matrix. For example, there are 200 point cloud data in Pointcloud1 (the point cloud data in real engineering must be much larger than this value), 8 points are randomly selected in the first time, the RT matrix is calculated and stored in RT_init[0], 8 points are randomly selected from the remaining point cloud data in the second time, the RT matrix is calculated and stored in RT_init[1], and a total of 200 / 8=25, i.e. i<=25. Then, the average value of the Euclidean distance between all point cloud pairs of Pointcloud1 of camera 1 and Pointcloud2 of camera 2 after point cloud registration is calculated using all the calculated RT matrices, and then the 25 calculated average values of the Euclidean distance between point cloud pairs are sorted from small to large, and the best candidate point cloud feature point set with the smallest average value of the Euclidean distance is selected as the initial state of reinforcement learning.
[0077] Step S302: based on the initial point cloud feature point set and the point cloud feature points corresponding to the initial point cloud feature point set in the target point cloud data, the current homogeneous pose transformation matrix is calculated.
[0078] Step S303: Point cloud registration is performed on each point cloud feature point of the initial point cloud feature point set by using the current homogeneous pose transformation matrix, to obtain each registration feature point.
[0079] Step S304: The Euclidean distances of each registration feature point and the corresponding point cloud feature point in the target point cloud data are respectively calculated.
[0080] Specifically, the rms feature corresponding to each point is calculated based on the above 8 points selected without replacement as one of the original data of the initial state of reinforcement learning. The rms feature of each point is the Euclidean distance of the corresponding point cloud of the 7 points after removing the 8 sampled points.
[0081] Specifically, the Euclidean distance calculation process of any two points in a three-dimensional space is a prior art, which will not be described here.
[0082] Step S305: The average of the Euclidean distances of the other point cloud feature points corresponding to the current point cloud feature point is taken as the distance feature of the current point cloud feature point.
[0083] Step S306: Based on the distance features of each point cloud feature point in the initial point cloud feature point set, the reinforcement learning target is to minimize the distance feature, and the initial point cloud feature point set is updated by reinforcement learning to obtain an optimal point cloud feature point set.
[0084] Specifically, the above step S306 removes the first point cloud feature point with the maximum distance feature in the initial point cloud feature set, and selects a second point cloud feature point from the leaf nodes of the octree corresponding to the first point cloud feature point to add to the initial point cloud feature set. The step of calculating the current homogeneous pose transformation matrix based on the initial point cloud feature point set and the point cloud feature points in the target point cloud data corresponding to the initial point cloud feature point set is returned to perform reinforcement learning until the optimal point cloud feature point set is obtained. Next, the global optimal set of 8 feature points is obtained through multiple PPO algorithm iterations.
[0085] The following will further explain the global optimal set of 8 feature points obtained by the embodiment of the application using the PPO algorithm for reinforcement learning:
[0086] The state in the embodiment of the application is the spatial sequential splicing of the rms values of the 8-point pairs of the current feature point set and the feature point quantities corresponding to the leaf nodes in the octree in which the 8 points are located, a total of 16 states.
[0087] Action is to select a point in the octree, which refers to selecting the probability of this action, a total of 8 probabilities, i.e. 8 actions. The strategy of the PPO algorithm is to learn the probability of selecting the next feature point in the leaf node of the octree.
[0088] Reward, set two reward values, one is based on the average Euclidean distance between the point cloud pairs calculated after each interaction with the environment, the other is to avoid the 8 density of interaction with the environment can not be too high, here choose the 8 points to be interacted with the environment in the octree in the number of leaves minus 4 as a punishment, when the 8 feature points are concentrated in a leaf node, the penalty value is 1-4=-3.
[0089] Done, that is, the end condition of the loop learning, respectively, the average Euclidean distance between the point cloud pairs calculated after two interactions with the environment is only less than the actual multi-point cloud fusion engineering error value, that is, 0.1, which can be adjusted according to the actual use. The second end condition is that the average Euclidean distance of the point cloud pair obtained by interacting with the environment is less than 0.05, that is, the matching result of the feature points selected in the loop process is good enough, in which case the loop body is forcibly ended, and the point cloud learned this time is taken as the final optimal result point cloud, saving unnecessary learning time, and in the design of Done, the learning accuracy is guaranteed while the learning efficiency is improved.
[0090] Environment, the interaction with the environment is to use 7 of the 8 points to calculate the RT matrix. 8 points, 7 points are used to calculate the RT matrix each time, a total of eight RT matrices are calculated, and then the average Euclidean distance of camera 1 and camera 2 is calculated using the eight RT matrices, arranged from small to large, and the worst point in the 8 points is temporarily stored in temp_buf. At this time, the next point cloud to be interacted with the environment is left 7, which needs to be obtained from the octree through the PPO algorithm, to form a total of 16 new states to interact with the environment, complete a process of interaction with the environment.
[0091] The specific working process of three-dimensional point cloud registration is as follows Figure 6The two strategies are designed in this process, one is called Policy, and the other is called Policy_old. First, enter the learning loop body, where the size of the maximum learning loop times Max_episode is less than the number of point clouds in Pointcloud1. Then input the State introduced earlier in this paper. Enter reinforcement learning, where Max_timestep is set to 100 times. Reinforced loop learning will have the above interaction process with the environment each time, and each interaction with the environment will get the corresponding reward value, which will guide the learning of a better action selection strategy. The advantage function Advantage in the flowchart is to solve the problem of small variance of Qfunction value. Advantage can be considered as an evaluation of the action strategy. Because the action strategy is constantly updated, the standard of good and bad is constantly changing, and Advantage means that if the action strategy is better than the average action strategy under the current policy, it is positive, and if it is worse, it is negative. If the optimal point learned in the interaction process with the environment meets the required precision of the project, the entire PPO learning process is ended. At the same time, each interaction with the environment will get the corresponding reward value, state, result, etc. as input parameters to update the strategy of Policy. Policy_old is the strategy learned in the i-1th time, and Policy is the strategy learned in the ith time. If the number of learning times is greater than Max_episode or the done condition described above is met, the learning process is ended. The optimal action selection strategy obtained by using PPO gets the optimal 8 point cloud data.
[0092] Thus, by using reinforcement learning to find the optimal feature points instead of manually selecting the optimal feature points, the technical precision and engineering efficiency problems such as large workload of manually teaching the selection of optimal feature points and difficulty in controlling the registration result error in the 3D point cloud registration process are solved; support is provided for large-scale point cloud fusion technology in different angles of different depth cameras in the same scene under a heterogeneous scene; and the universality of point cloud fusion is improved, providing new theoretical guidance and technical support for 3D point cloud fusion and improving the engineering generalization ability of point cloud registration technology in the industrial field.
[0093] By executing the above steps, the three-dimensional point cloud registration method provided by the embodiment of the application stores the point cloud feature points by using the octree data structure, then introduces reinforcement learning to learn and find the optimal feature points of the point cloud feature points in the octree, ensures the range of traversing the point cloud feature points in the learning process, ingeniously solves the problem of the local optimal status of the traditional optimal points, realizes the globally optimized 3D point cloud registration, improves the accuracy of the point cloud registration, meets the engineering requirements, and by extracting the matched point cloud feature points first, uses the extracted point cloud feature points as the input data of the reinforcement learning, ensures the accuracy of the extraction of the optimal feature points and greatly improves the efficiency of the point cloud registration.
[0094] The embodiment of the application further provides a three-dimensional point cloud registration device. Figure 7 As shown in the figure, the three-dimensional point cloud registration device comprises:
[0095] The acquisition module 101 is configured to acquire original point cloud data corresponding to a target scene under a current view angle and target point cloud data corresponding to the target scene under a target view angle. For details, refer to the related description of step S101 in the above method embodiment, which will not be repeated here.
[0096] The first processing module 102 is configured to extract the same point cloud feature points from the original point cloud data and the target point cloud data, and store the extracted feature points in an octree, each leaf node of the octree corresponding to a plurality of point cloud feature points. For details, refer to the related description of step S102 in the above method embodiment, which will not be repeated here.
[0097] The second processing module 103 is configured to select point cloud feature points from each leaf node of the octree to form an optimal point cloud feature point set by reinforcement learning. For details, refer to the related description of step S103 in the above method embodiment, which will not be repeated here.
[0098] The third processing module 104 is configured to calculate a target homogeneous pose transformation matrix by using the optimal point cloud feature point set and the point cloud feature points in the target point cloud data corresponding to the optimal point cloud feature point set. For details, refer to the related description of step S104 in the above method embodiment, which will not be repeated here.
[0099] The fourth processing module 105 is configured to perform point cloud registration on the original point cloud data by using the target homogeneous pose transformation matrix to obtain point cloud registration data under the target view angle. For details, refer to the related description of step S105 in the above method embodiment, which will not be repeated here.
[0100] The three-dimensional point cloud registration device provided by the embodiment of the application is used to execute the three-dimensional point cloud registration method provided by the above embodiment, and has the same implementation manner and principle. For details, refer to the related description of the above method embodiment, which will not be repeated here.
[0101] Through the collaborative efforts of the aforementioned components, the 3D point cloud registration device provided in this embodiment of the invention utilizes an octree data structure to store point cloud feature points. Then, reinforcement learning is introduced to learn and find the optimal feature points from the point cloud feature points in the octree. This ensures that the learning process traverses the entire range of point cloud feature points, cleverly solving the problem that traditional methods only obtain local optima. This achieves globally optimized 3D point cloud registration, improving the accuracy of point cloud registration to meet engineering requirements. Furthermore, by first extracting the matching point cloud feature points and using these extracted feature points as reinforcement learning input data, the accuracy of optimal feature point extraction is ensured while significantly improving the efficiency of point cloud registration.
[0102] Figure 8 A schematic diagram of the structure of an electronic device is shown, such as... Figure 8 As shown, the electronic device includes a processor 901 and a memory 902, wherein the processor 901 and the memory 902 can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0103] Processor 901 can be a Central Processing Unit (CPU). Processor 901 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0104] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above method embodiments. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 902, thereby implementing the methods in the above method embodiments.
[0105] The memory 902 can include a program storage area and a data storage area, where the program storage area can store an operating system, application programs required by at least one function, and the data storage area can store data created by the processor 901 and the like. In addition, the memory 902 can include a high-speed random access memory, and can further include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 902 can optionally include a memory disposed remotely from the processor 901, which can be connected to the processor 901 through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0106] One or more modules are stored in the memory 902, which, when executed by the processor 901, perform the methods in the above method embodiments.
[0107] The above electronic device specific details can be understood in correspondence with the relevant description and effects of the corresponding method embodiments described above, which will not be described here again.
[0108] Those skilled in the art can understand that all or part of the processes in the above embodiments can be completed by a computer program instructing related hardware, and the implemented program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD), etc. The storage medium can also include a combination of the above types of memories.
[0109] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A three-dimensional point cloud registration method, characterized in that, include: Acquire the origin point cloud data of the target scene from the current perspective and the target point cloud data from the target perspective; Extract point cloud feature points that are the same as those in the target point cloud data from the original point cloud data, and store the extracted feature points in an octree. Each leaf node of the octree corresponds to several point cloud feature points. The optimal set of point cloud feature points is formed by selecting point cloud feature points from each leaf node of the octree through reinforcement learning. Using the set of optimal cloud feature points and the point cloud feature points in the target point cloud data that correspond to the set of optimal cloud feature points, calculate the homogeneous pose transformation matrix of the target. The original point cloud data is registered using the target homogeneous pose transformation matrix to obtain the point cloud registration data from the target's viewpoint. The step of selecting point cloud feature points from each leaf node of the octree using reinforcement learning to form the optimal point cloud feature point set includes: Select point cloud feature points from each leaf node of the octree to form an initial set of point cloud feature points; Based on the initial point cloud feature point set and the point cloud feature points in the target point cloud data that correspond to the initial point cloud feature point set, calculate the current homogeneous pose transformation matrix; The current homogeneous pose transformation matrix is used to perform point cloud registration on each point cloud feature point in the initial point cloud feature point set to obtain each registered feature point. Calculate the Euclidean distance between each registration feature point and the corresponding point cloud feature point in the target point cloud data; The mean of the Euclidean distances to all point cloud feature points other than the current point cloud feature point is used as the distance feature of the current point cloud feature point. Based on the distance features of each point cloud feature point in the initial point cloud feature point set, the initial point cloud feature point set is updated using reinforcement learning with the minimum distance feature as the reinforcement learning objective, so as to obtain the optimal point cloud feature point set.
2. The method according to claim 1, characterized in that, The step of selecting point cloud feature points from each leaf node of the octree to form an initial point cloud feature point set includes: From each leaf node of the octree, point cloud feature points are randomly selected sequentially to form a set of candidate point cloud feature points; Calculate the candidate homogeneous pose transformation matrix using each candidate point cloud feature point set and the point cloud feature points in the target point cloud data that correspond to the candidate point cloud feature point sets respectively. Point cloud registration is performed on each point cloud feature point in the candidate point cloud feature point set using the candidate homogeneous pose transformation matrix. Calculate the Euclidean distance between each candidate point cloud feature point set and its corresponding point cloud feature point in the target view after point cloud registration. The initial point cloud feature point set is selected from each candidate point cloud feature point set based on the Euclidean distance between the point cloud feature points of each candidate point cloud feature point set after point cloud registration and the corresponding point cloud feature points in the target view.
3. The method according to claim 2, characterized in that, The step of selecting the initial point cloud feature point set from each candidate point cloud feature point set according to the Euclidean distance between the point cloud feature points of each candidate point cloud feature point set after point cloud registration and their corresponding point cloud feature points in the target view includes: Based on the Euclidean distance between each candidate point cloud feature point set and its corresponding point cloud feature point in the target view, the mean distance of each candidate point cloud feature point set to all point cloud feature points is calculated. The initial point cloud feature point set is selected from each candidate octree according to the average distance of all point cloud feature points corresponding to each candidate point cloud feature point set in ascending order.
4. The method according to any one of claims 1 to 3, characterized in that, The step of updating the initial point cloud feature point set using reinforcement learning, based on the distance features of each point cloud feature point in the initial point cloud feature point set and taking the distance features as the reinforcement learning target, to obtain the optimal point cloud feature point set includes: Remove the first point cloud feature point with the largest distance feature from the initial point cloud feature set; Then, a second point cloud feature point is selected from the leaf node of the octree corresponding to the first point cloud feature point and added to the initial point cloud feature set. The step of calculating the current homogeneous pose transformation matrix based on the initial point cloud feature point set and the point cloud feature points in the target point cloud data that correspond to the initial point cloud feature point set is returned to perform reinforcement learning until the optimal point cloud feature point set is obtained.
5. The method according to claim 1, characterized in that, Extracting point cloud feature points from the original point cloud data that are identical to those in the target point cloud data includes: A random sampling consistency algorithm is used to extract point cloud feature points from the original point cloud data that are identical to those in the target point cloud data.
6. The method according to claim 1, characterized in that, Before extracting point cloud feature points identical to those in the target point cloud data from the original point cloud data, the method further includes: The origin point cloud data and the target point cloud data are filtered.
7. A three-dimensional point cloud registration device, characterized in that, include: The acquisition module is used to acquire the origin point cloud data of the target scene in the current view and the target point cloud data in the target view. The first processing module is used to extract point cloud feature points that are the same as those in the target point cloud data from the original point cloud data, and store the extracted feature points in an octree, wherein each leaf node of the octree corresponds to several point cloud feature points. The second processing module is used to select point cloud feature points from each leaf node of the octree to form the optimal point cloud feature point set through reinforcement learning. The step of selecting point cloud feature points from each leaf node of the octree to form an optimal point cloud feature point set through reinforcement learning includes: selecting point cloud feature points from each leaf node of the octree to form an initial point cloud feature point set; calculating a current homogeneous pose transformation matrix based on the initial point cloud feature point set and the point cloud feature points in the target point cloud data corresponding to the initial point cloud feature point set; performing point cloud registration on each point cloud feature point in the initial point cloud feature point set using the current homogeneous pose transformation matrix to obtain each registered feature point; calculating the Euclidean distance between each registered feature point and the corresponding point cloud feature point in the target point cloud data; using the mean of the Euclidean distances corresponding to other point cloud feature points besides the current point cloud feature point as the distance feature of the current point cloud feature point; and updating the initial point cloud feature point set through reinforcement learning based on the distance features of each point cloud feature point in the initial point cloud feature point set, with the minimum distance feature as the reinforcement learning objective, to obtain the optimal point cloud feature point set. The third processing module is used to calculate the target homogeneous pose transformation matrix by using the set of optimal cloud feature points and the point cloud feature points in the target point cloud data that correspond to the set of optimal cloud feature points. The fourth processing module is used to perform point cloud registration on the original point cloud data using the target homogeneous pose transformation matrix to obtain point cloud registration data from the target's perspective.
8. An electronic device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Three-dimensional point cloud registration method based on RANSAC measure optimization
CN112652003A
Animal point cloud multi-view real-time acquisition and 3D reconstruction method, device and system
CN113888612A