A 3D SLAM method based on moving target detection in dynamic scenes

Through the 3D SLAM method based on motion object detection in dynamic scenarios, the problem of insufficient positioning accuracy of traditional 3D SLAM systems in complex dynamic environments is solved. Through object detection and keyframe selection, the accuracy and consistency of map construction are improved, and the generation of 3D navigation map for mobile robot navigation.

CN118758289BActive Publication Date: 2024-11-26YUNNAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411216651.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-11-26
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The traditional 3D SLAM system has insufficient positioning accuracy in complex dynamic environments, resulting in defects in the built 3D navigation map.

Method used

Using the 3D SLAM method based on motion object detection in dynamic scenarios, by collecting RGBD images, extracting ORB feature points and depth information, determining the boundaries of dynamic objects based on the object detection network, and removing dynamic feature points, using static feature points to estimate the camera position, and Combining camera pose changes and image pixel-level information, select keyframes, perform global optimization and loopback detection, and generate a 3D navigation map.

Benefits of technology

It improves the positioning accuracy of the SLAM system in dynamic scenarios and the consistency of map construction, ensures the accuracy of subsequent loopback detection, and builds a 3D navigation map for mobile robot navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118758289B_ABST
    Figure CN118758289B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image data processing technology, and in particular to a 3D SLAM method based on motion target detection in a dynamic scene. The method includes, after collecting RGBD images, based on the target detection network, determining the boundaries of dynamic objects in the image, and removing the ORB feature points located in the boundaries of the dynamic objects to obtain static feature points; performing feature matching operations on static feature points according to depth information, determining the correspondence between static feature points and map points, and estimating the camera's posture based on the correspondence and depth information; determining key frames according to the camera's posture and RGBD image pixel-level information; performing global optimization operations and loop detection operations based on the key frames to obtain RGBD images of key frames; generating 3D navigation maps according to the RGBD images of the key frames and the camera's posture. The 3D SLAM system is accurately positioned in a complex dynamic environment, and the consistency between the constructed 3D navigation map and the environment is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data processing, and in particular to a 3D SLAM method based on motion target detection in a dynamic scene. Background Art

[0002] The main purpose of 3D SLAM (Three Dimensional Simultaneous Localization and Mapping) is to enable unmanned systems to accurately locate themselves when autonomously exploring unknown environments, and further build detailed maps of the environment. This technology not only needs to ensure the accuracy of positioning, but also needs to ensure a detailed description of the environmental structure, which is the basis for the autonomous navigation of unmanned systems.

[0003] Traditional 3D SLAM algorithms are mainly aimed at static scenes, but in real scenes, various types of dynamic objects are inevitably present. At this time, if the feature points of dynamic objects are added to the pose estimation, it will lead to incorrect feature matching, resulting in serious trajectory drift, and thus making it impossible to build a consistent and accurate environment map.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a 3D SLAM method based on motion target detection in dynamic scenes, aiming to solve the technical problem that the further constructed 3D navigation map has defects due to the insufficient positioning accuracy of the traditional 3D SLAM system in complex dynamic environments.

[0006] To achieve the above objectives, the present application proposes a 3D SLAM method based on moving target detection in a dynamic scene, wherein the method comprises:

[0007] When receiving an instruction to build a 3D navigation map, collecting an RGBD image, and extracting ORB feature points and depth information of the RGBD image;

[0008] Based on the target detection network, determine the boundary of the dynamic object in the RGBD image, and remove the ORB feature points located in the boundary of the dynamic object to obtain static feature points;

[0009] According to the depth information, a feature matching operation is performed on the static feature points to determine a correspondence between the static feature points and map points, and based on the correspondence and the depth information, a pose of the camera is estimated;

[0010] Determining a key frame according to the camera's position and the RGBD image pixel-level information;

[0011] Based on the key frame, a global optimization operation and a loop detection operation are performed to obtain an RGBD image of the key frame;

[0012] A 3D navigation map is generated according to the RGBD image of the key frame and the position and posture of the camera.

[0013] Optionally, the ORB feature points include image corner points and descriptors, and the step of extracting the ORB feature points of the RGBD image includes:

[0014] Build an image pyramid based on RGBD images;

[0015] Inputting the image pyramid into the FAST algorithm, detecting image corner points on each layer of the image pyramid, and obtaining the image corner points;

[0016] Based on the Gaussian blur algorithm, the RGBD image is smoothed to obtain a denoised image;

[0017] The denoised image is input into the BRIEF algorithm, and descriptor calculation is performed on the image corner points to obtain the descriptor.

[0018] Optionally, the step of inputting the image pyramid into the FAST algorithm, detecting image corner points on each layer of the image pyramid, and obtaining the image corner points includes:

