Real-time visual synchronous positioning and mapping method based on dynamic target tracking

By using ORB feature points and multi-level matching strategies in visual simultaneous positioning and mapping technology, combined with real-time target detection network and Ackerman motion model, the problems of trajectory drift and poor robustness in highly dynamic scenes are solved, and intelligent High-precision, real-time multi-target tracking and positioning of vehicles.

CN118537404APending Publication Date: 2024-08-23SOUTH CHINA UNIV OF TECH

Patent Information

Application Number
CN202410688130.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing visual synchronization positioning and mapping technology suffers from serious trajectory drift, poor robustness, insufficient perception of moving targets in the environment, and poor real-time performance of front-end processing in highly dynamic scenes.

Method used

A real-time visual synchronization positioning and mapping method based on ORB feature points and multi-level matching strategies is adopted, combined with a real-time target detection network, to simplify the motion trajectory tracking of dynamic targets through multi-level matching strategies, and use the Ackerman motion model to constrain the tracking of target positions. posture, reducing degrees of freedom and unknowns, and improving real-time performance and accuracy.

Benefits of technology

It achieves stable multi-target tracking in highly dynamic scenarios, improves positioning accuracy and robustness, meets the real-time requirements of intelligent vehicles, and reduces front-end processing complexity and computing resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537404A
    Figure CN118537404A
Patent Text Reader

Abstract

The invention discloses a real-time visual synchronous positioning and mapping method based on dynamic target tracking, and the method comprises the following steps: receiving a binocular image flow of a camera, carrying out the target detection and segmentation extraction of a monocular image, and obtaining a target detection result and a segmentation extraction result; constructing a current frame according to the binocular image flow, extracting feature points of the binocular image, generating an initial map point, tracking a camera pose, and generating a key frame; performing multi-target tracking of front and back frames on a tracking target in a scene by adopting a multi-stage matching strategy; solving a tracking target pose, updating a tracking target map point, and performing joint optimization on the camera pose, the tracking target pose and the map point according to a tracking result; managing the generated key frame, generating a local map point, updating the current key frame, and locally optimizing the pose of the camera; and calculating the similarity between the current frame and the key frame, correcting the pose of the current key frame when loopback is detected, and correcting adjacent key frames and corresponding map points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual positioning of intelligent vehicles, and in particular to a real-time visual synchronous positioning and mapping method based on dynamic target tracking. Background Art

[0002] The autonomous driving technology of smart cars involves the fields of vehicle control, path planning, perception and positioning, and is a huge and complex project. Perception and positioning technology can provide smart cars with accurate and real-time driving environment and vehicle status information through the perception of the surrounding environment, and provide spatial information for path planning and decision-making control in driving tasks. It is an important prerequisite for ensuring that smart cars can achieve unmanned driving. Simultaneous Localization and Mapping (SLAM) technology can achieve accurate three-dimensional scene reconstruction and real-time pose estimation. It has been widely used in autonomous navigation, path planning, and autonomous obstacle avoidance in the fields of drones, mobile robots, and automatic parking, with remarkable results.

[0003] However, in typical visual simultaneous localization and mapping algorithms, static fields are a strong assumption that limits the use of most SLAMs in densely populated scenes with people and vehicles. In recent years, some simultaneous localization and mapping technologies have been proposed to solve dynamic scenes. Among them, the technical route of combining simultaneous localization and mapping with multiple object tracking (MOT) can not only solve dynamic scene problems, but also improve the understanding of surrounding scenes, which has received great attention.

[0004] This method does not remove dynamic objects, but tracks moving objects, establishes the spatiotemporal relationship between the camera, static environment and dynamic objects, so that the positioning, mapping and dynamic target tracking tasks can promote each other, improve the positioning accuracy and robustness of simultaneous positioning and mapping, help understand the surrounding scene, and provide scene information for decision-making and planning. In addition, the tracking information of dynamic targets can establish new motion constraints for camera pose estimation, which can significantly improve the accuracy of camera pose estimation and the quality of the map.

[0005] DynaSLAMII, VDO-SLAM and RT-SLAM proposed by the researchers use semantic information to identify and track dynamic objects in the environment, and integrate this information into the simultaneous positioning and mapping framework to uniformly optimize the camera pose, map and posture of the tracking target to obtain more accurate tracking results.

[0006] However, existing methods require the use of multiple deep learning networks for feature extraction, and do not fully utilize the feature information provided by the visual simultaneous positioning and mapping method. Moreover, it is impossible to continuously and stably track moving targets, and the ID changes frequently, resulting in the inability to robustly solve the three-dimensional pose of the tracked target. In addition, most existing methods use instance-level object segmentation. In order to accurately track dynamic objects, VDO-SLAM also uses dense optical flow information, resulting in poor real-time performance of front-end processing. Summary of the invention

