A dynamic environment binocular vision SLAM method based on semantic segmentation

Through semantic segmentation and binocular visual SLAM methods, dynamic and static objects are identified, solving the accuracy and stability problems of visual SLAM in dynamic environments, achieving efficient map construction in actual scenes, simplifying operations and reducing costs.

CN114140527BActive Publication Date: 2024-09-10SUZHOU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111373890.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2024-09-10
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

The existing visual SLAM algorithm suffers from reduced positioning accuracy and stability in dynamic environments, and traditional methods are computationally complex and costly, making them difficult to apply to most actual scenarios.

Method used

The dynamic environment binocular vision SLAM method based on semantic segmentation is used to generate semantic masks through deep learning networks, extract and match binocular image feature points, remove dynamic objects, calculate camera poses, separate dynamic and static objects, and estimate the motion of dynamic objects parameters, recalculate the camera pose, and construct a static map.

Benefits of technology

It achieves efficient identification of dynamic and static objects and construction of maps in dynamic environments, with simple operation and low cost, and is suitable for most practical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140527B
    Figure CN114140527B
Patent Text Reader

Abstract

The present invention relates to a dynamic environment binocular vision SLAM method based on semantic segmentation, comprising the following steps: obtaining a semantic mask of an object, the semantic mask being generated by a deep learning network; using a binocular camera to obtain multiple frames of continuous binocular images; extracting feature points on each binocular image frame, and matching feature points on adjacent binocular images; removing feature points on the semantic mask, and calculating the camera pose according to the remaining feature points; separating dynamic objects and static objects on the binocular image based on the camera pose; recalculating the camera pose based on the separated static objects; and constructing a static map based on the updated camera pose and the feature points on the static objects. The present invention uses a binocular camera, and uses the image segmented with semantic information as a guide, so as to identify dynamic and static objects in a scene and realize the construction of a map. The method is simple in operation, low in cost, and can be applied to most practical scenes.
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 space positioning, and in particular to a dynamic environment binocular vision SLAM method based on semantic segmentation. Background Art

[0002] With the development of computer technology and artificial intelligence, intelligent autonomous mobile robots have become an important research direction and research hotspot in the field of robotics. As mobile robots become increasingly intelligent, they have higher and higher requirements for their own positioning and environmental maps. At present, intelligent mobile robots have some practical applications for completing their own positioning and map construction in known environments, but there are still many challenges in unknown environments. The technology for completing positioning and map construction in such an environment is called SLAM (Simultaneous Localization and Mapping), which means simultaneous positioning and map construction. The goal of SLAM is to enable the robot to complete its own positioning and incremental map construction during movement in an unknown environment.

[0003] Traditional SLAM algorithms mainly rely on distance sensors with good stability, such as LiDAR. However, the distance data obtained by LiDAR is very sparse, which results in the environmental map constructed by SLAM containing only a very small number of landmarks. This map can only be used to improve the positioning accuracy of the robot, and cannot be used in other areas of robot navigation such as path planning. In addition, the high price, large volume, weight and power consumption of LiDAR limit its application in certain fields. Although cameras can overcome the disadvantages of LiDAR in price, volume, quality and power consumption to a certain extent, and cameras can obtain rich information, cameras also have some problems, such as sensitivity to light changes and high computational complexity. At present, there are also multi-sensor fusion SLAM algorithms, which can effectively alleviate the problems caused by the shortcomings of a single sensor itself, but also further increase the cost and complexity of the algorithm.

