High-precision three-dimensional point cloud map automatic splicing and optimization method and system
By establishing local point cloud sub-maps, Scan Context descriptor matching, NDT algorithm pose matching and RANSAC mismatching elimination, high-precision automatic splicing and optimization of three-dimensional point cloud maps are achieved, solving the problem of low splicing accuracy and automatic The problem of splicing is difficult.
Patent Information
- Application Number
- CN202111594030.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-12-23
AI Technical Summary
The existing point cloud map splicing method relies on manual adjustment, has low accuracy and cannot be automatically spliced, resulting in low accuracy of the constructed point cloud map and ghosting problems.
By establishing a local point cloud submap, the pose transformation amount and Scan Context descriptor between key frames are calculated, the Scan Context descriptor is used for preliminary matching, and the NDT algorithm is combined for six-degree-of-freedom pose matching, and RANSAC is used to eliminate mismatched frames. , and finally perform consistency optimization based on the pose graph.
It realizes the automatic splicing and optimization of high-precision three-dimensional point cloud maps, overcomes the problems of inability to automatically splice and low splicing accuracy in the existing technology, and is suitable for common overlapping scenes.
Smart Images

Figure CN114283250B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional reconstruction of large-scale scenes, and in particular to a high-precision three-dimensional point cloud map automatic splicing and optimization method and system. Background Art
[0002] Autonomous driving is an important form of transportation in the future. In recent years, autonomous driving technology has developed rapidly along with the trend of automobile informatization, interconnection and intelligence, and has become a current research hotspot and an important industrialization direction. At present, high-level autonomous driving technology is very dependent on the construction of high-precision point cloud maps of the driving environment. In engineering practice, the construction of point cloud maps for large-scale scenes often requires the construction of point cloud maps for multiple parts separately and then splicing them into a complete global map. However, the existing point cloud map splicing method is very dependent on manual adjustment and only simply solves the pose transformation between the two maps without combining the information before and after splicing for further consistency optimization, resulting in low accuracy of the constructed point cloud map and ghosting. Summary of the invention
[0003] In view of this, the present invention provides a high-precision three-dimensional point cloud map automatic splicing and optimization method and system.
[0004] A high-precision three-dimensional point cloud map automatic splicing and optimization method, the method comprising:
[0005] S1. Establish a local point cloud submap, and calculate the pose transformation between key frames and the Scan Context descriptor of the key frames during the construction process. Divide the established local point cloud submap into a map to be spliced and a map to be spliced;
[0006] S2, first matching the key frame in the map to be stitched to the map to be stitched based on the Scan Context descriptor;
[0007] S3, performing a second matching between the map to be stitched and the map to be stitched based on the NDT algorithm to obtain a set of six-degree-of-freedom poses of key frames that are successfully matched;
[0008] S4, remove mismatched frames based on the random sampling consensus algorithm RANSAC;
[0009] S5. Optimize the consistency of the spliced map based on the pose graph.
[0010] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0011] The step S1 comprises:
[0012] The local point cloud submap is established through the collection of keyframe point clouds, including setting the keyframe as Kn The 6-DOF pose in the local map coordinate system is P n , where n∈(0,N), the corresponding point cloud in the radar coordinate system is L n , then the point cloud map established is M=P1L1∪P2L2∪…∪P N L N ; The pose transformation between key frames T n,n+1 In the process of mapping, it is obtained through odometer, and Scan Context descriptor is established according to key frame point cloud as part of the local point cloud submap information; the established local point cloud submap is divided into the map to be spliced and the map to be spliced.
[0013] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0014] The step S2 comprises:
[0015] The map to be spliced is taken as map A, and the map to be spliced is taken as map B. All the key frames of map B are first matched with the key frames in map A using the Scan Context descriptor. The overlapping parts of map A and map B are taken as the key frames that are successfully matched. Let the set of key frames of map B that are successfully matched be , where O n Represents the coefficient of the successfully matched frame in the key frame, and the corresponding set of key frames of map A that matches it is , its position is
[0016] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0017] The step S3 comprises:
[0018] For any successfully matched B map keyframe ,by The first successfully matched A map key frame pose As the initial value for optimization, the second match of the NDT algorithm is performed. The radar frame point cloud is matched to map A to obtain The second matching pose in the A map coordinate system ; For all successfully matched B map keyframe sets Perform the second match of the NDT algorithm and get Six degrees of freedom pose set in the A map coordinate system
[0019] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0020] The step S4 comprises:
[0021] S41, match a key frame in map B As a reference frame, The matched pose is
[0022] S42. For Any other matching keyframes in As a test frame, The matched pose is and The amount of posture change between ; According to the posture transformation The test frame The matching pose of Convert to reference frame As a test pose:
[0023]
[0024] S43, Comparison test posture and reference frame The matching pose of If the error is less than the threshold, the number of points inside the mark is increased by 1, otherwise the number of points outside the mark is increased by 1:
[0025] S44, loop through steps S42 to S43 to find the corresponding reference frame in the matching key frame set The number of inner and outer points of ;
[0026] S45, traversing the set of matching key frames and executing steps S41 to S44 to obtain the number of inner points and outer points corresponding to each matching key frame;
[0027] S46, selecting the matching key frame with the largest number of inliers as the optimal reference, identifying the matching key frame marked as an outlier as a mismatch, and deleting the mismatched frame from the matching key frame set.
[0028] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0029] The step S5 comprises:
[0030] The pose graph is constructed by taking the key frame pose in the B map as the optimization node, the point cloud matching pose in the key frame of the B map as the observation factor, the pose change between the key frames of the B map as the odometer factor, and adding the loop factor and GPS factor.
[0031] Based on the pose graph, the consistency of map B is optimized according to the point cloud matching pose in the key frames of map B, the pose change between the key frames of map B, the newly formed loop after the splicing of map B and map A, and some GPS information previously existing in map B.
[0032] The present invention also provides a high-precision three-dimensional point cloud map automatic stitching and optimization system, which is implemented by any of the high-precision three-dimensional point cloud map automatic stitching and optimization methods described above.
[0033] Beneficial technical effects: Compared with the prior art, the high-precision three-dimensional point cloud map automatic stitching and optimization method and system of the present invention can overcome the problems of the prior art such as the inability to automatically stitch and low stitching accuracy; the present invention is applicable to the situation where there are overlapping parts in two sections of maps to be stitched, and it generally meets the applicable scenarios in actual application processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a high-precision three-dimensional point cloud map automatic splicing and optimization method provided by an embodiment of the present invention.
[0035] Figure 2 It is a schematic diagram of constructing a pose graph provided by an embodiment of the present invention.
[0036] Figure 3 It is the SC characteristic diagram provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0037] like Figure 1-3 As shown, a high-precision three-dimensional point cloud map automatic splicing and optimization method, the method comprising:
[0038] S1. Establish a local point cloud submap. During the construction process, calculate the pose transformation between key frames and the Scan Context descriptor of the key frames, and divide the established local point cloud submap into a map to be spliced and a spliced map;
[0039] S2, first matching the key frame in the map to be stitched to the map to be stitched based on the Scan Context descriptor;
[0040] Establishing Scan Context
[0041] Scan Context consists of two parts: the ring key feature vector of the SC feature map.
[0042] Assume that a certain frame point cloud is L n , n is the coefficient. The SC feature map is a point cloud L from a bird’s eye view. nUsing ring and sector segmentation, the ring and sector can uniquely index any area of the point cloud. The index relationship can be represented by a two-dimensional feature map. The value in the feature map is the highest point of the point cloud in the index area. Assume that N s and N r Represent the number of sectors and rings respectively, then the established Scan Context feature map (such as Figure 3 N r ×N s Order Matrix .
[0043] Assume r i ,i∈[0,N r ] is the row vector of feature map I. According to r i The ring key descriptor can be calculated. The calculation function of each row vector is ψ(r i ):
[0044]
[0045] Where ||*||0 is the L0 norm. Solving the above function for each row of feature map I can obtain the ring key descriptor, which is an N r dimensional vector, can be expressed as:
[0046]
[0047] Matching Scan Context
[0048] For two Scan Context descriptors (I q ,k q ) and (I c ,k c ), where q and e represent coefficients. The similarity score can be expressed as:
[0049]
[0050] in, are the column vectors of the jth column of the two SC feature maps. Considering the feature map translation problem caused by the rotation of the radar yaw direction, two similarity scores of the two feature maps after all translation positions are required:
[0051]
[0052] in, It is the feature map I c Shift the feature map right by n columns. is the minimum value of the similarity scores calculated after all translation positions, which is the final matching distance, n *is the corresponding translation distance, which can be mapped to the rotation of the radar on the z-axis superior.
[0053] For a Scan Context descriptor To match a Scan Context descriptor set, first use its ring key descriptor and KD tree to search for the match in the set with k q The ones with the highest similarity are taken as the candidate item set C. Calculation I q The minimum distance from all SC feature maps in C is less than the threshold τ, and the match is successful.
[0054]
[0055] S3, performing a second matching between the map to be stitched and the map to be stitched based on the NDT algorithm to obtain a set of six-degree-of-freedom poses of key frames that are successfully matched;
[0056] S4, remove mismatched frames based on the random sampling consensus algorithm RANSAC;
[0057] S5. Optimize the consistency of the spliced map based on the pose graph.
[0058] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0059] The step S1 comprises:
[0060] The local point cloud submap is established through the collection of keyframe point clouds, including setting the keyframe as K n The 6-DOF pose in the local map coordinate system is P n , where n∈(0,N), the corresponding point cloud in the radar coordinate system is L n , then the point cloud map established is M=P1L1∪P2L2∪…∪P N L N ; The pose transformation between key frames T n,n+1 In the process of mapping, it is obtained through odometer, and Scan Context descriptor is established according to key frame point cloud as part of the local point cloud submap information; the established local point cloud submap is divided into the map to be spliced and the map to be spliced.
[0061] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0062] The step S2 comprises:
[0063] The map to be spliced is taken as map A, and the map to be spliced is taken as map B. All the key frames of map B are first matched with the key frames in map A using the Scan Context descriptor. The overlapping parts of map A and map B are taken as the key frames that are successfully matched. Let the set of key frames of map B that are successfully matched be , the corresponding matching A map key frame set is Its position is
[0064] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0065] The step S3 comprises:
[0066] For any successfully matched B map keyframe ,by The first successfully matched A map key frame pose As the initial value for optimization, the second match of the NDT algorithm is performed. The radar frame point cloud is matched to map A to obtain The second matching pose in the A map coordinate system ; For all successfully matched B map keyframe sets Perform the second match of the NDT algorithm and get Six degrees of freedom pose set in the A map coordinate system
[0067] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0068] The step S4 comprises:
[0069] S41, match a key frame in map B As a reference frame, The matched pose is
[0070] S42, for B Any other matching keyframes in As a test frame, The matched pose is and The amount of posture change between ; According to the posture transformation The test frame The matching pose of Convert to reference frame As a test pose:
[0071]
[0072] S43, Comparison test posture and reference frame The matching pose of If the error is less than the threshold, the number of marked points is increased by 1, otherwise the number of marked points is increased by 1:
[0073] S44, loop through steps S42 to S43 to find the corresponding reference frame in the matching key frame set The number of inner and outer points of ;
[0074] S45, iterating step S41 to step S44 on the set of matching key frames, and finding the number of inner points and outer points corresponding to each matching key frame;
[0075] S46, selecting the matching key frame with the largest number of inliers as the optimal reference, identifying the matching key frame marked as an outlier as a mismatch, and deleting the mismatched frame from the matching key frame set.
[0076] In the high-precision three-dimensional point cloud map automatic splicing and optimization method described in the present invention,
[0077] The step S5 comprises:
[0078] The pose graph is constructed by taking the key frame pose in the B map as the optimization node, the point cloud matching pose in the key frame of the B map as the observation factor, the pose change between the key frames of the B map as the odometer factor, and adding the loop factor and GPS factor.
[0079] Based on the pose graph, the consistency of the B map is optimized according to the point cloud matching pose in the B map keyframe, the pose change between the B map keyframes, the newly formed loop in the B map and the partial GPS information previously existing in the B map.
[0080] The present invention also provides a high-precision three-dimensional point cloud map automatic stitching and optimization system, which is implemented by any of the high-precision three-dimensional point cloud map automatic stitching and optimization methods described above.
[0081] The principle of the present invention is further explained below through a more specific embodiment.
[0082] First, a local point cloud submap is constructed. During the construction process, the pose transformation between key frames and the Scan Context descriptor of the key frames are calculated. The key frames in the map to be stitched are roughly matched to the map to be stitched based on the Scan Context descriptor. Then, the NDT algorithm is used for precise matching to solve the six-degree-of-freedom pose of the key frames that have been successfully matched. Then, the mismatched points are removed based on RANSAC. Finally, the consistency of the stitched parts is optimized based on the pose graph.
[0083] The type and method of establishing the point cloud map have a direct impact on map stitching. In the embodiment of the present invention, a set of keyframe point clouds is used to establish a local point cloud submap. Assume that the keyframe is K n Its 6-DOF pose in the local map coordinate system is P n , where n∈(0,N), the corresponding point cloud in the radar coordinate system is L n , then the point cloud map established is M=P1L1∪P2L2∪…∪P N L N The pose transformation between key frames T n,n+1 It can be obtained through odometer during the mapping process. At the same time, the Scan Context descriptor is established based on the key frame point cloud as part of the map information.
[0084] Assume that the maps to be stitched are map A and map B, and map B needs to be stitched onto map A. Use ScanContext descriptor to match all key frames of map B with key frames in map A. The key frames that are successfully matched must be in the overlapped part of map A and map B. Let the set of successfully matched key frames of map B be , the corresponding matching A key frame set is Its position is
[0085] For any successfully matched B keyframe , with its roughly matched A keyframe pose As the initial value for optimization, NDT algorithm matching is performed. The radar frame point cloud is matched to map A to obtain Fine matching pose in A map coordinate system For all successfully matched B keyframe sets By performing fine matching of the NDT algorithm, we can obtain its pose set in the A map coordinate system.
[0086] Mismatched points are eliminated based on the random sample consensus (RANSAC) algorithm. The steps are as follows:
[0087] 1. After the Scan Context and NDT two-step matching, match one of the key frames in B As a reference frame, its matched pose is
[0088] 2. For any other matching keyframes in B As a test frame, its matched pose is and The amount of posture change between It can be obtained from the local point cloud sub-map building module. You can use the test frame The matching pose of Convert to reference frame As a test pose:
[0089]
[0090] 3. Comparative test poses and reference frame The matching pose of If the error is less than the threshold, the number of marked internal points is increased by 1, otherwise the number of marked external points is increased by 1.
[0091] Inner point +1 else outer point +1
[0092] 4. Loop through steps 2-3 to find the corresponding reference frame in the matching key frame set The number of inner and outer points.
[0093] 5. Iterate steps 1-4 on the matching key frame set to find the number of inner points and outer points corresponding to each matching key frame.
[0094] 6. Select the matching keyframe with the largest number of inliers as the optimal reference, identify the matching keyframes marked as outliers as mismatches, and delete these frames from the matching keyframe set.
[0095] Consistency optimization module based on pose graph. After the above steps are completed, the B map has been basically stitched. At this time, the consistency of the B map should be optimized based on the pose graph and the point cloud matching poses in the B keyframes, the pose transformation between the B keyframes, the newly formed loops in the map, and some of the previously existing GPS information.
[0096] Using the key frame pose in B as the optimization node, the point cloud matching pose in the key frame of B as the observation factor, the pose change between the key frames of B as the odometer factor, plus the loop factor and GPS factor, we can construct the pose graph as follows: Figure 2 As shown, according to the pose graph, a loss function can be established and the Newton-Leibniz formula can be used to solve the loss function to obtain the optimized key frame pose in B.
[0097] The methods and systems described above, including the embodiments of the present invention, are not limited to specific implementation methods. For ordinary technicians in this field, various other corresponding changes and deformations can be made based on the technical concept of the present invention, and all these changes and deformations should fall within the scope of protection of the claims of the present invention.
Claims
1. A high-precision three-dimensional point cloud map automatic splicing and optimization method, characterized in that: The method comprises: S1. Establish a local point cloud submap, calculate the pose transformation between key frames and the Scan Context descriptor of the key frames during the construction process, and divide the established local point cloud submap into a map to be spliced and a spliced map; S2, first matching the key frame in the map to be stitched to the map to be stitched based on the Scan Context descriptor; S3, performing a second matching between the map to be stitched and the map to be stitched based on the NDT algorithm to obtain a set of six-degree-of-freedom poses of key frames that are successfully matched; S4, remove mismatched frames based on the random sampling consensus algorithm RANSAC; S5. Optimize the consistency of the spliced map based on the pose graph; The step S1 comprises: A local point cloud submap is established through a collection of keyframe point clouds, including setting the keyframe as The 6-DOF pose in the local map coordinate system is ,in represents the coefficient, is the number of key frames, and the corresponding point cloud in the radar coordinate system is , then the point cloud map established is ; The pose transformation between key frames In the process of mapping, the odometer is used to obtain the Scan Context descriptor, which is used as part of the local point cloud submap information based on the key frame point cloud. The established local point cloud submap is divided into a map to be spliced and a map to be spliced. The step S2 comprises: The map to be spliced is taken as map A, and the map to be spliced is taken as map B. All the key frames of map B are first matched with the key frames in map A using the Scan Context descriptor. The overlapping parts of map A and map B are taken as the key frames that are successfully matched. Let the set of key frames of map B that are successfully matched be ,in Represents the coefficient of the successfully matched frame in the key frame, and the corresponding key frame set of A map is , its position is ; The step S3 comprises: For any successfully matched B map keyframe ,by The first successfully matched A map key frame pose As the optimization initial value, the second match of the NDT algorithm is performed. The radar frame point cloud is matched to map A to obtain The second matching pose in the A map coordinate system ; For all successfully matched B map keyframe sets Perform the second match of the NDT algorithm and get Six-degree-of-freedom pose set in the A map coordinate system .
2. The high-precision three-dimensional point cloud map automatic splicing and optimization method according to claim 1, characterized in that: The step S4 comprises: S41, match a key frame in map B As a reference frame, The matched pose is ; S42, for B Any other matching keyframes in As a test frame, The matched pose is ; and The amount of posture change between ; According to the posture transformation The test frame The matching pose of Convert to reference frame As a test pose: S43, Comparison test posture and reference frame The matching pose of If the error is less than the threshold, the number of marked points is increased by 1, otherwise the number of marked points is increased by 1: S44, loop through steps S42 to S43 to find the corresponding reference frame in the matching key frame set The number of inner and outer points of ; S45, traversing the set of matching key frames and executing steps S41 to S44 to obtain the number of inner points and outer points corresponding to each matching key frame; S46, selecting the matching key frame with the largest number of inliers as the optimal reference, identifying the matching key frame marked as an outlier as a mismatch, and deleting the mismatched frame from the matching key frame set.
3. The high-precision three-dimensional point cloud map automatic splicing and optimization method according to claim 2, characterized in that: The step S5 comprises: The pose graph is constructed by taking the key frame pose in the B map as the optimization node, the point cloud matching pose in the key frame of the B map as the observation factor, the pose change between the key frames of the B map as the odometer factor, and adding the loop factor and GPS factor. Based on the pose graph, the consistency of map B is optimized according to the point cloud matching pose in the key frames of map B, the pose change between the key frames of map B, the newly formed loop after the splicing of map B and map A, and some GPS information previously existing in map B.
4. A high-precision three-dimensional point cloud map automatic stitching and optimization system, which is implemented by the high-precision three-dimensional point cloud map automatic stitching and optimization method as described in any one of claims 1-3.
Citation Information
Patent Citations
Indoor scene three-dimensional point cloud reconstruction method and system based on depth information fusion
CN113012212A
Visual slam-based grid operating environment map construction method and system
WO2020233724A1