[0007] The purpose of the present invention is to solve the problems of severe trajectory drift, poor robustness and insufficient perception of moving targets in the environment in high dynamic scenes, and to provide a real-time visual synchronous positioning and mapping method based on dynamic target tracking, propose a multi-level matching strategy, simplify the movement of the tracked target, reduce the number of matching points required to solve the dynamic target posture, use a real-time target detection network, and utilize ORB feature points to improve real-time performance. It has the characteristics of high precision and strong generalization ability, and can meet the real-time requirements of intelligent vehicles.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0009] A real-time visual synchronous positioning and mapping method based on dynamic target tracking includes the following steps:

[0010] S1. Receive the binocular image stream from the camera, perform target detection and segmentation extraction on the monocular image, and obtain the target detection result and segmentation extraction result of the monocular image;

[0011] S2. Construct the current frame according to the binocular image stream, extract the feature points of the binocular image and generate the initial map points, track the camera pose, and generate key frames;

[0012] S3. Based on the target detection results and the segmentation and extraction results, a multi-level matching strategy is adopted to perform multi-target tracking of the tracking target in the previous and next frames in the dynamic scene;

[0013] S4. Solve the tracking target pose, update the tracking target map point, and jointly optimize the camera pose, tracking target pose and map point according to the tracking result;

[0014] S5. Manage the generated keyframes, generate local map points and remove redundant map points, update the current keyframes, and locally optimize the camera pose;

[0015] S6. Calculate the similarity between the current frame and the key frame, correct the posture of the current key frame when a loop is detected, and correct the adjacent key frames and corresponding map points.

[0016] Furthermore, step S1 is performed in the pre-processing thread and includes:

[0017] S11. Use a two-dimensional object detection network to detect objects in a monocular image and obtain object category information and bounding box information;

[0018] S12. performing image segmentation on the image within the bounding box, obtaining the boundary contour of the object and generating a mask of the object;

[0019] S13. Send the object category information, bounding box information, and mask information to the tracking thread.

[0020] Furthermore, step S2 is performed in the tracking thread and includes:

[0021] S21. Construct the current frame according to the binocular image stream, perform grayscale image processing and construct an image pyramid, extract the ORB feature points of the binocular image and evenly distribute the feature points, and triangulate to generate initial map points;

[0022] S22. According to the mask information of the object in the current frame, the ORB feature points are marked as static feature points and dynamic feature points belonging to the tracking target;

[0023] S23. Calculate the initial position of the camera by matching static feature points between frames;

[0024] S24. Determine whether to generate a key frame based on the observation quality of the current frame, and send the key frame to the local mapping thread.

[0025] Furthermore, step S3 is performed in the tracking thread, including:

[0026] S31. Calculate the cost matrix between all objects in the previous and next frames based on the object's category information, bounding box information, and mask information:

[0027] For objects that did not exist in the previous frame, they are initialized as new tracking targets. For objects that existed in the previous frame, the Euclidean distance d1 between the center of the bounding box of all elements in the previous frame tracking target set and the current frame detection target set, as well as the Hamming distance d2 of the ORB feature point are calculated. The cost matrix is ​​constructed according to the weight λ, and the threshold is set to limit the maximum value of the cost matrix.

[0028] S32. Based on the constructed cost matrix, the KM algorithm is used to perform initial matching on the tracking targets of the previous and next frames;

[0029] S33. After the tracking targets of the previous and next frames are initially matched, IOU matching is performed on the unmatched tracking targets;

[0030] S34. Update the tracking target information based on the two matching results, use the uniform speed model to predict the position of the tracking target in the next frame, repeat the multi-level matching steps, and achieve stable multi-target tracking.

[0031] Furthermore, in step 31, the Euclidean distance d1 between the bounding box of the target set of the previous frame and the target set of the current frame is calculated, and the calculation formula is:

[0032] d1(i,j)=(I i -I j )(I i -I j ) T

[0033] Where I represents the center coordinate of the bounding box; i represents the element of the tracking target set; j represents the element of the detection target set;

[0034] Calculate the Hamming distance d2 of the ORB feature points between the target set of the previous frame and the target set of the current frame. The calculation formula is:

[0035]

[0036] In the formula, c is the similarity coefficient, which represents the relationship between the number of matching points and the Hamming distance between two elements; N is the number of feature points; d k is the Hamming distance between the kth feature points;