[0004] Most of the existing visual SLAM algorithms are based on the static assumption of the environment, that is, the scene is static and there are no objects in relative motion. However, in actual outdoor scenes, there are a large number of dynamic objects such as pedestrians and vehicles, which limits the application of SLAM systems based on the above assumptions in actual scenes. In response to the problem of reduced positioning accuracy and stability of visual SLAM algorithms in dynamic environments, existing algorithms use some algorithms based on probability statistics or geometric constraints to reduce the impact of dynamic objects on the accuracy and stability of visual SLAM algorithms. For example, when there are a small number of dynamic objects in the scene, probabilistic algorithms such as RANSAC (Random Sample Consensus) can be used to eliminate dynamic objects. However, when a large number of dynamic objects appear in the scene, the above algorithms will not be able to distinguish dynamic objects normally. Other algorithms use optical flow methods to distinguish dynamic objects. In scenes with a large number of dynamic objects, the use of optical flow methods can indeed distinguish dynamic objects, but because the process of calculating dense optical flow is time-consuming, it will reduce the execution efficiency of the SLAM algorithm.

[0005] Therefore, how to provide a dynamic environment binocular vision SLAM method based on semantic segmentation that is simple in operation, low in cost, and can be applied to most practical scenarios is a technical problem that needs to be urgently solved by those skilled in the art. Summary of the invention

[0006] The present invention provides a dynamic environment binocular vision SLAM method based on semantic segmentation to solve the above technical problems.

[0007] In order to solve the above technical problems, the present invention provides a dynamic environment binocular vision SLAM method based on semantic segmentation, comprising the following steps:

[0008] Obtaining a semantic mask of the object, wherein the semantic mask is generated by a deep learning network;

[0009] A binocular camera is used to obtain multiple frames of continuous binocular images;

[0010] Extracting feature points on each frame of the binocular image and matching feature points on adjacent frames of binocular images;

[0011] Eliminating feature points located on the semantic mask, and calculating the camera pose according to the remaining feature points;

[0012] Separating dynamic objects and static objects in the binocular image based on the camera pose;

[0013] estimating motion parameters of the dynamic object based on the separated dynamic object;

[0014] Recalculate the camera pose based on the separated static objects;

[0015] A static map is constructed based on the updated camera pose and feature points located on the static object.

[0016] Preferably, the deep learning network used to generate the semantic mask is a Mask R-CNN model.

[0017] Preferably, the method of extracting feature points on each frame of the binocular image and matching feature points on adjacent frames of binocular images includes:

[0018] The feature points are extracted using the ORB method;

[0019] The descriptors of each feature point on each frame of the stereo image are obtained, and the Hamming distance between two descriptors of a feature point on two adjacent frames of the stereo image is calculated. The two feature points with the smallest Hamming distance form a group of matched feature points.

[0020] Preferably, the method for determining whether the feature point is located on the semantic mask comprises: the semantic mask at least includes a frame of an object, and if the coordinates of the feature point are within the frame, then the feature point is located on the semantic mask.

[0021] Preferably, the method for calculating the camera pose based on the remaining feature points comprises: using a PnP algorithm to solve the camera pose.

[0022] Preferably, the method of separating the dynamic objects and the static objects on the binocular image based on the camera posture; and estimating the motion parameters of the dynamic objects based on the separated dynamic objects comprises:

[0023] Separating dynamic objects: Based on the camera posture and the positional relationship between the binocular images of adjacent frames and the semantic mask, calculating the motion probability of the object corresponding to the semantic mask, if the motion probability is greater than a first threshold, determining that the object corresponding to the semantic mask is a dynamic object;

[0024] Dynamic object matching: for the dynamic object, calculating the hu moment, center point Euclidean distance and histogram distribution of the semantic mask corresponding to the dynamic object in the adjacent frame binocular images, and calculating the probability of matching the dynamic object in the adjacent frame binocular images based on the hu moment, center point Euclidean distance and histogram distribution. If the probability is greater than a second threshold, the two dynamic objects in the adjacent frame binocular images are the same object; and

[0025] Dynamic object motion estimation: The dynamic object is associated between consecutive frames through dynamic object matching, and the motion parameters of the dynamic object are estimated through the PnP algorithm.

[0026] Preferably, the step of separating dynamic objects comprises:

[0027] Based on the camera pose, calculating the position of the semantic mask of the previous frame corresponding to the current frame;