[0019] Detecting image corner points on each layer of the image pyramid to obtain a first corner point;

[0020] Performing a uniform distribution operation on the first corner point based on a quadtree algorithm to obtain a second corner point;

[0021] Performing grayscale centroid calculation on the second corner point to determine the direction of the second corner point;

[0022] The second corner point with a determined direction is used as the image corner point.

[0023] Optionally, the step of determining the boundary of the dynamic object in the RGBD image based on the target detection network, and removing the ORB feature points located in the boundary of the dynamic object to obtain the static feature points includes:

[0024] Inputting the RGBD image into the target detection network, performing a dynamic object detection operation, and determining the boundary of the dynamic object;

[0025] Based on the dynamic object boundary, performing a classification operation on the ORB feature points to obtain dynamic feature points and the static feature points;

[0026] The dynamic feature points are eliminated and the static feature points are retained.

[0027] Optionally, the step of determining a key frame according to the position and posture of the camera and the pixel-level information of the RGBD image includes:

[0028] Taking the position and posture of the camera as a selection condition and based on the rotation matrix between the current frame and the reference key frame, determining the rotation matrix of the current frame relative to the reference key frame;

[0029] Obtaining a rotation angle of the camera according to a rotation matrix of the current frame relative to a reference key frame, and determining a translation amount of the current frame relative to the reference key frame according to a translation vector of the current frame and a translation vector of the reference key frame;

[0030] Constructing a camera pose transformation based on the rotation angle of the camera and the translation of the current frame relative to the reference key frame;

[0031] When the posture change of the camera is greater than a preset posture change threshold, the current frame is determined to be the key frame.

[0032] Optionally, when the posture change of the camera is greater than a preset posture change threshold, after the step of determining that the current frame is the key frame, the method further includes:

[0033] Based on the key frame, determining an interval corresponding to the key frame;

[0034] Performing quality judgment on images in the interval corresponding to the key frames, determining the key frame quality of the images in the interval, and removing key frames whose key frame quality is less than a preset quality threshold;

[0035] Determine a candidate key frame image interval based on key frames greater than or equal to the preset quality threshold;

[0036] Determining an image quality score of a frame according to the frames in the candidate key frame image interval and the RGBD image pixel level information of the frame;

[0037] The frames with image quality scores greater than or equal to the average value of the selected key frames are taken as the key frames.

[0038] Optionally, the step of performing a global optimization operation and a loop detection operation based on the key frame includes:

[0039] In a key frame database, obtaining a common view key frame corresponding to each key frame, and determining a bag-of-words vector between each key frame and the corresponding common view key frame;

[0040] Determining a similarity score between each of the keyframes and the corresponding common view keyframe according to the bag-of-words vector;

[0041] Based on the similarity score, determining a candidate closed-loop frame corresponding to each of the key frames;

[0042] According to the pose transformation between each key frame and each candidate closed-loop frame, the pose of the camera and the position of the map point of each key frame are updated.

[0043] Optionally, the step of generating a 3D navigation map according to the RGBD image of the key frame and the position and posture of the camera includes:

[0044] Based on the RGBD image of the key frame and the position and posture of the camera, construct a color 3D dense point cloud map;

[0045] Generate an octree map according to the colored 3D dense point cloud map;

[0046] The 3D navigation map is constructed based on the octree map.

[0047] In addition, to achieve the above-mentioned objectives, the present application also proposes a 3D SLAM device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the 3D SLAM method based on motion target detection in a dynamic scene as described above.

[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the 3D SLAM method based on motion target detection in a dynamic scene as described above are implemented.

[0049] One or more technical solutions proposed in this application have at least the following technical effects:

[0050] By using the target detection network MobileNetV2-SSD at the front end of the 3D SLAM system to detect dynamic objects and remove the dynamic feature points they generate, and using static feature points to estimate the camera's pose, the positioning accuracy of the SLAM system in dynamic scenes is improved. The key frames are selected based on the camera's pose changes and the pixel-level information of the image, which improves the quality of key frame selection and ensures the accuracy of subsequent loop detection and the consistency of map construction. At the same time, based on the RGBD image of the key frame, a 3D navigation map that can be used for mobile robot navigation is constructed in combination with the PCL point cloud library and the octree map. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0053] Figure 1 A flowchart of a first embodiment of a 3D SLAM method based on motion target detection in a dynamic scene of the present application is provided;

[0054] Figure 2 A flow chart of a second embodiment of a 3D SLAM method based on motion target detection in a dynamic scene of the present application is provided;

[0055] Figure 3 A schematic diagram of a brief process of a 3D SLAM method based on motion target detection in a dynamic scene provided in Example 2 of the present application;

[0056] Figure 4 The present invention is a schematic diagram of the 3D SLAM device structure of the hardware operating environment involved in a 3D SLAM method based on motion target detection in a dynamic scene in an embodiment of the present application.