[0037] Construct the cost matrix according to the weight λ, set the threshold to limit the maximum value of the cost matrix, and the cost matrix is ​​expressed as

[0038]

[0039] Where D represents the cost matrix and d represents the cost matrix element.

[0040] Furthermore, step S4 is performed in the tracking thread and includes:

[0041] S41. According to the matching of feature points of the previous and next frames of the tracking target, the initial position change of the tracking target is calculated using the Ackerman motion model;

[0042] S42. Feature matching is performed on the dynamic map points of the tracking target and the current frame, and the position and posture of the tracking target is optimized by minimizing the reprojection error according to the matching results;

[0043] S43. Triangulate and generate new dynamic map points of the tracking target;

[0044] S44. Calculate the linear velocity of the tracking target according to the dynamic map point of the tracking target;

[0045] S45. According to the tracking results, when the tracking target is stable, a graph optimization method is used to jointly optimize the camera pose, the tracking target pose, and the map points.

[0046] Furthermore, in step S41, the Ackerman motion model is used to constrain the degrees of freedom of the tracking target and simplify the pose solution of the tracking target. The constraint formula is expressed as:

[0047]

[0048] Where ΔΦ is the change in body angle about the instantaneous steering center before and after the vehicle moves; is the steering angle of the vehicle; according to the geometric relationship, R is the rotation change of the tracking target posture; t is the translation change of the tracking target posture; ρ is the scale coefficient. After introducing the Ackerman motion model, the motion of the rigid object is solved through a pair of two-dimensional matching points.

[0049] Furthermore, in step S44, the average linear velocity of the tracking target is calculated, and the average velocity of the dynamic map point is used as the linear velocity of the tracking target, which is expressed as

[0050]

[0051] In the formula, n represents the number of dynamic map points; is the translation matrix, which represents the translation change of the position of the tracking target o in the world coordinate system W at time k; I is the unit matrix; is the rotation matrix, which indicates the rotation change of the position of the tracking target o in the world coordinate system W at time k; m m,k-1 The dynamic map point representing the target of this track.

[0052] Further, in step S45, the graph optimization method includes dynamic map point motion error, tracking target uniform velocity model error, and camera and tracking target joint error;

[0053] The motion error of dynamic map points is expressed as:

[0054]

[0055] Where, T O,k Tracking target position change at time k; m m,k is the dynamic map point in the world coordinate system at time k; is the position of the target tracked at time k-1 in the world coordinate system; m m,k-1 is the dynamic map point in the world coordinate system at time k-1; e m is the motion error of dynamic map points;

[0056] The tracking target uniform velocity model error is expressed as:

[0057] e v (T O,k-1 ,T O,k )=T O,k-1-1 T O,k

[0058] Where, T O,k-1 Track the target posture change at k-1 moments; T o,k-1 -1 is the inverse operation of tracking the target posture change at time k-1; e v To track the target uniform velocity model error;

[0059] The joint error between the camera and the tracked target is expressed as:

[0060]

[0061] In the formula, m s,k is a static map point in the world coordinate system at time k; m m,k is the dynamic map point in the world coordinate system at time k; represents the position of the camera in the world coordinate system at time k; p I,k represents the position of the feature point corresponding to the map point at time k in the image coordinate system; K is the camera internal parameter; e r is the joint error between the camera and the tracked target.

[0062] Furthermore, step S5 is performed in the local mapping thread, including:

[0063] S51. First, insert the new key frame into the co-visual map, update the edges and spanning trees of the key frames with co-visual relationships, and calculate the bag-of-words vector of the new key frame;

[0064] S52. Eliminate redundant map points, generate new map points using triangulation, and optimize the poses and local map points that have a co-viewing relationship with the current key frame;

[0065] S53. Manage the key frames. If more than 90% of the map points of a key frame can be observed by more than three other key frames, the key frame is removed.

[0066] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0067] 1. The present invention proposes a multi-level matching strategy based on ORB features and target detection information, which effectively solves the problem that multi-target tracking cannot be performed stably in dynamic scenes; a real-time two-dimensional target detection network is used to detect dynamic targets in the scene, and multi-level matching is performed using detection information and ORB feature points extracted by the visual process, thereby realizing the tracking of dynamic targets in the scene; the real-time target detection network and independent thread design, as well as the use of existing ORB feature information, all ensure the real-time performance of the present invention.

[0068] 2. The present invention proposes a method for solving the position and posture of a tracking target based on Ackerman steering constraints. By adding motion constraints to the tracked vehicle in the scene, the degree of freedom and the scale of unknowns are reduced. Only a pair of two-dimensional matching points are required to solve the three-dimensional position and posture of the tracked vehicle, and the linear velocity of the tracked vehicle in the world coordinates can be calculated with an accuracy that meets the requirements of intelligent vehicle decision-making and planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 This is a flow chart of the real-time visual simultaneous positioning and mapping method based on dynamic target tracking.