[0028] Calculating the three-dimensional coordinates of all feature points on the semantic mask after projection using a disparity map, wherein the disparity map is calculated using the binocular image;

[0029] Calculate the error between the feature points of the previous frame and the current frame in the three directions of x, y, and z, where the maximum error is taken as the error value of the feature point;

[0030] The error value is converted into a motion probability of an object corresponding to the semantic mask where the feature point is located, and based on the motion probability, it is determined whether the object corresponding to the semantic mask is a dynamic object.

[0031] Preferably, the method for recalculating the camera pose based on the separated static object includes: removing feature points located on the semantic mask corresponding to the dynamic object, and updating the camera pose using a PnP algorithm based on the remaining feature points.

[0032] Preferably, the method for constructing a static map based on the updated camera pose and feature points located on the static object comprises:

[0033] Determine a plurality of key frames based on the updated camera pose and feature points located on the static object;

[0034] Matching feature points on a plurality of the key frames and removing unmatched feature points;

[0035] Check whether the matched feature points satisfy the epipolar geometry constraints and remove the feature points that do not satisfy them;

[0036] Check whether the forward depth of field, parallax, back-projection error and scale of the remaining feature points are consistent, remove inconsistent feature points, and generate map points based on the remaining feature points;

[0037] The static map is constructed based on the map points.

[0038] Preferably, before constructing the static map, the method further includes optimizing the generated map points by bundle adjustment.

[0039] Compared with the prior art, the dynamic environment binocular vision SLAM method based on semantic segmentation provided by the present invention uses a binocular camera and uses the image after semantic information segmentation as a guide. It can identify dynamic and static objects in the scene and realize map construction. The method is simple in operation, low in cost, and can be applied to most practical scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1It is a flow chart of a dynamic environment binocular vision SLAM method based on semantic segmentation in a specific embodiment of the present invention;

[0041] Figure 2 It is a schematic diagram of the process of separating dynamic objects in a specific implementation manner of the present invention. DETAILED DESCRIPTION

[0042] In order to describe the technical solution of the above invention in more detail, specific embodiments are listed below to demonstrate the technical effect; it should be emphasized that these embodiments are used to illustrate the present invention but are not limited to the scope of the present invention.

[0043] The dynamic environment binocular vision SLAM method based on semantic segmentation provided by the present invention is as follows: Figure 1 As shown, the following steps are included:

[0044] A semantic mask of the object is obtained, where the semantic mask is generated by a deep learning network. In this embodiment, the deep learning network used to generate the semantic mask is a Mask R-CNN model, thereby achieving high-quality semantic segmentation.

[0045] A binocular camera is used to obtain multiple frames of continuous binocular images, from which the third-dimensional depth information of the two-dimensional image pixels can be obtained. Of course, the intrinsic and extrinsic parameters of the binocular camera mainly include: camera focal length f, camera optical center (u, v), camera lens radial distortion coefficients kc1 and kc2, etc. The above parameters can be obtained by calibration using Zhang Zhengyou calibration method.

[0046] Extract feature points on each frame of the binocular image and match feature points on adjacent frames of binocular images. The specific method includes:

[0047] The feature points are extracted using the ORB (Oriented Fast and Rotated Brief) method;

[0048] The descriptors of each feature point on each frame of the stereo image are obtained, and the Hamming distance between two descriptors of a feature point on two adjacent frames of the stereo image is calculated. The two feature points with the smallest Hamming distance form a group of matched feature points.

[0049] Eliminate the feature points located on the semantic mask, and calculate the camera pose based on the remaining feature points. The method for determining whether the feature point is located on the semantic mask includes: the semantic mask includes at least the border of the object, and the coordinates of the feature point are within the range of the border, then the feature point is located on the semantic mask; if it is not within the range of the border, then the feature point is not located on the semantic mask. The method for calculating the camera pose based on the remaining feature points includes: using the PnP (Perspective-n-Point) algorithm to solve the camera pose, constructing the reprojection error and optimizing it as shown in the following formula (1):

[0050]

