Real-time visual slam method in dynamic environment based on affine information

By using a visual SLAM method based on affine information, and leveraging affine consistency constraints and real-time semantic segmentation to detect dynamic objects, the problem of localization and mapping in dynamic environments of visual SLAM systems is solved, achieving high-precision and efficient localization and mapping.

CN117671505BActive Publication Date: 2026-11-24HENAN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311710990.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2026-11-24
Estimated Expiration
2043-12-13

AI Technical Summary

Technical Problem

Existing visual SLAM systems suffer from slow localization speed, low localization accuracy, and poor mapping results in dynamic environments, and cannot effectively overcome the negative impact of moving objects on localization and mapping.

Method used

A method based on affine information is adopted, which detects outliers by constructing affine consistency constraints, segments dynamic objects using a real-time semantic segmentation model, and updates the map based on outlier information, thus designing a real-time mapping method.

Benefits of technology

It improves the positioning accuracy and robustness of the visual SLAM system in dynamic environments, enhances the system's real-time performance and tracking accuracy, and achieves effective mapping results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117671505B_ABST
    Figure CN117671505B_ABST
Patent Text Reader

Abstract

A real-time visual SLAM method in a dynamic environment based on affine information, comprising: S1, constructing an affine consistency constraint based on the matching point inter-affine relationship according to the output characteristics of the image acquisition sensor; S2, analyzing the real-time image collected by the image acquisition sensor frame by frame, and generating an actual matching point set based on the current frame; S3, detecting the abnormal points in the actual matching point set through the affine consistency constraint condition to obtain an abnormal proportion, and setting a semantic segmentation prior value according to the abnormal proportion; S4, if the semantic segmentation prior value corresponding to the previous frame reaches a preset recognition threshold, regarding the current frame as a key frame, and extracting a dynamic object from the key frame by using a real-time semantic segmentation model; S5, updating the map based on the information of the abnormal points and the dynamic object; and S6, real-time mapping based on the selection result of the key frame and the dynamic object. The present application can solve the problems of slow positioning speed, low positioning accuracy and poor mapping effect of the vSLAM in the prior art in a dynamic environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of simultaneous localization and mapping (SLAM) technology, specifically a real-time visual SLAM method based on affine information in dynamic environments. Background Technology

[0002] Simultaneous Localization and Mapping (SLAM) is a key technology for autonomous robot navigation. It can simultaneously estimate pose and build a dense 3D point cloud map in an unknown environment. Therefore, it has wide applications in autonomous driving, unmanned aerial vehicles (UAVs), virtual reality (AR), and autonomous underwater vehicles (AUVs).

[0003] Visual SLAM (vSLAM) systems are an important area of ​​SLAM system research due to their single sensor, low cost, and lightweight characteristics. However, a static environment is a prerequisite for most visual simultaneous localization and mapping (SLAM) systems. This strong assumption limits the practical application of most existing SLAM systems.

[0004] When a moving object enters the camera's field of view, dynamic matching points directly interrupt camera localization, and noise blocks formed by the moving object also contaminate the constructed map. To ensure the long-term application of vSLAM in real-world scenarios, overcoming the negative impact of moving objects (such as pedestrians and vehicles) on localization accuracy and mapping performance has become a research focus. In vSLAM systems, this limitation is typically overcome by introducing learning-based methods to segment dynamic objects or geometry-based methods to sparsely detect dynamic features. However, geometry-based methods lack the ability to construct effective maps, while learning-based methods often suffer from poor real-time performance. Summary of the Invention

[0005] To address the shortcomings of existing vSLAM technologies, such as slow positioning speed, low positioning accuracy, and poor mapping results in dynamic environments, this invention provides a real-time visual SLAM method for dynamic environments based on affine information.

[0006] To achieve the above objectives, the specific solution adopted by the present invention is as follows: a real-time visual SLAM method based on affine information in a dynamic environment, comprising the following steps: S1. Based on the output characteristics of the image acquisition sensor, construct affine consistency constraints based on the affine relationship between matching points; S2. Analyze the real-time images acquired by the image acquisition sensor frame by frame, and generate the actual matching point set based on the current frame; S3. Detect outliers in the actual matching point set through affine consistency constraints to obtain the proportion of outliers, and set semantic segmentation prior values ​​based on the proportion of outliers. S4. If the semantic segmentation prior value corresponding to the previous frame reaches the preset recognition threshold, then the current frame is taken as the key frame, and the dynamic object is extracted from the key frame using the real-time semantic segmentation model. S5. Update the map based on anomaly information and dynamic objects; S6. Real-time mapping based on keyframe selection results and dynamic objects.