[0070] Figure 2 Schematic diagram of the real-time visual simultaneous positioning and mapping method based on dynamic target tracking.

[0071] Figure 3 Schematic diagram of the multi-level matching strategy used for multi-target tracking.

[0072] Figure 4 Schematic diagram of the graph optimization method for joint optimization of camera pose, tracking target pose and map points.

[0073] Figure 5 The effect of the embodiment on the KITTI tracking dataset 03 sequence is demonstrated. DETAILED DESCRIPTION

[0074] The real-time visual synchronous positioning and mapping method based on dynamic target tracking of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0075] See also Figure 1 and Figure 2 The present invention discloses a real-time visual synchronous positioning and mapping method based on dynamic target tracking. The overall architecture is as follows: Figure 2 As shown in the figure, the specific implementation steps are completed in four threads: pre-processing thread, tracking thread, local mapping thread and loop detection thread, including the following steps:

[0076] S1. Receive the binocular image stream from the camera, perform target detection and segmentation extraction on the monocular image, and obtain the target detection result and segmentation extraction result of the monocular image.

[0077] S2. Construct the current frame according to the binocular image stream, extract the feature points of the binocular image and generate the initial map points, track the camera pose, and generate key frames.

[0078] S3. Based on the target detection results and segmentation extraction results, a multi-level matching strategy is adopted to perform multi-target tracking in previous and next frames for the tracking targets in dynamic scenes.

[0079] S4. Solve the tracking target pose, update the tracking target map points, and jointly optimize the camera pose, tracking target pose and map points based on the tracking results.

[0080] S5. Manage the generated keyframes, generate local map points and remove redundant map points, update the current keyframe, and locally optimize the camera pose.

[0081] S6. Calculate the similarity between the current frame and the key frame, correct the posture of the current key frame when a loop is detected, and correct the adjacent key frames and corresponding map points.

[0082] Specifically, step S1 is performed in the pre-processing thread. First, the left eye image of the binocular camera is pre-processed and resized to 1024*256, and then the adjusted image is sent to the SSD prediction node under pytorch through the ROS (Robot Operating System) node for target detection. Objects with motion capabilities in the image, such as vehicles, pedestrians, etc., are detected to obtain the category information and bounding box information of the object. The image in the bounding box is segmented by the region growing method to obtain the boundary contour of the object and generate the mask of the object, and the category information, bounding box information and mask information of the object are converted into ROS message format and passed to the tracking thread.

[0083] Specifically, step S2 is performed in the tracking thread. The tracking thread processes the binocular image stream. If it is a color image, it is converted into a grayscale image, and then the current frame is constructed according to the binocular image stream. When constructing the current frame, a quadtree structure is used to evenly extract ORB (Oriented FAST and Rotated BRIEF) features in the image pyramid, and the fastest approximate nearest neighbor algorithm is used to match the feature points between two adjacent frames. If the feature points extracted from the image are rich enough and there are enough direct feature point matches in the binocular image, the initial map points are generated by triangulation, and the initialization is completed. Otherwise, the initialization is continued using subsequent frames.

[0084] After initialization, the camera pose is tracked and key frames are generated, including:

[0085] S21. Construct the current frame according to the binocular image stream, perform grayscale image processing and construct an image pyramid, extract the ORB feature points of the binocular image and evenly distribute the feature points, and triangulate to generate initial map points;

[0086] S22. According to the mask information of the object in the current frame, the ORB feature points are marked as static feature points and dynamic feature points belonging to the tracking target;

[0087] S23. Calculate the initial position of the camera by matching static feature points between frames;

[0088] S24. Determine whether to generate a key frame based on the observation quality of the current frame, and send the key frame to the local mapping thread.

[0089] If the uniform velocity model of the camera has been generated, the uniform velocity model is used to predict the pose of the current frame, and feature point matching is performed. According to the matching results, 3D-2D pose estimation is used to obtain the pose of the current frame. Then matching is performed in the local map, and 3D-2D pose optimization is performed. If the uniform velocity model has not been generated, for example, initialization and repositioning have just been performed, the reference key frame and the bag of words model [Dorian Gálvez-López, Juan D Tardos. Bags of binary words for fast place recognition in images sequences. IEEE Transactions on Robotics, 2012, 28 (5): 1188-1197.] are used for accelerated matching. After the matching is completed, it is also matched with the local map, and the current frame pose is finally optimized. If tracking fails, repositioning is performed.