[0051] By minimizing the reprojection error, the optimal solution is obtained, which is the required camera pose.

[0052] Based on the camera posture, the dynamic objects and static objects in the binocular image are separated, and the specific method includes:

[0053] Separate dynamic objects: Based on the camera posture and the positional relationship between the adjacent frame binocular images and the semantic mask, calculate the motion probability of the object corresponding to the semantic mask. If the motion probability is greater than a first threshold, the object corresponding to the semantic mask is determined to be a dynamic object. The specific steps are as follows: Figure 2 As shown, including:

[0054] Based on the camera pose, calculating the position of the semantic mask of the previous frame corresponding to the current frame;

[0055] The three-dimensional coordinates of all feature points on the semantic mask after projection are calculated using a disparity map, wherein the disparity map is calculated by the binocular image, and specifically, the disparity map can be calculated using an ELAS (English full name: Efficient Large Scale StereoMatching) algorithm;

[0056] Calculate the error between the feature points of the previous frame and the current frame in the three directions of x, y, and z, where the maximum error is taken as the error value of the feature point;

[0057] The error value is converted into a motion probability of an object corresponding to the semantic mask where the feature point is located, and based on the motion probability, it is determined whether the object corresponding to the semantic mask is a dynamic object.

[0058] According to the camera imaging principle, the conversion relationship between the three-dimensional coordinate system and the pixel (two-dimensional) coordinate system, as well as the depth and parallax conversion, is:

[0059]

[0060]

[0061] The coordinate set of the jth semantic mask in the pixel coordinate system of frame t-1 is Through formula (2) and formula (3), we can get the three-dimensional coordinate set of the semantic mask at this moment:

[0062] The three-dimensional point set after movement is obtained by formula (4):

[0063]

[0064] By formula (3), we can get The set converted to pixel coordinate system Then use The disparity map is calculated by formula (2) and formula (3)

[0065] remember for The i-th point in for At the i-th point, the error Δi between two points is calculated as:

[0066]

[0067] Then the error of the object corresponding to the feature point is:

[0068]

[0069] Calculated motion probability S(Δ j ) is:

[0070]

[0071] Dynamic object matching: For the dynamic object, the hu moment (i.e., image moment), center point Euclidean distance, and histogram distribution of the semantic mask corresponding to the dynamic object in the adjacent frame binocular image are calculated, and the probability of matching the dynamic object in the adjacent frame binocular image is calculated based on the hu moment, center point Euclidean distance, and histogram distribution. If the probability is greater than the second threshold, the two dynamic objects in the adjacent frame binocular image are the same object. Specifically, the hu moment of the image is an image feature with translation, rotation, and scale invariance.

[0072] The general moment calculation formula of an image is as follows:

[0073]

[0074] To calculate the hu moment, you need to calculate the center distance. First, calculate the center of mass coordinates:

[0075]

[0076]

[0077] Then construct the central moment:

[0078]

[0079] Then normalize the center distance:

[0080]

[0081] The hu moment is constructed through the central moment. The hu moment has 7 invariant moments. The specific formula is as follows:

[0082] Φ1=η 20 +η 02

[0083]

[0084] Φ3=(η 20 -3η 12 ) 2 +3(η 21 -η 03 ) 2

[0085] Φ4=(η 30 +η 12 ) 2 +(η 21 +η 03 ) 2