[0057] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0058] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0059] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0060] After collecting RGBD images, this application determines the boundaries of dynamic objects in the image based on the target detection network, and removes the ORB feature points located in the boundaries of dynamic objects to obtain static feature points; performs feature matching operations on static feature points based on depth information, determines the correspondence between static feature points and map points, and estimates the camera's posture based on the correspondence and depth information; determines key frames based on the camera's posture and RGBD image pixel-level information; performs global optimization operations and loop detection operations based on key frames to obtain RGBD images of key frames; generates 3D navigation maps based on the RGBD images of key frames and the camera's posture. This achieves accurate positioning of the 3D SLAM system in complex dynamic environments and further improves the consistency between the constructed 3D navigation map and the environment.

[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device that can realize the above functions.

[0062] Based on this, the embodiment of the present application provides a 3D SLAM method based on moving target detection in a dynamic scene, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the 3D SLAM method based on motion target detection in a dynamic scene of the present application.

[0063] In this embodiment, the 3D SLAM method based on moving target detection in a dynamic scene includes steps S10 to S40:

[0064] Step S100, when receiving an instruction to construct a 3D navigation map, collecting an RGBD image, and extracting ORB feature points and depth information of the RGBD image.

[0065] It should be noted that RGBD (Red-Green-Blue-Depth) images refer to images that contain red, green, blue, and depth information. In other words, RGBD images contain the color information of the captured object and the distance information between the captured object and the camera. Therefore, the captured RGBD images can be used for tasks in the field of computer vision such as 3D positioning, 3D modeling, and posture estimation. Usually, RGBD images are acquired by depth cameras.

[0066] In this embodiment, the ORB feature points include image corner points and descriptors.

[0067] Optionally, the step of extracting ORB feature points of the RGBD image includes steps S110 to S140:

[0068] Step S110: constructing an image pyramid based on the RGBD image;

[0069] Step S120: inputting the image pyramid into the FAST algorithm, detecting image corner points on each layer of the image pyramid, and obtaining the image corner points;

[0070] Step S130: Based on the Gaussian blur algorithm, the RGBD image is smoothed to obtain a denoised image;

[0071] Step S140: input the denoised image into the BRIEF algorithm, perform descriptor calculation on the image corner points, and obtain the descriptor.

[0072] In this embodiment, an image pyramid is created to detect image corners on RGBD images at different resolution levels, thereby obtaining image corners at different scales, thereby achieving the purpose of improving the coverage of ORB feature points.

[0073] The FAST algorithm is a fast image corner detection algorithm. The FAST algorithm determines whether it is an image corner by comparing the grayscale value of a pixel with the grayscale values ​​of other pixels in its neighborhood. Applying the FAST algorithm at each layer of the image pyramid can ensure the number of ORB feature points and the uniformity of the distribution of ORB feature points.

[0074] Gaussian blur is an image smoothing method that can remove noise and detail information from an image while retaining the main edge and structure information. Through the smoothing operation, the impact of noise on subsequent descriptor calculations can be reduced, thus improving the accuracy of the descriptor.

[0075] The BRIEF algorithm is a binary descriptor calculation method that generates a binary string by comparing the grayscale values ​​of pixels to describe the image corners. By calculating the descriptor using the BRIEF algorithm, the feature information of the image corners can be described.

[0076] In summary, the purpose of doing this is to improve the coverage, quantity, uniformity and accuracy of ORB feature points, thereby ensuring the accuracy of subsequent feature matching based on ORB feature points.

[0077] Further, step S120 includes steps S121 to S124:

[0078] Step S121: detecting image corner points on each layer of the image pyramid to obtain a first corner point;

[0079] Step S122: performing a uniform distribution operation on the first corner point based on a quadtree algorithm to obtain a second corner point;

[0080] Step S123: performing grayscale centroid calculation on the second corner point to determine the direction of the second corner point;

[0081] Step S124: taking the second corner point with the determined direction as the image corner point.

[0082] In this embodiment, the quadtree algorithm is used to perform a uniform distribution operation on the first corner point, which can ensure that the ORB feature points are evenly distributed in the image space and avoid the ORB feature points from gathering in a specific area, thereby increasing the coverage of the ORB feature points and ensuring the accuracy of subsequent feature matching based on the ORB feature points.

[0083] The grayscale centroid method is performed on the second corner point to determine the direction of the image corner point, so that the ORB feature point has rotation invariance, and the consistency of the descriptor can be maintained even if the image is rotated.

[0084] In summary, the purpose of doing this is to obtain image corner points with directional information, thereby improving the stability and matching accuracy of ORB feature points under different image transformations.

[0085] Step S200: Based on the target detection network, determine the boundary of the dynamic object in the RGBD image, and remove the ORB feature points located in the boundary of the dynamic object to obtain static feature points.

[0086] It should be noted that dynamic objects refer to objects that are displaced in RGBD images, and these dynamic physics will interfere with the SLAM process.

[0087] In this embodiment, the collected RGBD image includes dynamic objects and static objects. Since the dynamic objects will cause erroneous feature matching in the subsequent feature matching process, resulting in serious trajectory drift, it is impossible to build a consistent and accurate environment map. Therefore, it is necessary to remove the ORB feature points located in the boundary of the dynamic objects in the RGBD image so that only static feature points exist in the RGBD image.

[0088] Optionally, step S200 includes steps S210 to S230:

[0089] Step S210: inputting the RGBD image into the target detection network, performing a dynamic object detection operation, and determining the boundary of the dynamic object;

[0090] Step S220: Based on the dynamic object boundary, a classification operation is performed on the ORB feature points to obtain dynamic feature points and the static feature points;

[0091] Step S230: Eliminate the dynamic feature points and retain the static feature points.

[0092] In this embodiment, the boundary of the dynamic object is determined to determine which ORB feature points are classified as dynamic feature points. ORB feature points within the boundary of the dynamic object are dynamic feature points, and ORB feature points outside the boundary of the dynamic object are static feature points.

[0093] Dynamic feature points are eliminated to avoid inconsistencies caused by dynamic feature points in the subsequent positioning and map construction process. Static feature points are part of the environment structure and are retained to provide support for the subsequent establishment of consistent maps and accurate positioning.

[0094] The purpose of this is to identify and remove the ORB feature points of dynamic objects from the RGBD image, ensure that the 3DSLAM algorithm can run stably in a dynamic environment, and improve the accuracy of mapping and positioning.

[0095] Optionally, the target detection network is a lightweight target detection network MobileNetV2-SSD.

[0096] Specifically, the ORB feature points within the boundary of the dynamic object, that is, the dynamic feature points, are represented as , the remaining feature points, i.e., static feature points, are represented as , it can be expressed as:

[0097]

[0098] Among them, (x, y) represents the coordinates of the ORB feature point, and B represents the boundary of the dynamic object.

[0099] Step S300: performing a feature matching operation on the static feature points according to the depth information, determining a correspondence between the static feature points and map points, and estimating a camera posture based on the correspondence and the depth information.

[0100] In this embodiment, after removing the feature points of dynamic objects, a static feature point set is obtained. ,Due to the camera observation and the existence of noise in the dynamic scene, there is a certain error between the ,projection position of the matched map point and the real position of the ,ORB feature point. The camera pose can be optimized by minimizing the ,reprojection error.

[0101] Optionally, the projection function is determined based on the depth information ; Then, based on the projection function , optimize the camera's pose by minimizing the reprojection error and reduce the impact of dynamic objects on the camera's pose estimation. The process of estimating the camera's pose can be expressed as:

[0102]

[0103] in, represents the i-th feature point in the image, Representation and feature points The corresponding map point, is the projection function, is the camera pose.

[0104] Step S400: determining a key frame according to the position and posture of the camera and the pixel-level information of the RGBD image.

[0105] It is understandable that if the camera moves to a large extent, it will make feature point matching difficult, so step S400 is performed to avoid tracking failure or posture drift, thereby improving the quality of key frame selection and further improving the positioning accuracy of the 3D SLAM system in complex dynamic environments.

[0106] In a feasible implementation, step S400 may include steps S411 to S414:

[0107] Step S411: taking the position and posture of the camera as a selection condition and determining the rotation matrix of the current frame relative to the reference key frame based on the rotation matrix between the current frame and the reference key frame;

[0108] Step S412: obtaining the rotation angle of the camera according to the rotation matrix of the current frame relative to the reference key frame, and determining the translation amount of the current frame relative to the reference key frame according to the translation vector of the current frame and the translation vector of the reference key frame;

[0109] Step S413: constructing a camera posture transformation based on the rotation angle of the camera and the translation of the current frame relative to the reference key frame;

[0110] Step S414: When the posture change of the camera is greater than a preset posture change threshold, determining the current frame as the key frame.

[0111] In this embodiment, the camera posture is used as a selection condition, and based on the rotation matrix between the current frame and the reference key frame, the rotation matrix of the current frame relative to the reference key frame is determined, which can be expressed by the formula:

[0112]

[0113] in, Represents the rotation matrix of the current frame relative to the reference keyframe, and Respectively represent the rotation matrices of the current frame and the reference keyframe relative to the world coordinate system.

[0114] After determining the rotation matrix of the current frame relative to the reference keyframe, the rotation angle of the camera can be obtained , specifically, it can be expressed as:

[0115]

[0116] Among them, it should be noted that here It also represents the rotation matrix of the current frame relative to the reference key frame; in addition, is the trace of the matrix, defined as the sum of the diagonal elements of the matrix.

[0117] Then, based on the translation vector of the current frame and the translation vector of the reference key frame, determine the translation amount of the current frame relative to the reference key frame . It can be expressed as:

[0118]

[0119] in, is the translation vector of the current frame, is the translation vector of the reference frame.

[0120] Then, based on the camera's rotation angle and the translation of the current frame relative to the reference keyframe , construct the camera pose transformation . It can be expressed as:

[0121]

[0122] It should be noted that, is the bi-norm of the vector, is the scale factor, is the camera rotation angle weight; in addition, it increases with the increase of the camera rotation angle. If the pose of the current frame changes Greater than the preset pose change threshold , it means that the current camera motion is large, which may lead to difficulty in feature point matching or tracking loss. Therefore, it is necessary to select the current frame as the key frame to avoid tracking failure or posture drift.

[0123] Step S500: Based on the key frame, a global optimization operation and a loop detection operation are performed to obtain an RGBD image of the key frame.

[0124] In this embodiment, the steps of performing the global optimization operation and the loop detection operation based on the key frame may include steps S510 to S540:

[0125] Step S510: acquiring a common view key frame corresponding to each key frame in a key frame database, and determining a bag-of-words vector between each key frame and the corresponding common view key frame;

[0126] Step S520: determining a similarity score between each of the key frames and the corresponding common view key frame according to the bag-of-words vector;

[0127] Step S530: determining a candidate closed-loop frame corresponding to each of the key frames based on the similarity score;

[0128] Step S540: updating the camera pose and the position of the map point of each key frame according to the pose transformation between each key frame and each candidate closed-loop frame.

[0129] Specifically, after determining the key frame, obtain the common view key frame that has enough common map points with the current key frame from the key frame database, and then calculate the bag-of-words vector of the current key frame and its common view frame; then, calculate the similarity score between the current key frame and the common view key frame through the distance of the bag-of-words vector, so as to screen the candidate closed-loop frames. This process can be expressed as:

[0130]

[0131] in, is the similarity score of the two frames, and are the bag-of-words vectors of the current keyframe and its co-viewed keyframe, and are the weights of the i-th word in the two images respectively.

[0132] Then, based on the similarity scores between the common view keyframe and the current keyframe, the keyframe with the highest score is selected as the candidate closed-loop frame. Then, the pose transformation between the current keyframe and the candidate closed-loop frame is calculated to update the pose of the camera of the current keyframe and the position of the map point. In this way, the current keyframe can be aligned with the closed-loop frame to eliminate the accumulated error.

[0133] Finally, all key frames in the system and the camera's position and posture are globally optimized. It can be expressed as:

[0134]

[0135] in, is the position of the camera at each pose point, For any two and Through global optimization, the camera pose and map points can be further optimized to reduce the accumulated drift of the entire system and improve the accuracy and robustness of the system.

[0136] Step S600: Generate a 3D navigation map according to the RGBD image of the key frame and the position and posture of the camera.

[0137] Optionally, step S600 includes steps S610 to S630:

[0138] Step S610: constructing a color 3D dense point cloud map based on the RGBD image of the key frame and the position and posture of the camera;

[0139] Step S620: Generate an octree map according to the color 3D dense point cloud map;

[0140] Step S630: construct the 3D navigation map based on the octree map.

[0141] It should be noted that the octree map recursively divides the color 3D dense point cloud map into 8 hexagrams to construct it. Each node represents a spatial range. When the point cloud density in the space corresponding to a node exceeds a certain threshold, the node will be further divided into 8 child nodes. This process is recursively performed until the preset segmentation depth is reached or the number of points in the node is lower than the set threshold.

[0142] Optionally, based on the RGBD images of the keyframes and the camera pose, the PCL point cloud library is used to construct a colored 3D dense point cloud map of the scene.

[0143] Specifically, the 2D points are converted into 3D point clouds through the RGBD image and depth information of the key frame, which can be expressed as:

[0144]

[0145] in, is the depth value scaling factor, is the camera internal parameter, and are the rotation matrix and translation vector respectively, is the pixel coordinate, is a 3D point in space. Then the real point cloud coordinates are:

[0146]

[0147] in, is the camera internal parameter. Then, an octree map is constructed based on the color 3D dense point cloud map. The leaf nodes of the octree map represent the occupancy status of each element in the form of probability. If a leaf node is observed to be occupied, the probability is constantly approaching 1. If the leaf node is observed to be blank, the probability is constantly approaching 0. In order to ensure that the probability does not exceed the interval [0, 1], the logit function is usually used instead of the probability description:

[0148]

[0149] Where l is the logarithmic probability value, and p is the probability between 0 and 1. When a node is continuously observed to be occupied, l will increase, and when the node is blank, l will decrease. Assuming that a node is n and the observed data is z, then the logarithmic probability value of a node from the beginning to time t is L(n|z1:t), and at time t+1 it is:

[0150]

[0151] The purpose of doing this is to improve the flexibility and convenience of updating maps.

[0152] In the technical solution provided in this embodiment, the target detection network MobileNetV2-SSD is used at the front end of the 3D SLAM system to detect dynamic objects and remove the dynamic feature points generated by them, and the static feature points are used to estimate the camera's posture, thereby improving the positioning accuracy of the SLAM system in dynamic scenes. The key frames are selected in combination with the camera's posture changes and the pixel-level information of the image, which improves the quality of key frame selection and ensures the accuracy of subsequent loop detection and the consistency of map construction. At the same time, based on the RGBD image of the key frame, a 3D navigation map that can be used for mobile robot navigation is constructed in combination with the PCL point cloud library and the octree map.

[0153] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 For step S400, the 3D SLAM method based on moving target detection in a dynamic scene, after step S414, further includes steps S421 to S425:

[0154] Step S421: Based on the key frame, determine the interval corresponding to the key frame;

[0155] Step S422: performing quality judgment on the images in the interval corresponding to the key frames, determining the key frame quality of the images in the interval, and removing key frames whose key frame quality is less than a preset quality threshold;

[0156] Step S423: determining a candidate key frame image interval based on key frames having a quality greater than or equal to the preset quality threshold;

[0157] Step S424: determining an image quality score of the frame according to the frames in the candidate key frame image interval and the RGBD image pixel level information of the frame;

[0158] Step S425: taking a frame having an image quality score greater than or equal to the average value of the selected key frame as the key frame.

[0159] In this embodiment, in order to prevent the loss of important information in the image sequence, after step S414, an interval is determined around the determined key frame, the image quality within this interval is judged again, and the key frames with quality less than a preset quality threshold are eliminated.

[0160] Optionally, after removing key frames whose quality is less than a preset quality threshold and retaining key frames whose quality is greater than or equal to the preset quality threshold, the images between three consecutive retained key frames are defined as a candidate key frame image interval. Then, for all frames in the candidate key frame image interval, their image quality scores are calculated. If the image quality score of a certain frame is greater than or equal to the average image quality score of the three selected key frames, it is used as the last selected key frame.

[0161] It should be noted that this process continues until the entire image sequence is completed.

[0162] As a feasible implementation, first, an image is defined by the Laplacian operator of pixels in the RGBD image The blur score , expressed as:

[0163]

[0164] in, is the pixel coordinate of the RGBD image, Represents pixel A collection of nearby pixels, For the image at pixel points The Laplace value at A higher score indicates that there are many details and edge information in the RGBD image, and the image is clearer. A lower score indicates that the image is relatively blurry and of lower quality.

[0165] Next, the image is defined based on the total brightness of the RGBD image pixels Brightness score , expressed as:

[0166]

[0167] in, Represents each pixel The brightness value, Indicates decentralization, specifically:

[0168]

[0169] in, is the total number of pixels in the image. By decentralizing the pixels, the brightness changes in the local area of ​​the RGBD image can be better represented. Image brightness score The larger the value, the lower the brightness of the frame image and the worse the quality.

[0170] Then the fuzzy score With brightness score Normalize:

[0171]

[0172]

[0173] The image quality score is determined by the normalized value of the blur score and the normalized value of the brightness score. :

[0174]

[0175] For the key frame determined in step S414, if its normalized blur score is less than the preset quality threshold , then the key frame is considered to have low quality and is removed from the key frame sequence. For other key frames that are not removed, if their image quality score is If the image quality score of a frame is greater than or equal to the average of the image quality scores of the three selected key frames, the frame is considered to have high quality and is selected as a key frame.

[0176] It can be understood that, compared with the first implementation, the second implementation of step S400 provided in this embodiment further screens the quality of the key frames, so that the quality of the key frames determined by the second implementation is also higher.

[0177] The above is merely another feasible implementation of step S400 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S400.

[0178] For example, in order to help understand the implementation process of the 3D SLAM method based on moving target detection in a dynamic scene obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flow chart of a 3D SLAM method based on motion target detection in a dynamic scene is provided. Specifically:

[0179] After using the RGBD camera to acquire images of the surrounding environment, the ORB feature points and depth information of the image are first extracted, and an image pyramid is constructed to capture features of different scales. Next, the FAST algorithm is used to detect the corner points of each layer of the image, and the quadtree algorithm is used to evenly distribute the corner points. In order to enhance the rotation invariance of the image, the direction of each corner point is calculated by the grayscale centroid method. Subsequently, the image is Gaussian blurred to reduce the impact of noise, and the BRIEF algorithm is used to calculate the descriptor of each corner point. These descriptors can effectively represent the image information around the corner points, providing an important basis for subsequent image matching and recognition.

[0180] The acquired RGBD image is passed into the target detection network MobileNetV2-SSD to obtain the detection boundary of the dynamic object; the feature points in the RGBD image are classified, and those falling within the boundary of the dynamic object are dynamic feature points, and the remaining feature points are static feature points; the dynamic feature points are eliminated.

[0181] After removing the feature points of dynamic objects, a set of static feature points is obtained. Due to camera observation and the presence of noise in dynamic scenes, there is a certain error between the projection position of the matching map points and the actual position of the static feature points. The camera's pose is optimized by minimizing the reprojection error to reduce the impact of dynamic objects on pose estimation.

[0182] After successfully tracking the camera pose, select the keyframe. Use the camera pose transformation as a new selection condition. At the same time, in order to prevent the loss of keyframe information, the keyframe is further screened in combination with the pixel-level information of the RGBD image. The selected keyframe is used for subsequent loop detection and the construction of the RGBD image of the keyframe.

[0183] Combining the RGBD images and pose information of the key frames, the PCL point cloud library is used to construct a colored 3D dense point cloud map of the scene, and then combined with the octree map to construct a 3D navigation map.

[0184] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the 3D SLAM method based on motion target detection in dynamic scenes of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0185] The present application provides a 3D SLAM device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the 3D SLAM method based on motion target detection in a dynamic scene in the above-mentioned embodiment 1.