[0090] Specifically, see Figure 3 , step S3 is performed in the tracking thread, including:

[0091] S31. Calculate the cost matrix between all objects in the previous and next frames based on the category information, bounding box information and mask information of the object.

[0092] For objects that did not exist in the previous frame, they are initialized as new tracking targets. For objects that existed in the previous frame (tracking targets), the Euclidean distance d1 between the center of the bounding box of all elements in the previous frame tracking target set and the current frame detection target set, as well as the Hamming distance d2 of the ORB feature point are calculated, and the cost matrix is ​​constructed according to the weight λ, and the threshold is set to limit the maximum value of the cost matrix.

[0093] Calculate the Euclidean distance d1 between the bounding box of the target set tracked in the previous frame and the target set detected in the current frame. The calculation formula is:

[0094] d1(i,j)=(I i -I j )(I i -I j ) T

[0095] Where I represents the center coordinate of the bounding box; i represents the element of the tracking target set; j represents the element of the detection target set.

[0096] Calculate the Hamming distance d2 of the ORB feature points between the tracking target set of the previous frame and the detection target set elements of the current frame. Assume that the i-th element of the tracking target set is matched with the j-th element of the detection target set, and they match N pairs of feature points. The Hamming distance calculation formula between the two set elements is

[0097]

[0098] In the formula, c is the similarity coefficient, which indicates the relationship between the number of matching points and the Hamming distance between two elements. The larger c is, the more matching points there are, the greater the similarity between the two elements is, and the smaller the Hamming distance is. N is the number of feature points; d k is the Hamming distance between the kth feature points.

[0099] Construct the cost matrix according to the weight λ, set the threshold to limit the maximum value of the cost matrix, and the cost matrix is ​​expressed as

[0100]

[0101] Where D represents the cost matrix and d represents the cost matrix element.

[0102] S32. Based on the constructed cost matrix, the KM algorithm is used to perform initial matching on the tracking targets of the previous and next frames.

[0103] S33. After the tracking targets of the previous and next frames are initially matched, IOU matching is performed on the unmatched tracking targets.

[0104] S34. Update the tracking target information based on the two matching results, use the uniform speed model to predict the position of the tracking target in the next frame, repeat the multi-level matching steps, and achieve stable multi-target tracking.

[0105] After obtaining the cost matrix, the KM algorithm can be used to find the best match. Figure 3 The gating matrix in is used as the threshold to limit the maximum value of the cost matrix. The ID of the matched target remains unchanged, and the unmatched target is matched by IOU. IOU matching can solve the problem of cascade matching failure caused by sudden changes in appearance features, such as occlusion. After two matches, the matched tracking target keeps the original ID unchanged. The unmatched tracking target records the lost time. If the time is greater than the set threshold, it is deleted from the tracking target set. At the same time, the status information, feature information, existence time, loss time information, etc. of all tracking targets are updated.

[0106] Specifically, see Figure 4 , step S4 is performed in the tracking thread, including:

[0107] S41. Based on the matching of the feature points of the previous and next frames of the tracking target, the Ackerman motion model is used to calculate the initial position change of the tracking target. The Ackerman motion model is used to constrain the degree of freedom of the tracking target and simplify the position solution of the tracking target. The constraint formula is expressed as:

[0108]

[0109] Where ΔΦ is the change in body angle about the instantaneous steering center before and after the vehicle moves; is the steering angle of the vehicle; according to the geometric relationship, R is the rotation change of the tracking target posture; t is the translation change of the tracking target posture; ρ is the scale coefficient. After introducing the Ackerman motion model, the motion of the rigid object is solved through a pair of two-dimensional matching points.

[0110] Assume first that there is a moving vehicle in the space. From time k-1 to time k, the relative position change of the tracking vehicle is R O ,t O , its feature point position changes from O k-1 to k , the relative position change of the camera is R C ,t C , the projection of the vehicle feature point in the image coordinate system is p I1,k-1 ,p I2,k At this time, the camera pose change and the tracking vehicle pose change satisfy the following projection relationship:

[0111] p I2,k K -T (R C t O +t C ) ∧ R C R O K -1 p I1,k-1 =0

[0112] Definition E O =t S ∧ R S ,t S =R C t D +t C ,R S =R C R D , the relative position change of the camera R C ,t C Under the known premise, a geometric constraint equation with only one unknown can be constructed, and then the constraint equation can be solved through a pair of matching points to obtain the change in the vehicle's posture. When there are multiple pairs of matching points, the least squares solution of the overdetermined equation can be solved.