[0007] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments, the specific methods of S1 include: S11. Convert the output image of the image acquisition sensor into a grayscale image and extract at least two feature point sets, each containing multiple feature points. S12. Perform feature matching on all feature points and use rotation consistency constraints to obtain several basic matching point sets containing multiple pairs of matching points. S13. Construct affine consistency constraints based on the internal constraints of the basic matching point set.

[0008] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments, the specific methods for obtaining the basic matching point set in S12 include: S121. Using the feature point as the point to be judged, calculate the pixel distance between the feature point in the other feature point set and the point to be judged. The calculation method is as follows: dis = (p x -q x ) 2 +(p y -q y ) 2 Where dis is the simple pixel distance between pixels p and q, and the subscripts x and y are the horizontal and vertical coordinates of the pixel, respectively; S122. Filter other feature points based on pixel distance. The specific method is as follows: Here, `set()` represents a set, `n` is the number of elements in the set, and `dis` is the number of elements in the set. i It is the distance of other feature points i from the point to be judged, f() is the filtering function, and it has S123. Combine the point to be judged with the U points that are closest to the point to be judged to form a basic matching point set; S124. Repeat S121 to S123 to obtain several basic matching point sets.

[0009] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments: In S123, U=k*N m , where N m The number of pixels in the feature point set is k, and the scale parameter is k.

[0010] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments, the affine consistency constraint is expressed as: when the number of one-to-one matches among the U pairs of matching points in the basic matching point set is N... c Satisfying N c When the value is greater than (U-2), a pair of matching points is considered a correct match.

[0011] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments: In S3, the anomaly ratio of outliers is calculated as r = N. o / N m , where N o The number of detected outliers is used as the percentage of outliers, and this percentage is used as a priori value for semantic segmentation.

[0012] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments: In S4, the real-time semantic segmentation model is set to the YOLOv5s-seg model, and the semantic segmentation method of the YOLOv5s-seg model based on affine information is as follows: Here, `set()` represents a set, `ini_mask` is the initial mask matrix segmented by the YOLOv5s-seg model, `YOLOv5s-seg()` is the real-time inference function of the YOLOv5s-seg model, `frame` is the input current frame, `fin_mask` is the remaining mask matrix after joint judgment using affine information, `k` is the number of initial segmented regions, i.e., the number of initially identified objects, and `g()` is a function that jointly determines whether the current object is dynamic based on affine information. Where, N l_o and N l_m These represent the number of outliers and matching points that fall within the object to be judged, respectively.

[0013] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments: In S5, the method for updating the map based on outlier information and dynamic objects includes filtering the actual matching point set to remove outliers and dynamic objects from the map. The specific method is as follows: `tracking_matching_points` are map points used to update the map, and `matching_points` is the actual set of matched points. A It is an outlier in the actual set of matching points, D S It is the identified dynamic object, and h() represents the map point filtering function, which means deleting the latter from the former and keeping the remainder.

[0014] As a further optimization of the real-time visual SLAM method in dynamic environments based on affine information, in S6, map points are added when a new keyframe is determined. The specific method is as follows: Here, creat means adding a new map point, and drop means not adding a new map point.

[0015] As a further optimization of the above-mentioned real-time visual SLAM method based on affine information in dynamic environments, the real-time mapping method in S6 is as follows: mappint_thread(key_frame,depth_frame); Here, mappin_thread is the mapping function, key_frame is the RGB image of the keyframe, and depth_frame is the current depth frame.