[0186] Reference below Figure 4 , which shows a schematic diagram of the structure of a 3D SLAM device suitable for implementing an embodiment of the present application. The 3D SLAM device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The 3D SLAM device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0187] like Figure 4As shown, the 3D SLAM device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the 3D SLAM device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the 3D SLAM device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a 3D SLAM device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or provided alternatively.

[0188] The 3D SLAM device provided by the present application adopts the 3D SLAM method based on motion target detection in the dynamic scene in the above embodiment, which can solve the technical problem that the 3D navigation map further constructed has defects due to the insufficient positioning accuracy of the traditional 3D SLAM system in a complex dynamic environment. Compared with the prior art, the beneficial effects of the 3D SLAM device provided by the present application are the same as the beneficial effects of the 3D SLAM method based on motion target detection in the dynamic scene provided by the above embodiment, and the other technical features in the 3D SLAM device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0189] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0190] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0191] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the 3D SLAM method based on motion target detection in a dynamic scene in the above-mentioned embodiment.

[0192] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0193] The computer-readable storage medium may be included in the 3D SLAM device; or may exist independently without being assembled into the 3D SLAM device.

[0194] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a 3D SLAM device, the 3D SLAM device: when receiving an instruction to build a 3D navigation map, collects an RGBD image and extracts ORB feature points and depth information of the RGBD image; based on a target detection network, determines the boundary of a dynamic object in the RGBD image, and removes the ORB feature points located in the boundary of the dynamic object to obtain static feature points; based on the depth information, performs a feature matching operation on the static feature points, determines the correspondence between the static feature points and the map points, and estimates the camera's pose based on the correspondence and the depth information; determines a key frame based on the camera's pose and the pixel-level information of the RGBD image; based on the key frame, performs a global optimization operation and a loop detection operation to obtain an RGBD image of the key frame; and generates a 3D navigation map based on the RGBD image of the key frame and the camera's pose.