[0113] S42. Perform feature matching on the dynamic map points of the tracking target and the current frame, and optimize the position and posture of the tracking target by minimizing the reprojection error according to the matching results.

[0114] S43. Triangulate and generate new dynamic map points of the tracking target, such as Figure 4 shown.

[0115] S44. Calculate the linear velocity of the target according to the dynamic map point of the target. Calculate the average linear velocity of the target, and use the average velocity of the dynamic map point as the linear velocity of the target, expressed as

[0116]

[0117] In the formula, n represents the number of dynamic map points; is the translation matrix, which represents the translation change of the position of the tracking target o in the world coordinate system W at time k; I is the unit matrix; is the rotation matrix, which indicates the rotation change of the position of the tracking target o in the world coordinate system W at time k; m m,k-1 The dynamic map point representing the target of this track.

[0118] S45. According to the tracking results, when the tracking target is stable, the camera pose, the tracking target pose, and the map points are jointly optimized using a graph optimization method. Figure 5 As shown, the graph optimization method includes the dynamic map point motion error, the tracking target uniform velocity model error, and the joint error of the camera and the tracking target.

[0119] The motion error of dynamic map points is expressed as:

[0120]

[0121] Where, T O,k Tracking target position change at time k; m m,k is the dynamic map point in the world coordinate system at time k; is the position of the target tracked at time k-1 in the world coordinate system; m m,k-1 is the dynamic map point in the world coordinate system at time k-1; e m is the motion error of dynamic map points.

[0122] The tracking target uniform velocity model error is expressed as:

[0123] e v (T O,k-1 ,T O,k )=T O,k-1 -1 T O,k

[0124] Where, T O,k-1 Track the target posture change at k-1 moments; T O,k-1 -1 is the inverse operation of tracking the target posture change at time k-1; e v is the uniform velocity model error of the tracking target.

[0125] The joint error between the camera and the tracked target is expressed as:

[0126]

[0127] In the formula, m s,k is a static map point in the world coordinate system at time k; m m,k is the dynamic map point in the world coordinate system at time k; represents the position of the camera in the world coordinate system at time k; p I,k represents the position of the feature point corresponding to the map point at time k in the image coordinate system; K is the camera internal parameter; e r is the joint error between the camera and the tracked target.

[0128] After completing the tracking of the dynamic target in the scene, the uniform velocity model is used to predict the position and posture of the tracked target at the next moment.

[0129] Specifically, step S5 is performed in the local mapping thread to complete the management of keyframes, the generation of local map points, and local optimization. First, insert the new keyframe into the co-visual map, update the edges and spanning trees of the keyframes with co-visual relationships, and calculate the bag-of-words vector of the new keyframe. Eliminate redundant map points, generate new map points using triangulation, and optimize the poses and local map points that have co-visual relationships with the current keyframe. Manage the keyframes. If more than 90% of the map points of a keyframe can be observed by more than 3 other keyframes, the keyframe is eliminated.

[0130] Specifically, step S6 is performed in the loop detection thread to reduce the cumulative error. During loop detection, the current key frame and nearby key frames in the co-image are detected, and the bag-of-words score is calculated. The key frame with the lowest score is compared with the recognition database. If the similarity reaches a certain threshold, the current key frame and its two adjacent frames, the loop candidate key frame and its two adjacent frames are taken out for cross-validation to prevent incorrect loop matching. After the match is successful, the similarity transformation group is used to correct the pose of the current key frame, and then the adjacent key frames and observed map points are corrected. After that, the Essential Graph is optimized first, and finally the global bundle adjustment (Global BA) is used to optimize the pose and map points of all frames.

[0131] Example

[0132] This embodiment uses the KITTI tracking data set to select 9 scenes containing dynamic features for experiments, verifying the positioning accuracy, multi-target tracking accuracy and real-time performance of the present invention, and conducts comparative experiments with VDO-SLAM and Cube-SLAM methods. The relative pose error (RPE) is used as the evaluation criterion, and the experimental results are shown in Table 1.

[0133] Table 1 Relative trajectory error on the KITTI dataset

[0134]

[0135]

[0136] The results show that in terms of camera attitude estimation, the four algorithms all solve the problem of SLAM positioning failure in dynamic scenes, and all have good accuracy in dynamic scenes. Among them, the method of the present invention has the best overall performance, with a camera relative displacement error of 0.025m / frame and a relative rotation error of 0.043deg / frame;