[0016] Beneficial Effects: This invention utilizes a visual sensor as the input object. The visual sensor can be a commonly used device such as a monocular camera, a binocular camera, or an RGB-D camera, with a wide range of applications. Furthermore, it designs an affine consistency constraint based on the affine principle to detect outliers in the matching point set. By efficiently detecting outliers, it reduces the impact of dynamic features on system tracking, thereby improving the localization accuracy and robustness of the visual SLAM system in dynamic environments. Based on this, a semantic method based on outlier priors is designed to improve the system's real-time performance and tracking accuracy. This mainly includes two aspects: First, based on the ratio of outliers in the matching set, the prior values ​​used by the semantic method are designed, and the semantic method is used sparsely to preserve beneficial system tracking feature points. The system achieves several improvements: firstly, it reduces the time required for semantic methods; secondly, it uses a real-time semantic segmentation model to segment the current frame, obtaining masks of all objects in the training loop. Combined with outlier information obtained from radial constraints, and based on the ratio of outliers in each mask to all matching points in the mask region, it constructs an effective semantic method to detect dynamic objects. Based on the outlier and dynamic object detection results, it designs an improved map update method to ensure that no dynamic features exist in the map used for long-term tracking, thereby further improving the system's tracking accuracy. Finally, based on the keyframe selection results and semantic segmentation results, and taking advantage of the ease with which RGB-D sensors acquire depth maps, it designs a real-time mapping method to achieve effective mapping for RGB-D sensors in dynamic environments. Attached Figure Description

[0017] Figure 1 This is a flowchart of the present invention;

[0018] Figure 2 It is an affine relationship diagram between a pair of mismatched points under the improved affine consistency constraint;

[0019] Figure 3 This is a schematic diagram of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Please see Figures 1 to 3 A real-time visual SLAM method based on affine information in dynamic environments, comprising S1 to S6.

[0022] S1. Based on the output characteristics of the image acquisition sensor, construct affine consistency constraints based on the affine relationship between matching points. The specific methods in S1 include S11 to S13.

[0023] S11. Convert the output image of the image acquisition sensor into a grayscale image and extract at least two feature point sets, each containing multiple feature points. Feature extraction can be performed using the ORB (Oriented Fast and Rotated BRIEF) feature extraction method, which is a commonly used method in this field and will not be elaborated further here.

[0024] S12. Perform feature matching on all feature points and obtain several basic matching point sets containing multiple pairs of matching points using rotation consistency constraints. In S12, the specific methods for obtaining the basic matching point sets include S121 to S124.

[0025] S121. Using the feature point as the point to be judged, calculate the pixel distance between the feature point in the other feature point set and the point to be judged. The calculation method is as follows: dis = (p x -q x ) 2 +(p y -q y ) 2 In this context, dis is the simple pixel distance between pixels p and q, and the subscripts x and y are the horizontal and vertical coordinates of the pixel, i.e., the horizontal and vertical coordinates of a pixel in the image.

[0026] S122. Filter other feature points based on pixel distance. The specific method is as follows: Here, `set()` represents a set, `dis_points_ini` is the initial set used to determine whether a feature point matches correctly, and each feature point includes two parameters: the feature point's index and the distance to the point to be judged. `n` is the number of elements in the set, and `dis`... i It is the distance of other feature points i from the point to be judged, f() is the filtering function, and it has In this invention, ε is set to 400. Compared with feature points that are far from the point to be judged, the correlation between feature points that are close to each other is more conducive to improving the effect of affine consistency constraint.

[0027] S123. Combine the point to be judged with the top U points that are closest to the point to be judged to form a basic matching point set. Specifically, `sort_indices = sort(dis_points_ini.dis, U)`, where `sort_indices` is the index information of the feature points to be sorted, used to determine how many surrounding feature points match the point to be judged one-to-one, or satisfy the affine theorem. `sort()` is the sorting function and returns the index information of the feature points. The "." operation indicates retrieving a parameter of the object. In S123, U = k * N m , where N m The number of pixels in the feature point set is k, which is a scaling parameter. In this embodiment, k is set to 0.01.

[0028] S124. Repeat S121 to S123 to obtain several basic matching point sets.

[0029] S13. Construct the Scope-Affine constraint based on the internal constraints of the basic matching point set. The Scope-Affine constraint is expressed as: when the number of one-to-one matches among the U pairs of matching points in the basic matching point set is N... c Satisfying N c When the value is greater than (U-2), a pair of matching points is considered a correct match.

[0030] S2. Analyze the real-time images acquired by the image acquisition sensor frame by frame, and generate the actual matching point set based on the current frame.

[0031] S3. Outliers in the actual matching point set are detected using affine consistency constraints to obtain the outlier ratio, and semantic segmentation prior values ​​are set based on this ratio. In S3, the outlier ratio is calculated as r = N. o / N m , where N o The number of detected outliers is used, and the proportion of outliers is taken as a priori value for semantic segmentation. This enables efficient detection of dynamic features, saves time in the system using semantic methods, and appropriately improves the system's tracking accuracy, i.e., it retains features that are beneficial to the system's tracking.