[0195] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0196] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0197] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0198] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned 3D SLAM method based on motion target detection in dynamic scenes, which can solve the technical problem that the 3D navigation map further constructed has defects due to the insufficient positioning accuracy of the traditional 3D SLAM system in complex dynamic environments. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the 3D SLAM method based on motion target detection in dynamic scenes provided by the above-mentioned embodiments, and will not be repeated here.

[0199] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A 3D SLAM method based on moving target detection in dynamic scenes, characterized in that: The method includes: Upon receiving an instruction to construct a 3D navigation map, collecting an RGBD image and extracting ORB feature points and depth information of the RGBD image; Based on the object detection network, determine the boundary of the dynamic object in the RGBD image, and remove the ORB feature points located in the boundary of the dynamic object to obtain static feature points; performing a feature matching operation on the static feature points according to the depth information, determining a correspondence between the static feature points and map points, and estimating a camera pose based on the correspondence and the depth information; Determining a key frame based on the camera's position and pixel-level information of the RGBD image; Based on the key frame, performing a global optimization operation and a loop detection operation to obtain an RGBD image of the key frame; Generate a 3D navigation map based on the RGBD image of the key frame and the position and posture of the camera; The step of determining a key frame according to the camera's posture and the RGBD image pixel-level information includes: Taking the camera's position as a selection condition and based on the rotation matrix between the current frame and the reference key frame, determining the rotation matrix of the current frame relative to the reference key frame; Obtaining a rotation angle of the camera according to a rotation matrix of the current frame relative to the reference key frame, and determining a translation amount of the current frame relative to the reference key frame according to a translation vector of the current frame and a translation vector of the reference key frame; Constructing a camera pose transformation based on the rotation angle of the camera and the translation of the current frame relative to the reference key frame; When the pose change of the camera is greater than a preset pose change threshold, determining the current frame as the key frame; Based on the key frame, determining an interval corresponding to the key frame; Performing quality judgment on images within the interval corresponding to the key frames, determining the key frame quality of the images within the interval, and removing key frames whose key frame quality is less than a preset quality threshold; Determining candidate key frame image intervals based on key frames having a quality greater than or equal to the preset threshold; Determining an image quality score of the frame based on the frames within the candidate key frame image interval and the RGBD image pixel-level information of the frame; Taking a frame with an image quality score greater than or equal to the average value of the selected key frames as the key frames; Among them, the image quality score sc quality The calculation process of (I) is as follows: First, the blur score sc of an image I is defined by the Laplacian operator of the pixels in the RGBD image BL , which can be expressed as: Among them, (i, j) is the pixel coordinate of the RGBD image, Ω(x, y) represents the set of pixels near the pixel point (x, y), is the Laplace value of the image at the pixel point (x, y); Next, the brightness score sc of image I is defined based on the total brightness of the RGBD image pixels BR , which can be expressed as: Among them, L(i,j) represents the brightness value of each pixel (i,j), and zero_center(L(i,j)) represents decentralization, specifically: Where N is the total number of pixels in the image; Then the fuzzy score sc BL With brightness score sc BR Normalize: The image quality score sc is determined by the normalized value of the blur score and the normalized value of the brightness score quality (I): sc quality (I)=norm(sc BL (I))*norm(sc BR (I))。 2. The method according to claim 1, wherein The ORB feature points include image corner points and descriptors, and the step of extracting the ORB feature points of the RGBD image includes: Build an image pyramid based on RGBD images; Inputting the image pyramid into the FAST algorithm, detecting image corner points on each layer of the image pyramid, and obtaining the image corner points; Based on the Gaussian blur algorithm, the RGBD image is smoothed to obtain a noise-reduced image; The denoised image is input into the BRIEF algorithm, and descriptor calculation is performed on the image corner points to obtain the descriptor.