[0086] Φ5=(η 30 +3η 12 )(η 30 +η 12 )[(η 30 +η 12 ) 2 -3(η 21 +η 03 ) 2 +(3η 21 -η 03 )(η 21 +η 03 )[3(η 30 +η 12 ) 2 -(η 21 +η 03 ) 2

[0087] Φ6=(η 20 -η 02 )[(η 30 +η12 ) 2 -(η 21 +η 03 ) 2 ]+4η 11 (η 30 +η 12 )(η 21 +η 03 )

[0088] Φ7=(3η 21 -η 03 )(η 30 +η 12 )[(η 30 +η 12 ) 2 -3(η 21 +η 03 ) 2 ]+]+(3η 12 -η 30 )(η 21 +η 03 )[3(η 30 +η 12 ) 2 -(η 21 +η 03 ) 2 ] (12)

[0089] remember is the hu moment of the jth semantic mask in the t-1th frame, and the distance between the hu moments of two semantic masks is:

[0090]

[0091] Calculate the center position of each semantic mask, and then calculate the Euclidean distance between the center points of each semantic mask between the previous and next frames, which is recorded as:

[0092]

[0093] Calculate the histogram distribution of the semantic mask and then normalize it, recorded as Then the Kl divergence (full name: Kullback–Leibler divergence, also known as relative entropy) of different semantic masks of the previous and next frames is calculated.

[0094]

[0095] Combine hu moment, Euclidean distance and histogram to estimate the matching probability:

[0096]

[0097] The method for estimating motion parameters of dynamic objects based on separated dynamic objects includes: dynamic object motion estimation: completing the association of dynamic objects between consecutive frames through dynamic object matching, and estimating the motion parameters of the dynamic objects through a PnP algorithm.

[0098] The camera pose is recalculated based on the separated static objects. The specific method includes: removing the feature points on the semantic mask corresponding to the dynamic object, and updating the camera pose using the PnP algorithm according to the remaining feature points. The specific calculation method can refer to the method for calculating the camera pose for the first time mentioned above.

[0099] The static map is constructed based on the updated camera pose and the feature points located on the static object, and the specific method includes:

[0100] Determine a plurality of key frames based on the updated camera pose and feature points located on the static object;

[0101] Matching feature points on multiple key frames, then triangulating the matched feature points, and matching unmatched points with unmatched feature points in other key frames until all matched feature points are found, and removing unmatched feature points;

[0102] Check whether the matched feature points satisfy the epipolar geometry constraints and remove the feature points that do not satisfy them;

[0103] Check whether the forward depth of field, parallax, back-projection error and scale of the remaining feature points are consistent, remove inconsistent feature points, and generate map points based on the remaining feature points;

[0104] The static map is constructed based on the map points.

[0105] Preferably, before constructing the static map, the method further includes optimizing the generated map points by using bundle adjustment (BA, English full name: bundle adjustment).

[0106] The above method identifies dynamic objects in binocular images by processing binocular images, estimates the camera pose and the pose of dynamic objects, constructs an environmental map, and meets the mobile robot's needs for three-dimensional maps.

[0107] In summary, the dynamic environment binocular vision SLAM method based on semantic segmentation provided by the present invention includes the following steps: obtaining a semantic mask of an object, the semantic mask is generated by a deep learning network; using a binocular camera to obtain multiple frames of continuous binocular images; extracting feature points on each frame of the binocular image, matching feature points on adjacent frames of binocular images; removing feature points located on the semantic mask, and calculating the camera pose based on the remaining feature points; separating dynamic objects and static objects on the binocular image based on the camera pose; estimating motion parameters of dynamic objects based on the separated dynamic objects; recalculating the camera pose based on the separated static objects; and constructing a static map based on the updated camera pose and feature points located on the static objects. The present invention uses a binocular camera, and uses the image after semantic information segmentation as a guide, so as to identify dynamic and static objects in the scene and realize the construction of a map. The method is simple in operation, low in cost, and can be applied to most practical scenes.

[0108] Obviously, those skilled in the art can make various changes and modifications to the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the invention fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.

Claims

1. A dynamic environment binocular vision SLAM method based on semantic segmentation, characterized in that: The steps include: Obtaining a semantic mask of the object, wherein the semantic mask is generated by a deep learning network; A binocular camera is used to obtain multiple frames of continuous binocular images; Extracting feature points on each frame of the binocular image and matching feature points on adjacent frames of binocular images; Eliminating feature points located on the semantic mask, and calculating the camera pose according to the remaining feature points; Separating dynamic objects and static objects in the binocular image based on the camera pose; estimating motion parameters of the dynamic object based on the separated dynamic object; Recalculate the camera pose based on the separated static objects; Building a static map based on the updated camera pose and feature points located on the static object; The method further comprises separating the dynamic objects and the static objects on the binocular image based on the camera posture; The method for estimating the motion parameters of the dynamic object based on the separated dynamic object includes: Separating dynamic objects: Based on the camera posture and the positional relationship between the binocular images of adjacent frames and the semantic mask, calculating the motion probability of the object corresponding to the semantic mask, if the motion probability is greater than a first threshold, determining that the object corresponding to the semantic mask is a dynamic object; Dynamic object matching: for the dynamic object, calculating the hu moment, center point Euclidean distance and histogram distribution of the semantic mask corresponding to the dynamic object in the adjacent frame binocular images, and calculating the probability of matching the dynamic object in the adjacent frame binocular images based on the hu moment, center point Euclidean distance and histogram distribution. If the probability is greater than a second threshold, the two dynamic objects in the adjacent frame binocular images are the same object; and Dynamic object motion estimation: completing the association of dynamic objects between consecutive frames through the dynamic object matching, and estimating the motion parameters of the dynamic objects through the PnP algorithm; The method for recalculating the camera pose based on the separated static object includes: removing feature points located on the semantic mask corresponding to the dynamic object, and updating the camera pose using a PnP algorithm based on the remaining feature points; The method for constructing a static map based on the updated camera pose and feature points located on the static object comprises: Determine a plurality of key frames based on the updated camera pose and feature points located on the static object; Matching feature points on a plurality of the key frames and removing unmatched feature points; Check whether the matched feature points satisfy the epipolar geometry constraints and remove the feature points that do not satisfy them; Check whether the forward depth of field, parallax, back-projection error and scale of the remaining feature points are consistent, remove inconsistent feature points, and generate map points based on the remaining feature points; The static map is constructed based on the map points.

2. The dynamic environment binocular vision SLAM method based on semantic segmentation as claimed in claim 1, characterized in that, The deep learning network used to generate the semantic mask is the Mask R-CNN model.

3. The dynamic environment binocular vision SLAM method based on semantic segmentation as claimed in claim 1, characterized in that, The method of extracting feature points on each frame of the binocular image and matching feature points on adjacent frames of binocular images includes: The feature points are extracted using the ORB method; The descriptors of each feature point on each frame of the stereo image are obtained, and the Hamming distance between two descriptors of a feature point on two adjacent frames of the stereo image is calculated. The two feature points with the smallest Hamming distance form a group of matched feature points.

4. The dynamic environment binocular vision SLAM method based on semantic segmentation as claimed in claim 1, characterized in that, The method for determining whether the feature point is located on the semantic mask comprises: the semantic mask at least includes a frame of an object, and if the coordinates of the feature point are within the range of the frame, then the feature point is located on the semantic mask.

5. The dynamic environment binocular vision SLAM method based on semantic segmentation as claimed in claim 1, characterized in that, The method for calculating the camera pose according to the remaining feature points includes: using a PnP algorithm to solve the camera pose.

6. The dynamic environment binocular vision SLAM method based on semantic segmentation as claimed in claim 1, characterized in that, The step of separating dynamic objects comprises: Based on the camera pose, calculating the position of the semantic mask of the previous frame corresponding to the current frame; Calculating the three-dimensional coordinates of all feature points on the semantic mask after projection using a disparity map, wherein the disparity map is calculated using the binocular image; Calculate the error between the feature points of the previous frame and the current frame in the three directions of x, y, and z, where the maximum error is taken as the error value of the feature point; The error value is converted into a motion probability of an object corresponding to the semantic mask where the feature point is located, and based on the motion probability, it is determined whether the object corresponding to the semantic mask is a dynamic object.

7. The dynamic environment binocular vision SLAM method based on semantic segmentation as claimed in claim 1, characterized in that, Before constructing the static map, the step of optimizing the generated map points by bundle adjustment is also included.