[0032] S4. If the semantic segmentation prior value corresponding to the previous frame reaches the preset recognition threshold, then the current frame is taken as the keyframe, and the dynamic object is extracted from the keyframe using the real-time semantic segmentation model. Specifically, the semantic segmentation prior value is first judged using the following method: Here, Scope-Affine and Semantic represent the Scope-Affine method and the semantic method, respectively. The '&' symbol indicates the combined use of the methods. When the anomaly proportion r is not less than ξ, the semantic method is applied to the current frame; when the anomaly proportion r is less than ξ, only Scope-Affine is applied to the system tracking process. As ξ increases, Scope-Affine needs to perform better in anomaly detection because more frames will only use Scope-Affine to detect anomalies tracked by the system. Increasing the constraint range of the affine scope is an effective method, i.e., increasing ò or U. However, due to the increase in the constraint range, dynamic features are forced into the detection process of static features, so more static features are also detected as anomalies. Therefore, for comprehensive consideration, ξ is set to 0.6.

[0033] In S4, the real-time semantic segmentation model is set to the YOLOv5s-seg model. The semantic segmentation method of the YOLOv5s-seg model based on affine information is as follows: Here, `set()` represents a set, `ini_mask` is the initial mask matrix segmented by the YOLOv5s-seg model, including the masks of all objects, `YOLOv5s-seg()` is the real-time inference function of the YOLOv5s-seg model used to segment the input image, `frame` is the current input frame, `fin_mask` is the remaining mask matrix after joint judgment using affine information, i.e., the mask matrix belonging to dynamic objects, `k` is the number of initial segmented regions, i.e., the number of initially identified dynamic objects, and `g()` is a function that jointly determines whether the current object is dynamic based on affine information. Where, N l_o and N l_m These represent the number of outliers and matching points that fall within the object to be judged, respectively; that is, the number of outliers and matching points that fall within the mask to be judged.

[0034] For a segmented object, if the ratio of outliers in the segmented region to all matching points in the region is greater than another threshold, the object is considered dynamic; based on the dynamic feature detection results, the final set of feature matching points is obtained.

[0035] Furthermore, after identifying the dynamic object, a dynamic feature detection method is designed for further optimization: Here, mask() is the indexing method for the object mask matrix, which consists of all fin_masks. px and py represent the horizontal and vertical coordinates of the point that is later in time in a pair of matched feature points in the image matrix, respectively. drop indicates that this point is identified as a dynamic object, and otherwise indicates that this point is retained and used for subsequent tracking.

[0036] S5. Updating the map based on outlier information and dynamic objects. In S5, the method for updating the map based on outlier information and dynamic objects includes filtering the actual set of matching points to remove outliers and dynamic objects from the map. The specific method is as follows: `tracking_matching_points` are map points used to update the map, and `matching_points` is the actual set of matched points. A It is an outlier in the actual set of matching points, D S It is the identified dynamic object, and h() represents the map point filtering function, which means deleting the latter from the former and keeping the remainder.

[0037] S6. Real-time mapping based on keyframe selection results and dynamic objects. In S6, map points are added when a new keyframe is determined. The specific method is as follows: Here, creat means adding a new map point, and drop means not adding a new map point.

[0038] In S6, the method for real-time mapping is as follows: mappint_thread(key_frame,depth_frame); Here, mappin_thread is the mapping function, key_frame is the RGB image of the keyframe, and depth_frame is the current depth frame.

[0039] This invention utilizes a visual sensor as the input, which can be a common device such as a monocular camera, a binocular camera, or an RGB-D camera. It then designs an affine consistency constraint based on the affine principle to detect outliers in the matching point set. By efficiently detecting outliers, the impact of dynamic features on system tracking is reduced, thereby improving the localization accuracy and robustness of the visual SLAM system in dynamic environments. Based on this, a semantic method based on outlier priors is designed to improve the system's real-time performance and tracking accuracy. This mainly includes two aspects: First, based on the ratio of outliers in the matching set, the prior values ​​used by the semantic method are designed, and the semantic method is used sparsely to preserve beneficial system tracking feature points and enhance the semantic method's effectiveness. The system achieves several improvements: firstly, it reduces the time required for data processing; secondly, it uses a real-time semantic segmentation model to segment the current frame, obtaining masks of all objects in the training loop. Combined with outlier information obtained from radial constraints, and based on the ratio of outliers in each mask to all matching points in the mask region, it constructs an effective semantic method to detect dynamic objects. Based on the outlier and dynamic object detection results, it designs an improved map update method to ensure that no dynamic features exist in the map used for long-term tracking, thereby further improving the system's tracking accuracy. Finally, based on the keyframe selection results and semantic segmentation results, and taking advantage of the ease with which RGB-D sensors can acquire depth maps, it designs a real-time mapping method to achieve effective mapping for RGB-D sensors in dynamic environments.