3. The method according to claim 2, wherein The step of inputting the image pyramid into the FAST algorithm and detecting image corner points on each layer of the image pyramid to obtain the image corner points includes: Detecting image corner points on each layer of the image pyramid to obtain a first corner point; Performing a uniform distribution operation on the first corner point based on a quadtree algorithm to obtain a second corner point; Performing a grayscale centroid method calculation on the second corner point to determine a direction of the second corner point; The second corner point with a determined direction is used as the image corner point.

4. The method according to claim 1, wherein The step of determining the boundary of the dynamic object in the RGBD image based on the target detection network and removing the ORB feature points located in the boundary of the dynamic object to obtain static feature points includes: Inputting the RGBD image into the object detection network, performing a dynamic object detection operation, and determining the boundaries of the dynamic object; Based on the dynamic object boundary, performing a classification operation on the ORB feature points to obtain dynamic feature points and the static feature points; The dynamic feature points are eliminated and the static feature points are retained.

5. The method according to claim 1, wherein The step of performing a global optimization operation and a loop detection operation based on the key frame includes: Obtaining a common view key frame corresponding to each key frame in a key frame database, and determining a bag-of-words vector for each key frame and the corresponding common view key frame; Determining a similarity score between each of the keyframes and the corresponding common view keyframe based on the bag-of-words vector; Determining a candidate closed-loop frame corresponding to each key frame based on the similarity score; According to the pose transformation between each key frame and each candidate closed-loop frame, the pose of the camera and the position of the map point of each key frame are updated.

6. The method according to claim 1, wherein The step of generating a 3D navigation map according to the RGBD image of the key frame and the position and posture of the camera includes: Constructing a color 3D dense point cloud map based on the RGBD image of the key frame and the position of the camera; Generate an octree map according to the colored 3D dense point cloud map; The 3D navigation map is constructed based on the octree map.

7. A 3D SLAM device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the 3D SLAM method based on motion target detection in a dynamic scene according to any one of claims 1 to 6.

8. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the 3D SLAM method based on motion target detection in a dynamic scene as described in any one of claims 1 to 6 are implemented.