[0137] In terms of tracking target pose estimation, the method of the present invention also performs well. The relative displacement error of the tracking target is 0.25m / frame, and the relative rotation error is 1.212deg / frame. Compared with CubeSLAM, the accuracy of tracking target trajectory estimation is significantly improved. However, compared with VDO-SLAM, the error is larger, especially when the camera moves violently and the tracking accuracy is not high when the tracking target is far away from the camera. This is related to inaccurate depth estimation and too few matched feature points. The dense optical flow tracking used by VDO-SLAM can better solve these problems, but it is time-consuming and consumes a lot of computing resources.

[0138] The front-end visual odometer part of the method of the present invention is directly related to the real-time positioning of the vehicle. The performance of this part directly determines the application potential of the method in intelligent vehicles. The time consumption of each link of the visual odometer is shown in Table 2.

[0139] Table 2 Analysis of time consumption of tracking threads

[0140]

[0141] From the data in the table, it can be seen that the posture optimization time accounts for the highest proportion, accounting for about 36%, and the feature extraction part accounts for 26.9%. Key frame generation accounts for about 21.1%. The camera and tracking target posture estimation is a closely related process. Statistics show that the two together consume about 16% of the time. The method of the present invention can run at 10-13FPS, which can meet the navigation positioning of intelligent vehicles in actual driving scenarios, and the accuracy and real-time requirements of multi-target tracking.

[0142] The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit disclosed by the present invention should fall within the patent scope covered by the present invention.

Claims

1. A real-time visual synchronous positioning and mapping method based on dynamic target tracking, characterized in that: The following steps are involved: S1. Receive the binocular image stream from the camera, perform target detection and segmentation extraction on the monocular image, and obtain the target detection result and segmentation extraction result of the monocular image; S2. Construct the current frame according to the binocular image stream, extract the feature points of the binocular image and generate the initial map points, track the camera pose, and generate key frames; S3. Based on the target detection results and the segmentation and extraction results, a multi-level matching strategy is adopted to perform multi-target tracking of the tracking target in the previous and next frames in the dynamic scene; S4. Solve the tracking target pose, update the tracking target map point, and jointly optimize the camera pose, tracking target pose and map point according to the tracking result; S5. Manage the generated keyframes, generate local map points and remove redundant map points, update the current keyframes, and locally optimize the camera pose; S6. Calculate the similarity between the current frame and the key frame, correct the posture of the current key frame when a loop is detected, and correct the adjacent key frames and corresponding map points.

2. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 1 is characterized in that: Step S1 is performed in the pre-processing thread and includes: S11. Use a two-dimensional object detection network to detect objects in a monocular image and obtain object category information and bounding box information; S12. performing image segmentation on the image within the bounding box, obtaining the boundary contour of the object and generating a mask of the object; S13. Send the object category information, bounding box information, and mask information to the tracking thread.

3. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 2 is characterized in that: Step S2 is performed in the tracking thread and includes: S21. Construct the current frame according to the binocular image stream, perform grayscale image processing and construct an image pyramid, extract the ORB feature points of the binocular image and evenly distribute the feature points, and triangulate to generate initial map points; S22. According to the mask information of the object in the current frame, the ORB feature points are marked as static feature points and dynamic feature points belonging to the tracking target; S23. Calculate the initial position of the camera by matching static feature points between frames; S24. Determine whether to generate a key frame based on the observation quality of the current frame, and send the key frame to the local mapping thread.

4. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 3 is characterized in that: Step S3 is performed in the tracking thread and includes: S31. Calculate the cost matrix between all objects in the previous and next frames based on the object's category information, bounding box information, and mask information: For objects that did not exist in the previous frame, they are initialized as new tracking targets. For objects that existed in the previous frame, the Euclidean distance d1 between the center of the bounding box of all elements in the previous frame tracking target set and the current frame detection target set, as well as the Hamming distance d2 of the ORB feature point are calculated. The cost matrix is ​​constructed according to the weight λ, and the threshold is set to limit the maximum value of the cost matrix. S32. Based on the constructed cost matrix, the KM algorithm is used to perform initial matching on the tracking targets of the previous and next frames; S33. After the tracking targets of the previous and next frames are initially matched, IOU matching is performed on the unmatched tracking targets; S34. Update the tracking target information based on the two matching results, use the uniform speed model to predict the position of the tracking target in the next frame, repeat the multi-level matching steps, and achieve stable multi-target tracking.

5. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 4 is characterized in that: In step 31, the Euclidean distance d1 between the bounding box of the target set of the previous frame and the target set of the current frame is calculated, and the calculation formula is d1(i,j)=(I i -I j )(I i -I j ) T Where I represents the center coordinate of the bounding box; i represents the element of the tracking target set; j represents the element of the detection target set; Calculate the Hamming distance d2 of the ORB feature points between the target set of the previous frame and the target set of the current frame. The calculation formula is: In the formula, c is the similarity coefficient, which represents the relationship between the number of matching points and the Hamming distance between two elements; N is the number of feature points; d k is the Hamming distance between the kth feature points; Construct the cost matrix according to the weight λ, set the threshold to limit the maximum value of the cost matrix, and the cost matrix is ​​expressed as Where D represents the cost matrix and d represents the cost matrix element.

6. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 1 is characterized in that: Step S4 is performed in the tracking thread and includes: S41. According to the matching of feature points of the previous and next frames of the tracking target, the initial position change of the tracking target is calculated using the Ackerman motion model; S42. Feature matching is performed on the dynamic map points of the tracking target and the current frame, and the position and posture of the tracking target is optimized by minimizing the reprojection error according to the matching results; S43. Triangulate and generate new dynamic map points of the tracking target; S44. Calculate the linear velocity of the tracking target according to the dynamic map point of the tracking target; S45. According to the tracking results, when the tracking target is stable, a graph optimization method is used to jointly optimize the camera pose, the tracking target pose, and the map points.

7. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 6 is characterized in that: In step S41, the Ackerman motion model is used to constrain the degrees of freedom of the tracking target and simplify the pose solution of the tracking target. The constraint formula is expressed as: Where ΔΦ is the change in body angle about the instantaneous steering center before and after the vehicle moves; is the steering angle of the vehicle; according to the geometric relationship, R is the rotation change of the tracking target posture; t is the translation change of the tracking target posture; ρ is the scale coefficient. After introducing the Ackerman motion model, the motion of the rigid object is solved through a pair of two-dimensional matching points.

8. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 6 is characterized in that: In step S44, the average linear velocity of the tracking target is calculated, and the average velocity of the dynamic map point is taken as the linear velocity of the tracking target, which is expressed as In the formula, n represents the number of dynamic map points; is the translation matrix, which represents the translation change of the position of the tracking target o in the world coordinate system W at time k; I is the unit matrix; is the rotation matrix, which indicates the rotation change of the position of the tracking target o in the world coordinate system W at time k; m m,k-1 The dynamic map point representing the target of this track.

9. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 6 is characterized in that: In step S45, the graph optimization method includes dynamic map point motion error, tracking target uniform velocity model error, and camera and tracking target joint error; The motion error of dynamic map points is expressed as: Where, T O,k Tracking target position change at time k; m m,k is the dynamic map point in the world coordinate system at time k; is the position of the target tracked at time k-1 in the world coordinate system; m m,k-1 is the dynamic map point in the world coordinate system at time k-1; e m is the motion error of dynamic map points; The tracking target uniform velocity model error is expressed as: e v (T O,k-1 ,T O,k )=T O,k-1 -1 T O,k Where, T O,k-1 Track the target posture change at k-1 moments; T O,k-1 -1 is the inverse operation of tracking the target posture change at time k-1; e v To track the target uniform velocity model error; The joint error between the camera and the tracked target is expressed as: In the formula, m s,k is a static map point in the world coordinate system at time k; m m,k is the dynamic map point in the world coordinate system at time k; represents the position of the camera in the world coordinate system at time k; p I,k represents the position of the feature point corresponding to the map point at time k in the image coordinate system; K is the camera internal parameter; e r is the joint error between the camera and the tracked target.

10. The real-time visual synchronous positioning and mapping method based on dynamic target tracking according to claim 1, characterized in that: Step S5 is performed in the local mapping thread and includes: S51. First, insert the new key frame into the co-visual map, update the edges and spanning trees of the key frames with co-visual relationships, and calculate the bag-of-words vector of the new key frame; S52. Eliminate redundant map points, generate new map points using triangulation, and optimize the poses and local map points that have a co-viewing relationship with the current key frame; S53. Manage the key frames. If more than 90% of the map points of a key frame can be observed by more than three other key frames, the key frame is removed.

Citation Information

Patent Citations

  • Mobile robot navigation map generation method based on ORB_SLAM2

    CN110501017A

  • Dynamic SLAM (Simultaneous Localization and Mapping) method with multi-target tracking capability in automatic driving scene

    CN115482282A

  • Object SLAM method combined with multi-target tracking in dynamic environment

    CN117036408A

Cited By

  • Method and system for rapidly selecting and tracking dynamic visual servo target under complex background

    CN119704186A

  • Monocular vector high-precision map data association method based on geometric context

    CN121074132A

  • Target tracking method and device, computer readable storage medium and electronic equipment

    CN121437560A

  • VSLAM method based on multi-target tracking network and instance segmentation network

    CN122928897B