[0040] In summary, this invention overcomes the limitations of existing vSLAM systems in long-term application in real-world scenarios due to static environmental assumptions, while achieving an overall improvement in tracking real-time performance, tracking accuracy, and mapping quality.

[0041] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A real-time visual SLAM method based on affine information in a dynamic environment, characterized in that, Includes the following steps: S1. Based on the output characteristics of the image acquisition sensor, construct affine consistency constraints based on the affine relationship between matching points; the specific method of S1 includes: S11. Convert the output image of the image acquisition sensor into a grayscale image and extract at least two feature point sets, each containing multiple feature points. S12. Perform feature matching on all feature points and use rotation consistency constraints to obtain several basic matching point sets containing multiple pairs of matching points. S13. Construct affine consistency constraints based on the internal constraints of the basic matching point set. S2. Analyze the real-time images acquired by the image acquisition sensor frame by frame, and generate the actual matching point set based on the current frame; S3. Detect outliers in the actual matching point set through affine consistency constraints to obtain the proportion of outliers, and set semantic segmentation prior values ​​based on the proportion of outliers. S4. If the semantic segmentation prior value corresponding to the previous frame reaches the preset recognition threshold, then the current frame is taken as the key frame, and the dynamic object is extracted from the key frame using the real-time semantic segmentation model. In S4, the real-time semantic segmentation model is set to the YOLOv5s-seg model. The semantic segmentation method of the YOLOv5s-seg model based on affine information is as follows: ; in, Represents a set, It is the initial mask matrix segmented by the YOLOv5s-seg model. It is the real-time inference function of the YOLOv5s-seg model. It is the current input frame. It is the remaining mask matrix after joint judgment using affine information. This refers to the number of initially segmented regions, i.e., the number of initially identified objects. It is a function that uses affine information to determine whether the current object is dynamic, and it has... ; in, and These are the number of outliers and matching points that fall within the object to be judged, respectively. S5. Updating the map based on outlier information and dynamic objects; In S5, the method for updating the map based on outlier information and dynamic objects includes filtering the actual matching point set to remove outliers and dynamic objects from the map. The specific method is as follows: ; These are map points used to update the map. It is the actual set of matching points. These are outliers in the actual set of matching points. It is a dynamically identified object. This represents a filtering function for map points, indicating that the latter should be removed from the former and the remaining items should be retained; S6. Real-time mapping based on keyframe selection results and dynamic objects; In S6, map points are added when a new keyframe is determined, specifically by: ; in, This indicates a newly added map point. This indicates that no new map points will be added. In S6, the method for real-time mapping is as follows: ; in, It is a graphing function. It is the RGB image of the keyframe. This is the current depth frame.

2. The real-time visual SLAM method based on affine information in a dynamic environment as described in claim 1, characterized in that, In S12, the specific methods for obtaining the basic matching point set include: S121. Using the feature point as the point to be judged, calculate the pixel distance between the feature point in the other feature point set and the point to be judged. The calculation method is as follows: in, It is a pixel. and Simple pixel distance between them, subscript and These are the horizontal and vertical coordinates of the pixel; S122. Filter other feature points based on pixel distance. The specific method is as follows: ,in, Represents a set, It is the number of elements in the set. Other feature points Distance from the point to be judged It is a filtering function, and it has... ; S123, combine the point to be judged with the U points that are closest to the point to be judged to form a basic matching point set; in S123 ,in The number of pixels in the feature point set is k, and the scale parameter is k. S124. Repeat S121 to S123 to obtain several basic matching point sets.

3. The real-time visual SLAM method based on affine information in a dynamic environment as described in claim 2, characterized in that, In S3, the anomaly percentage of outliers is calculated as follows: ,in The number of detected outliers is used as the percentage of outliers, and this percentage is used as a priori value for semantic segmentation.

Citation Information

Patent Citations

  • Robust vision SLAM method based on deep learning in dynamic scene

    CN112446882A

  • Visual SLAM method based on dynamic target tracking and feature point filtering

    CN116977408A