A laser radar-assisted visual mapping method
Through the lidar-assisted visual mapping method, deep learning features and high-dimensional index tree data structures are used to solve the problem of low positioning accuracy in large scene mapping and achieve high-precision positioning and anti-interference capabilities.
Patent Information
- Application Number
- CN202210061037.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-19
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-01-19
AI Technical Summary
With existing technologies, laser SLAM algorithms cannot accurately position in large-scene mapping. The visual SLAM mapping process is time-consuming and has low accuracy. Traditional feature points are easily disturbed by illumination changes and cannot meet high-precision positioning requirements.
A laser-assisted visual mapping method is adopted. By collecting lidar data, image data and inertial sensor data, the laser synchronized positioning and mapping method is used to build a high-dimensional index tree data structure, extract deep learning feature information, and perform increments. Triangulation generates 3D map points, and uses a high-dimensional index tree data structure for feature matching to overcome illumination changes and interference.
It improves the accuracy of large scene mapping, overcomes the impact of lighting changes, provides anti-interference capabilities, and achieves high-precision positioning.
Smart Images

Figure CN114419155B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a laser radar-assisted visual mapping method. Background Art
[0002] Currently, mobile robots or self-driving cars mainly use simultaneous localization and mapping (SLAM) technology to build maps of their surrounding environments. SLAM solutions using different sensors can be divided into laser SLAM and visual SLAM.
[0003] Laser SLAM mapping has the advantages of high accuracy, little influence from ambient light, and can accurately obtain the distance and orientation information between the laser radar and obstacles. However, the laser SLAM algorithm still has problems in environments with similar features such as long corridors.
[0004] It is impossible to obtain accurate positioning. At the same time, laser positioning may scan interfering features such as pedestrians or decorations. At this time, relying solely on laser is prone to incorrect positioning.
[0005] The visual SLAM mapping process extracts feature points from each frame of the image in real time, matches features with key frames, and performs local map optimization. When a loop is detected, global optimization is also required to solve problems such as scale drift. Since the processor performance of existing robots or self-driving cars is relatively weak, the use of visual SLAM mapping alone can only be completed when the mapping range is relatively small. If the mapping range is relatively large (scenes of more than several thousand square meters), local optimization will be time-consuming, and global optimization needs to process all key frames and map points, which takes more time, making it impossible for the visual SLAM mapping process to be completed in real time, which in turn leads to low accuracy of the final mapping and failure to meet the requirements of high-precision positioning.
[0006] On the other hand, the features currently extracted by visual mapping are still traditional features such as ORB (Oriented FAST and RotatedBRIEF) and SIFT (Scale-invariant feature transform). However, ORB and SIFT features have disadvantages such as being easily disturbed by lighting changes, and they also cannot meet high-precision positioning requirements. Summary of the invention
[0007] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is: how to provide a laser radar-assisted visual mapping method suitable for large-scene mapping while greatly improving the final mapping accuracy.
[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0009] A laser radar-assisted visual mapping method includes the following steps:
[0010] Step 1) Collect lidar data, image data, inertial sensor data, and odometer data during the movement of the mobile device;
[0011] Step 2) Using laser synchronous positioning and mapping method to traverse the entire data stream in step 1);
[0012] Step 3) After traversing the entire data stream using the laser synchronous positioning and mapping method, the position information is obtained, and the image position information is obtained by interpolation estimation, and a high-dimensional index tree data structure is constructed based on the image position information;
[0013] Step 4) traverse the image data of the entire data stream in step 1) frame by frame to extract feature information for deep learning;
[0014] Step 5) The image data of the entire data stream in step 1) is traversed frame by frame again, and a high-dimensional index tree data structure is used to search and obtain a set of image frames adjacent to the current frame. The image frames in the set are then feature matched pairwise, and 3D map points are generated through incremental triangulation.
[0015] Preferably, the laser synchronous positioning and mapping method in step 2) comprises the following steps:
[0016] Step 2.1) Obtain the inertial navigation pose of the mobile device at the current moment by integrating the inertial sensor data and the odometer data, use the inertial navigation pose as the initial value, and construct a local occupancy grid map based on the first frame of lidar data obtained;
[0017] Step 2.2) Match the current frame LiDAR data in the motion tracking thread with the previous frame LiDAR data to calculate the optimized inter-frame pose motion matrix;
[0018] Step 2.3) Based on the inertial navigation pose of the mobile device optimized in the previous frame and the inertial navigation pose of the mobile device fused from the previous frame to the current frame, the pose prior of the current frame is obtained, and then the lidar data of the current frame is matched with the occupancy grid map, and the optimized inter-frame pose motion matrix is adjusted to obtain the accurate pose of the current frame;
[0019] Step 2.4) Update the local map or rebuild the local map according to the distance between the current frame and the current key frame, and incrementally optimize and update the poses of each key frame in the key frame queue according to the motion constraints constructed by the newly inserted key frame to obtain an updated global map;
[0020] Step 2.5) Match the current local map with the global map for loop detection, and use the nearest point iteration algorithm or the normal distribution transformation algorithm to obtain the pose transformation matrix from the current local map to the global map, and adjust the pose information of several sub-maps connected to the current sub-map.
[0021] Preferably, in step 2.4), the size of the posture transformation of the current frame pose and the current key frame and the preset threshold is determined. If the posture transformation of the current frame pose and the current key frame is less than the preset threshold, the local map is updated according to the lidar data of the current frame; if the posture transformation of the current frame pose and the current key frame is greater than the preset threshold, the key frame queue is updated according to the lidar data of the current frame, and the local map is reconstructed.
[0022] Preferably, in step 2.4), a common view frame constraint is constructed based on the newly inserted keyframe and keyframe queue, and then the pose of the keyframe queue is updated by incrementally optimizing the pose factor graph. When a closed loop is detected, a closed-loop frame constraint is constructed, and the pose in the keyframe queue is updated by incremental optimization to achieve an update of the global map.
[0023] Preferably, the local map in step 2) is a map created within the past 30 seconds.
[0024] Preferably, step 5) includes the following steps:
[0025] Step 5.1) Using the position information of the current frame, search for a set of image frames that satisfy a Euclidean distance less than a given threshold in a high-dimensional index tree data structure using the nearest neighbor method;
[0026] Step 5.2) Match the deep learning features of each pair of images in the image frame set;
[0027] Step 5.3) All images in the image frame set corresponding to the current frame are triangulated to generate 3D map points. The existing matching relationship is used to remove 3D map points with matching errors, merge redundant 3D map points, and perform local optimization at the same time.
[0028] Step 5.4) Using the position information and feature matching information of the key frames, triangulate frame by frame to generate 3D map points in sequence.
[0029] Preferably, in step 5.2), performing deep learning feature matching on each pair of images in the image frame set includes: matching of point features, matching of line features, matching of surface features, matching of object features, or matching of semantic segmentation features.
[0030] Preferably, in step 3), the image position information of each frame of the image is obtained by interpolation estimation, and a high-dimensional index tree data structure is constructed according to the 2D or 3D spatial position information in the obtained image position information.
[0031] Preferably, in step 4), the feature information of deep learning includes point features, line features, surface features, object features, or semantic segmentation features obtained by learning and training using a deep learning method.
[0032] Preferably, in step 1), the laser radar data, the image data, the inertial sensor data and the odometer data are time synchronized, and the time synchronization includes hardware time synchronization or software time synchronization;
[0033] The laser radar is a 2D laser radar or a 3D laser radar;
[0034] The mobile device is a mobile robot or a car.
[0035] Compared with the prior art, the present invention, on the one hand, obtains the high-precision initial value of the pose of each frame of the image through the laser SLAM method, and then uses incremental triangulation to generate map points. Compared with the previous traditional visual SLAM method, online map creation makes large-scene mapping no longer restricted, and at the same time improves the overall accuracy of the map; on the other hand, the present invention uses more robust deep learning feature information, which can overcome the influence of illumination changes compared with traditional feature points, and at the same time provide matching information with stronger anti-interference ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of the laser radar-assisted visual mapping method of the present invention;
[0037] Figure 2 Flow chart of the laser SLAM method in the laser radar-assisted visual mapping method of the present invention;
[0038] Figure 3 It is a schematic diagram of pairwise matching of image frames in an image frame set in the laser radar-assisted visual mapping method of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0040] As attached Figure 1 As shown, a laser radar-assisted visual mapping method includes the following steps:
[0041] Step 1) Collecting laser radar data, image data, inertial sensor data (IMU data) and odometer data during the movement of the mobile device; specifically, the laser radar data, image data, inertial sensor data and odometer data are synchronized in time, and the time synchronization includes hardware time synchronization or software time synchronization;
[0042] The laser radar is a 2D laser radar or a 3D laser radar;
[0043] The mobile device is a mobile robot or a car.
[0044] Step 2) Using a laser synchronous positioning and mapping method (laser SLAM method) to traverse the entire data stream in step 1);
[0045] Step 3) According to the position information obtained after traversing the entire data stream by the laser synchronous positioning and mapping method (laser SLAM method), the image position information is obtained by interpolation estimation, and a high-dimensional index tree data structure (KD Tree) is constructed based on the image position information. Specifically, the image position information of each frame of the image is obtained by interpolation estimation, and a high-dimensional index tree data structure is constructed based on the 2D or 3D spatial position information in the obtained image position information.
[0046] Step 4) traverses the image data of the entire data stream in step 1) frame by frame to extract feature information of deep learning, where the feature information of deep learning includes point features, line features, surface features, object features, or semantic segmentation features learned and trained using deep learning methods.
[0047] Step 5) The image data of the entire data stream in step 1) is traversed frame by frame again, and a high-dimensional index tree data structure (KD Tree) is used to search and obtain a set of image frames adjacent to the current frame. The image frames in the set are then feature matched pairwise, and 3D map points are generated through incremental triangulation.
[0048] As attached Figure 2 As shown, in this embodiment, the laser synchronous positioning and mapping method (SLAM method) in step 2) is an online SLAM method or an offline SLAM method, which specifically includes the following steps:
[0049] Step 2.1) Obtain the inertial navigation pose of the mobile device at the current moment by integrating the inertial sensor data and the odometer data, use the inertial navigation pose as the initial value, and construct a local occupancy grid map based on the first frame of lidar data obtained;
[0050] Step 2.2) Match the current frame LiDAR data in the motion tracking thread with the previous frame LiDAR data to calculate the optimized inter-frame pose motion matrix;
[0051] Step 2.3) Based on the inertial navigation pose of the mobile device optimized in the previous frame and the inertial navigation pose of the mobile device fused from the previous frame to the current frame, the pose prior of the current frame is obtained, and then the lidar data of the current frame is matched with the occupancy grid map, and the optimized inter-frame pose motion matrix is adjusted to obtain the accurate pose of the current frame;
[0052] Step 2.4) Update the local map or rebuild the local map according to the distance between the current frame and the current key frame, and incrementally optimize and update the poses of each key frame in the key frame queue according to the motion constraints constructed by the newly inserted key frame to obtain an updated global map;
[0053] Step 2.5) Match the current local map with the global map for loop detection, and use the iterative closest point algorithm (ICP, Iterative Closest Point) or the normal distribution transformation algorithm (NDT, Normal Distribution Transformation) to obtain the pose transformation matrix from the current local map to the global map, and adjust the pose information of several sub-maps connected to the current sub-map.
[0054] In this embodiment, in step 2.4), the size of the posture transformation of the current frame pose and the current key frame and the preset threshold is determined. If the posture transformation of the current frame pose and the current key frame is less than the preset threshold, the local map is updated according to the lidar data of the current frame; if the posture transformation of the current frame pose and the current key frame is greater than the preset threshold, the key frame queue is updated according to the lidar data of the current frame, and the local map is reconstructed.
[0055] In this embodiment, in step 2.4), a common view frame constraint is constructed based on the newly inserted keyframe and keyframe queue, and then the keyframe queue pose is updated by incrementally optimizing the pose factor graph. When a closed loop is detected, a closed-loop frame constraint is constructed, and the pose in the keyframe queue is updated by incremental optimization to achieve an update of the global map.
[0056] In this embodiment, the local map in step 2) is a map created within the past 30 seconds.
[0057] In this embodiment, step 5) includes the following steps:
[0058] Step 5.1) Using the position information of the current frame, search for a set of image frames that meet a Euclidean distance less than a given threshold using the nearest neighbor method in a high-dimensional index tree data structure (KD Tree);
[0059] Step 5.2) Perform deep learning feature matching on each pair of images in the image frame set (see attached Figure 3As shown in the figure) specifically includes: matching of point features, matching of line features, matching of surface features, matching of object features, or matching of semantic segmentation features;
[0060] Step 5.3) All images in the image frame set corresponding to the current frame are triangulated to generate 3D map points. The existing matching relationship is used to remove 3D map points with matching errors, merge redundant 3D map points, and perform local optimization to further improve the pose estimation accuracy of key frames and 3D map points.
[0061] Step 5.4) Using the position information and feature matching information of the key frames, triangulate frame by frame to generate 3D map points in sequence.
[0062] Among them, the given threshold is: a large number of preliminary experiments are carried out on data streams of the same type or the same scene, and the result is obtained by comprehensively considering the movement speed of the mobile device, whether it is co-viewed with the current frame, and the number of image frame sets returned; the weight setting of feature information matching and key frame pose in local optimization can be dynamically adjusted according to the actual data stream or scene.
[0063] The following is combined with Figure 1 To the attached Figure 3 , the technical solution of the present invention is further explained in detail to facilitate understanding by those skilled in the art.
[0064] As attached Figure 1 As shown in the figure, a flowchart of a laser radar-assisted visual mapping method is shown: first, laser radar data, image data, IMU data, and odometer data are collected during the movement of the mobile device; the laser SLAM method is used to traverse the entire data stream, and the position information obtained by the laser SLAM method is used to interpolate and estimate the position information of each frame of the image; then, the image position information obtained in the previous step is used to construct a KDTree based on 2D or 3D spatial position information; synchronously, feature information learned and trained using deep learning methods is extracted for each image data, such as: SuperPoint feature points, R2D2 feature points, pedestrian detection boxes, vehicle detection boxes, lane line detection boxes, pixels after semantic segmentation, etc.; finally, the image data in the entire data stream is traversed frame by frame again, and the image position information obtained in the previous step is used to search for an image frame set that satisfies a Euclidean distance less than a given threshold using the nearest neighbor method in the KD Tree; then, all image frames in the image frame set corresponding to the current frame are feature matched pairwise to obtain a matching relationship, and the matching relationship and the pose information of the key frame are used to triangulate frame by frame to generate 3D map points in sequence.
[0065] As attached Figure 2As shown: A flowchart of a laser SLAM method in a laser radar-assisted visual mapping method. It can be described as follows: The laser SLAM method can be divided into two threads: motion tracking and map building: the motion tracking thread is the main thread of the system, and the mapping thread assists the motion tracking thread and relies on the pose information of the motion tracking thread.
[0066] In the motion tracking thread, the pose obtained by integrating the IMU data and the odometer data is used as the initial value. The inter-frame pose motion matrix is optimized by using inter-frame laser matching based on straight line features and inter-frame laser matching based on normal distribution transformation in combination with the current frame lidar data and the previous frame lidar data. Then, the laser map matching based on least squares grayscale difference is used to determine the precise current frame pose. The local map can be determined based on the precise current frame pose and the current key frame. Specifically, the size of the pose transformation of the precise current frame pose and the current key frame and the preset threshold is determined. When it is less than the preset threshold, the current local map is updated according to the current frame lidar data; when it is greater than the preset threshold, the key frame queue is updated according to the current frame lidar data, and the local map is recreated.
[0067] In the map construction thread, the common view frame constraints can be constructed based on the newly inserted keyframes and keyframe queues, and then the pose factor graph is incrementally optimized to update the keyframe queue pose. In this process, when a closed loop is detected, the closed loop frame constraints can be constructed, and the pose in the keyframe queue can be updated through incremental optimization, thereby updating the global map and completing the creation of the global map.
[0068] As attached Figure 3 The figure shows a schematic diagram of pairwise matching of image frames in an image frame set in a lidar-assisted visual mapping method: assuming that there are k frames in the image frame set, first, the 0th frame is matched with the 1st frame, the 2nd frame... the k-1th frame one by one; then the 1st frame is matched with the 2nd frame, the 3rd frame... the k-1th frame one by one, ..., until the k-2th frame is matched with the k-1th frame, and a total of solutions are obtained.
[0069] Compared with the prior art, the present invention, on the one hand, obtains the high-precision initial value of the pose of each frame of the image through the laser SLAM method, and then uses incremental triangulation to generate map points. Compared with the previous traditional visual SLAM method, online map creation makes large-scene mapping no longer limited, and the overall map accuracy is improved; on the other hand, the present invention uses more robust deep learning feature information, which can overcome the influence of illumination changes compared with traditional feature points, and provide matching information with stronger anti-interference ability.
[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. A visual mapping method based on lidar assistance, It is characterized in that The following steps are involved: Step 1) Collect lidar data, image data, inertial sensor data, and odometer data during the movement of the mobile device; Step 2) Using laser synchronous positioning and mapping method to traverse the entire data stream in step 1); Step 3) After traversing the entire data stream using the laser synchronous positioning and mapping method, the position information is obtained, and the image position information is obtained by interpolation estimation, and a high-dimensional index tree data structure is constructed based on the image position information; Step 4) traverse the image data of the entire data stream in step 1) frame by frame to extract feature information for deep learning; Step 5) traverse the image data of the entire data stream in step 1) frame by frame again, use the high-dimensional index tree data structure to search and obtain the image frame set adjacent to the current frame, then perform feature matching on the image frames in the image frame set, and generate 3D map points through incremental triangulation; The laser synchronous positioning and mapping method in step 2) includes the following steps: Step 2.1) Obtain the inertial navigation pose of the mobile device at the current moment by integrating the inertial sensor data and the odometer data, use the inertial navigation pose as the initial value, and construct a local occupancy grid map based on the first frame of lidar data obtained; Step 2.2) Match the current frame LiDAR data in the motion tracking thread with the previous frame LiDAR data to calculate the optimized inter-frame pose motion matrix; Step 2.3) Based on the inertial navigation pose of the mobile device optimized in the previous frame and the inertial navigation pose of the mobile device fused from the previous frame to the current frame, the pose prior of the current frame is obtained, and then the lidar data of the current frame is matched with the occupancy grid map, and the optimized inter-frame pose motion matrix is adjusted to obtain the accurate pose of the current frame; Step 2.4) Update the local map or rebuild the local map according to the distance between the current frame and the current key frame, and incrementally optimize and update the poses of each key frame in the key frame queue according to the motion constraints constructed by the newly inserted key frame to obtain an updated global map; Step 2.5) Match the current local map with the global map for loop detection, and use the nearest point iteration algorithm or the normal distribution transformation algorithm to obtain the pose transformation matrix from the current local map to the global map, and adjust the pose information of several sub-maps connected to the current sub-map.
2. The laser radar-assisted visual mapping method according to claim 1, It is characterized in that In step 2.4), the size of the pose transformation between the current frame pose and the current key frame and the preset threshold is determined. If the pose transformation between the current frame pose and the current key frame is less than the preset threshold, the local map is updated according to the lidar data of the current frame; if the pose transformation between the current frame pose and the current key frame is greater than the preset threshold, the key frame queue is updated according to the lidar data of the current frame, and the local map is reconstructed.
3. The laser radar-assisted visual mapping method according to claim 2, It is characterized in that In step 2.4), the common view frame constraints are constructed based on the newly inserted keyframes and keyframe queues, and then the pose factor graph is incrementally optimized to update the keyframe queue pose. When a closed loop is detected, a closed-loop frame constraint is constructed, and the pose in the keyframe queue is updated through incremental optimization to achieve an update of the global map.
4. The laser radar-assisted visual mapping method according to claim 1, It is characterized in that The local map in step 2) is the map created in the past 30 seconds.
5. The laser radar-assisted visual mapping method according to claim 1, It is characterized in that Step 5) includes the following steps: Step 5.1) Using the position information of the current frame, search for a set of image frames that satisfy a Euclidean distance less than a given threshold in a high-dimensional index tree data structure using the nearest neighbor method; Step 5.2) Match the deep learning features of each pair of images in the image frame set; Step 5.3) All images in the image frame set corresponding to the current frame are triangulated to generate 3D map points. The existing matching relationship is used to remove 3D map points with matching errors, merge redundant 3D map points, and perform local optimization at the same time. Step 5.4) Using the position information and feature matching information of the key frames, triangulate frame by frame to generate 3D map points in sequence.
6. The laser radar-assisted visual mapping method according to claim 5, It is characterized in that In step 5.2), deep learning feature matching is performed on each pair of images in the image frame set, including: point feature matching, line feature matching, surface feature matching, object feature matching, or semantic segmentation feature matching.
7. The laser radar-assisted visual mapping method according to claim 1, It is characterized in that In step 3), the image position information of each frame of the image is obtained by interpolation estimation, and a high-dimensional index tree data structure is constructed according to the 2D or 3D spatial position information in the obtained image position information.
8. The laser radar-assisted visual mapping method according to claim 1, It is characterized in that In step 4), the feature information of deep learning includes point features, line features, surface features, object features, or semantic segmentation features obtained by learning and training using a deep learning method.
9. The laser radar-assisted visual mapping method according to claim 1, It is characterized in that In step 1), the laser radar data, image data, inertial sensor data and odometer data are synchronized in time, and the time synchronization includes hardware time synchronization or software time synchronization; The laser radar is a 2D laser radar or a 3D laser radar; The mobile device is a mobile robot or a car.
