A dynamic visual SLAM method, device, electronic equipment and storage medium
By acquiring depth color image sequences, extracting feature points and determining scores, and correcting camera pose and feature point coordinates, the problem of localization failure of visual SLAM algorithms under dynamic obstacles is solved, thereby improving robot localization accuracy and mapping accuracy.
Patent Information
- Application Number
- CN202611358448.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-27
AI Technical Summary
Existing visual SLAM algorithms fail to locate objects when faced with dynamic obstacles, leading to disordered inspection routes. Furthermore, dynamic object removal algorithms have high computational costs and cannot guarantee real-time performance. Semantic SLAM methods cannot distinguish whether objects are moving, resulting in decreased accuracy in localization and mapping.
By acquiring a sequence of deep color images, feature points are extracted and semantic, motion, and geometric scores are determined. Based on these scores, motion confidence is determined, camera pose and feature point coordinates are corrected, and an environmental map is constructed.
It enables rapid and accurate identification of dynamic objects, improves the localization and mapping accuracy of mobile robots, solves the computational overhead problem of dynamic object removal algorithms, and distinguishes the motion state of objects in the semantic SLAM method.
Smart Images

Figure CN123181568A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual positioning and mapping technology, and in particular to a dynamic visual SLAM method, apparatus, electronic device and storage medium. Background Technology
[0002] With the rapid development of robotics technology, intelligent inspection robots for power distribution rooms can efficiently solve many pain points of traditional manual inspections. These mobile robots rely on Simultaneous Localization and Mapping (SLAM) algorithms to complete fully automated inspection tasks along a preset trajectory. During operation, the robot uses its onboard sensors to calculate its own pose information in real time and simultaneously construct a complete static environmental map, even without prior environmental mapping data. However, existing visual SLAM algorithms lack dynamic anti-interference capabilities. When the robot encounters dynamic obstacles while inspecting across power distribution rooms, it is prone to positioning failure, leading to disordered inspection routes and inability to complete the inspection task.
[0003] Currently, dynamic object removal algorithms or semantic SLAM methods are often used to implement dynamic visual SLAM. The implementation logic of dynamic object removal algorithms is as follows: first, identify planar regions in each image; then, combine the planar recognition results with reprojection errors to accurately distinguish between static backgrounds and dynamic obstacles. The implementation logic of semantic SLAM methods is: utilize semantic information to assist in localization and construct semantic maps. However, dynamic object removal algorithms have high computational overhead, making it difficult to guarantee real-time performance and easily leading to inference delays. Semantic SLAM methods can only identify object categories and cannot distinguish whether they are moving, thus resulting in decreased accuracy in localization and mapping. Summary of the Invention
[0004] This invention provides a dynamic visual SLAM method, device, electronic device, and storage medium, which solves the problems of high computational overhead and difficulty in ensuring real-time performance of dynamic object removal algorithms, and the fact that semantic SLAM methods can only identify object categories but cannot distinguish whether they are moving, thus leading to a decrease in localization and mapping accuracy. It can quickly and accurately identify dynamic objects, thereby improving the localization accuracy and mapping accuracy of mobile robots.
[0005] In a first aspect, embodiments of the present invention provide a dynamic visual SLAM method, comprising: A sequential sequence of depth-color images is captured using a depth camera mounted on a mobile robot. Feature points are extracted from the depth color image sequence, and semantic, motion, and geometric scores are determined for each feature point. Based on the semantic score, motion score and geometric score corresponding to each feature point, the motion confidence corresponding to each feature point is determined. Based on the motion confidence corresponding to each feature point, the camera pose of the depth camera is corrected, as well as the feature point coordinates corresponding to each feature point, to obtain the corrected camera pose and the corrected feature point coordinates. Based on the corrected camera pose and the corrected feature point coordinates, the original position of the mobile robot is corrected to obtain the corrected position of the mobile robot, and an environmental map is constructed based on the corrected position.
[0006] Secondly, embodiments of the present invention also provide a dynamic visual SLAM device, comprising: The image acquisition module is used to acquire a time-series continuous sequence of depth color images using a depth camera mounted on a mobile robot. The scoring determination module is used to extract feature points from the depth color image sequence and determine the semantic score, motion score and geometric score corresponding to each feature point. The confidence determination module is used to determine the movement confidence corresponding to each feature point based on the semantic score, motion score and geometric score corresponding to each feature point respectively; The pose correction module is used to correct the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point based on the motion confidence corresponding to each feature point, so as to obtain the corrected camera pose and the corrected feature point coordinates. The environment map construction module is used to correct the original position of the mobile robot based on the corrected camera pose and the corrected feature point coordinates, obtain the corrected position of the mobile robot, and construct an environment map based on the corrected position.
[0007] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the dynamic visual SLAM method provided in any embodiment of the present invention.
[0008] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the dynamic visual SLAM method of any embodiment of the present invention.
[0009] The technical solution of this invention solves the problems of high computational overhead and difficulty in ensuring real-time performance in dynamic object removal algorithms, and the semantic score, motion score, and geometric score corresponding to each feature point, by acquiring a time-series continuous depth color image sequence; extracting feature points from the depth color image sequence and determining the semantic score, motion score, and geometric score corresponding to each feature point; determining the motion confidence score corresponding to each feature point based on the semantic score, motion score, and geometric score corresponding to each feature point; correcting the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point based on the motion confidence score corresponding to each feature point, thus obtaining the corrected camera pose and the corrected feature point coordinates; correcting the original position of the mobile robot based on the corrected camera pose and the corrected feature point coordinates, thus obtaining the corrected position of the mobile robot, and constructing an environmental map based on the corrected position. This solution addresses the problems of high computational overhead and difficulty in ensuring real-time performance in dynamic object removal algorithms, and the problems of semantic SLAM methods being able to only identify object categories but unable to distinguish whether they are moving, thus leading to a decrease in localization and mapping accuracy. It can quickly and accurately identify dynamic objects, thereby improving the localization accuracy and mapping accuracy of the mobile robot.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of a dynamic visual SLAM method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of another dynamic visual SLAM method provided according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a dynamic visual SLAM device according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0015] Example 1 Figure 1 This is a flowchart of a dynamic visual SLAM method according to Embodiment 1 of the present invention. This embodiment is applicable to the case of performing dynamic visual SLAM on mobile robots. The method can be executed by a dynamic visual SLAM device, which can be implemented in hardware and / or software and can be configured in an electronic device such as a computer.
[0016] like Figure 1 As shown, this embodiment discloses a dynamic visual SLAM method, including: S110: Acquire a time-series sequence of continuous depth color images using a depth camera mounted on a mobile robot.
[0017] In this embodiment, a mobile robot can be understood as a robot capable of autonomously moving within a workspace and completing preset tasks. A depth color image sequence can be understood as a set of color depth images continuously acquired by a depth camera at a fixed frame rate.
[0018] S120. Extract feature points from the depth color image sequence and determine the semantic score, motion score, and geometric score corresponding to each feature point.
[0019] Specifically, in this step, the semantic comprehensive confidence score of each pixel in the depth color image sequence can be determined, and feature points in the depth color image sequence can be extracted based on the semantic comprehensive confidence score of each pixel. Then, the semantic score corresponding to each feature point can be determined based on the semantic comprehensive confidence score of each pixel. The motion score of each feature point is determined based on the horizontal and vertical pixel displacements of each feature point in multiple sets of adjacent depth color images. The geometric score corresponding to each feature point is determined based on the depth change corresponding to each feature point.
[0020] S130. Based on the semantic score, motion score, and geometric score corresponding to each feature point, determine the motion confidence corresponding to each feature point.
[0021] In this step, specifically, the semantic score, motion score, and geometric score corresponding to each feature point can be weighted and summed to obtain the motion confidence corresponding to each feature point.
[0022] For example, the moving confidence level corresponding to each feature point can be determined using the following specific calculation formula: .
[0023] in, For the first The movement confidence of each feature point For the first The pixel coordinates of each feature point For the first Semantic score of each feature point The semantic weight coefficients corresponding to the semantic scores. For the first Motion score of each feature point The exercise weighting coefficients corresponding to the exercise score. For the first Geometric score of each feature point The geometric weighting coefficients corresponding to the geometric score. .
[0024] It is worth noting that the lower the probability that the object to which the feature point belongs is moving, the smaller the motion weight coefficient, and the larger the semantic weight coefficient and geometric weight coefficient.
[0025] S140. Based on the motion confidence corresponding to each feature point, correct the camera pose of the depth camera and the feature point coordinates corresponding to each feature point to obtain the corrected camera pose and the corrected feature point coordinates.
[0026] In this step, specifically, the localization correction weights corresponding to each feature point can be determined based on the motion confidence corresponding to each feature point. Then, based on the localization correction weights corresponding to each feature point, the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point can be corrected to obtain the corrected camera pose and the corrected feature point coordinates.
[0027] S150. Based on the corrected camera pose and the corrected feature point coordinates, correct the original position of the mobile robot to obtain the corrected position of the mobile robot, and construct an environmental map based on the corrected position.
[0028] The technical solution of this embodiment uses a depth camera mounted on a mobile robot to acquire a temporally continuous sequence of depth color images; extracts feature points from the depth color image sequence and determines the semantic score, motion score, and geometric score corresponding to each feature point; based on the semantic score, motion score, and geometric score corresponding to each feature point, determines the motion confidence corresponding to each feature point; based on the motion confidence corresponding to each feature point, corrects the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point, obtaining the corrected camera pose and corrected feature point coordinates; based on the corrected camera pose and corrected feature point coordinates, corrects the original position of the mobile robot, obtaining the corrected position of the mobile robot, and constructs an environmental map based on the corrected position. This technical means solves the problems of high computational overhead and difficulty in ensuring real-time performance in dynamic object removal algorithms, and the fact that semantic SLAM methods can only identify object categories but cannot distinguish whether they are moving, thus leading to a decrease in localization and mapping accuracy. It can quickly and accurately identify dynamic objects, thereby improving the localization accuracy and mapping accuracy of the mobile robot.
[0029] Example 2 Figure 2 This is a flowchart of another dynamic visual SLAM method provided according to Embodiment 2 of the present invention. This embodiment is a further optimization and extension based on the above embodiments and can be combined with various optional technical solutions in the above embodiments.
[0030] like Figure 2 As shown, this embodiment discloses a dynamic visual SLAM method, including: S210: Acquire a time-series sequence of depth-color images using a depth camera mounted on a mobile robot.
[0031] S220. Using a pre-constructed semantic segmentation network, determine the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence, and output a semantic segmentation image sequence based on the depth color image sequence carrying the pixel semantic comprehensive confidence level.
[0032] In this embodiment, the semantic segmentation network includes a backbone network, a multi-class feature segmentation module, and a decoder. The backbone network includes a pixel encoding module and a residual double pyramid network. The residual double pyramid network can be used to extract multiple features from the regions of dynamic objects. The multi-class feature segmentation module can be used to improve the pixel weights of potential dynamic objects and enhance global semantic information.
[0033] Optionally, a pre-constructed semantic segmentation network is used to determine the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence. This includes: reading the depth color image sequence through a pixel encoding module; downsampling each depth color image in the depth color image sequence through a residual dual pyramid network to obtain a downsampled image sequence corresponding to each depth color image, and fusing the downsampled image sequences corresponding to each depth color image to obtain a feature information map corresponding to each depth color image; performing feature enhancement on each feature information map through a multi-class feature segmentation module to obtain a feature enhancement map sequence; and determining the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence based on the feature enhancement map sequence using a decoder. The decoder includes a multilayer perceptron shared head.
[0034] Specifically, the implementation logic of the residual dual pyramid network is as follows: A single-frame depth color image is extracted layer by layer to obtain multi-layer feature maps rich in texture and boundary information. Then, each layer of feature maps is downsampled to obtain downsampled images corresponding to each layer, i.e., a sequence of downsampled images corresponding to the single-frame depth color image. Finally, the downsampled image sequences corresponding to each depth color image are fused to obtain a feature information map corresponding to each depth color image. For example, suppose the multi-layer feature map corresponding to the single-frame depth color image includes... , , and Then they can be respectively for , , and Perform downsampling processing to obtain a downsampled image corresponding to the depth color image of that frame. , , and Then, one can... , , and The feature information map corresponding to the depth color image of that frame is obtained by fusion. .
[0035] The implementation logic of the multi-class feature segmentation module is as follows: perform multi-dimensional feature enhancement processing on the feature information maps corresponding to each depth color image to obtain the feature enhancement maps corresponding to each depth color image, that is, the feature enhancement map sequence.
[0036] The decoder's implementation logic is as follows: The feature enhancement map sequence is fed into the classification head and the masking head via a multilayer perceptron shared head. Then, the classification head calculates the probability value of each pixel in the feature enhancement map sequence corresponding to all target categories, outputting the category confidence score, which characterizes the likelihood of each pixel belonging to different object categories. The masking head generates a binary mask to delineate the boundaries of various objects, obtaining complete pixel contours and accurately dividing the pixel regions where each object is located. Finally, based on the category confidence score and the binary mask, the pixel semantic comprehensive confidence score corresponding to each pixel in the depth color image sequence can be determined.
[0037] The advantage of this setup is that by adding a residual double pyramid network and a semantic segmentation network with multiple feature segmentation modules, the output semantic segmentation image sequence is enhanced, the pixel weights of moving targets are increased, global semantic information is improved, the impact of noise interference is reduced, and the situation of segmentation blurring or segmentation errors caused by rapid object movement is avoided, thus ensuring the segmentation accuracy and reliability of the semantic segmentation image sequence.
[0038] S230. Determine candidate dynamic targets in the semantic segmentation image sequence, and based on the candidate dynamic targets, determine the region of interest in the semantic segmentation image sequence, and extract feature points from the region of interest.
[0039] In this embodiment, a candidate dynamic target can be understood as a set of pixel regions that have the potential to move but have not yet completed the verification of the authenticity of the movement, such as pedestrians, electric vehicles and bicycles and other easily moving targets.
[0040] In this step, specifically, to expand the feature point selection region, mathematical morphological dilation can be performed on the candidate dynamic target to obtain the region of interest (ROI) in the semantic segmentation image sequence. Then, all pixels in the ROI can be used as feature points, or a subset of pixels can be randomly selected from the ROI as feature points.
[0041] S240. Obtain the pixel semantic comprehensive confidence score corresponding to each feature point from the semantic segmentation image sequence. Based on the pixel semantic comprehensive confidence score corresponding to each feature point, determine the motion prior probability corresponding to each feature point. Based on the motion prior probability corresponding to each feature point, determine the semantic score corresponding to each feature point.
[0042] In this step, specifically, the motion prior probability corresponding to each feature point can be determined based on the pixel semantic comprehensive confidence and mobility prior probability. Simultaneously, the target category corresponding to each feature point is determined based on the category confidence, and the category weight coefficient corresponding to each feature point is determined based on the target category. Then, the semantic score corresponding to each feature point can be determined based on the motion prior probability and category weight coefficient.
[0043] In one specific implementation, the prior motion probability corresponding to each feature point can be determined using the following specific calculation formula: .
[0044] in, For the first The prior probability of motion for each feature point For the first The pixel coordinates of each feature point For the first The feature point at the th ... Frame belongs to category The overall confidence level of pixel semantics, For category The prior probability of mobility, This represents the total number of categories.
[0045] Then, the semantic score corresponding to each feature point can be determined using the following specific calculation formula: .
[0046] in, For the first Semantic score of each feature point For the first The prior probability of motion for each feature point For the first The class weight coefficients of each feature point.
[0047] S250. Based on the depth color image sequence, determine the horizontal and vertical pixel displacements of each feature point in multiple sets of adjacent depth color images, and based on the horizontal and vertical pixel displacements corresponding to each feature point, determine the single-frame motion consistency score and multi-frame motion consistency score corresponding to each feature point.
[0048] Specifically, in this step, a single-frame motion consistency score for a feature point can be determined based on its lateral and vertical pixel displacements in specific adjacent depth color images. Furthermore, a multi-frame motion consistency score can be determined based on the lateral and vertical pixel displacements of the feature point in multiple sets of adjacent depth color images. The specific adjacent depth color images can be selected based on user needs and historical experience; for example, a set of adjacent depth color images acquired at the midpoint of a time-series window can be used as the specific adjacent depth color images.
[0049] The lateral and vertical pixel displacements of each feature point in multiple sets of adjacent depth color images can be solved by minimizing the following error function: .
[0050] in, Represents the total residual energy; The index represents the item index, indicating the number of items. One feature point; Indicates the first Preset weight coefficients for each feature point; Indicates the depth of the color image in The horizontal gradient at that location; Indicates the depth of the color image in Vertical gradient at the location; Indicates the depth of the color image in The time gradient at that point; Indicates the first Spatial coordinates of a feature point; Indicates the first lateral pixel displacement of each feature point; Indicates the first Vertical pixel displacement of each feature point.
[0051] Then, the single-frame motion consistency score corresponding to each feature point can be determined using the following specific calculation formula: .
[0052] in, Indicates the first Single-frame motion consistency score for each feature point; Indicates the relationship with the first The slope parameters corresponding to each feature point; Indicates the first The magnitude of the optical flow vector at each feature point ; This represents a predefined threshold value for optical flow amplitude.
[0053] The multi-frame motion consistency score corresponding to each feature point is determined using the following specific calculation formula: .
[0054] in, Indicates the first Multi-frame motion consistency scoring for each feature point; This represents the length of the time window for acquiring a sequence of depth-color images using a depth camera (i.e., the number of color depth image frames acquired). Indicates from the start frame To the Frame by frame accumulation; Indicates the first The feature point at the th ... Frame and the The single-frame motion consistency value of a frame.
[0055] S260. Based on the single-frame motion consistency score and multi-frame motion consistency score corresponding to each feature point, determine the final motion consistency score corresponding to each feature point, and based on the final motion consistency score corresponding to each feature point, determine the motion score corresponding to each feature point.
[0056] In this step, specifically, the final motion consistency score corresponding to each feature point can be determined using the following specific calculation formula: .
[0057] in, Indicates the first The final motion consistency score for each feature point Indicates the first Single-frame motion consistency score for each feature point Indicates the first Multi-frame motion consistency scoring for feature points This represents the predefined single-frame weighting coefficients. This represents a predefined time-series weighting coefficient.
[0058] The motion score corresponding to each feature point is determined using the following specific calculation formula: .
[0059] in, Indicates the first Motion score of each feature point Indicates the first The final motion consistency score for each feature point This represents a predefined normalization coefficient.
[0060] The advantage of this setup is that it performs light-sensitive motion detection only on regions of interest and outputs motion scores, which reduces computational overhead while ensuring motion detection accuracy.
[0061] S270. Based on the depth color image sequence, determine the depth change corresponding to each feature point. Based on the depth change corresponding to each feature point, determine the depth change standard deviation and depth change threshold corresponding to each feature point. Based on the depth change, depth change standard deviation and depth change threshold corresponding to each feature point, determine the geometric score corresponding to each feature point.
[0062] Specifically, in this step, it can be determined whether the depth change of each feature point is greater than a depth change threshold. Feature points with depth changes greater than the depth change threshold are classified as first-class depth change feature points, and feature points with depth changes less than or equal to the depth change threshold are classified as second-class depth change feature points. Then, based on the depth change, depth change standard deviation, and depth change threshold corresponding to the first-class depth change feature points, a geometric score can be determined, and the geometric score of the second-class depth change feature points can be set to a predetermined geometric score, such as 0.1.
[0063] For example, the geometric score corresponding to each feature point can be determined using the following specific calculation formula: .
[0064] in, Indicates the first Geometric score of each feature point; Indicates the first The feature point at the th ... The amount of depth change in a frame. , Indicates the first The feature point at the th ... The depth value of the frame. Indicates the first The feature point at the th ... The depth value of the frame; Indicates the standard deviation of depth variation; This represents the depth change threshold.
[0065] S280. Based on the semantic score, motion score, and geometric score corresponding to each feature point, determine the motion confidence corresponding to each feature point.
[0066] By taking into full account semantic scoring, motion scoring, and geometric scoring, accurate identification of dynamic objects can be achieved.
[0067] S290. Based on the motion confidence corresponding to each feature point, correct the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point to obtain the corrected camera pose and the corrected feature point coordinates.
[0068] Optionally, based on the motion confidence corresponding to each feature point, the camera pose of the depth camera and the feature point coordinates corresponding to each feature point are corrected to obtain the corrected camera pose and the corrected feature point coordinates. This includes: determining the localization correction weights corresponding to each feature point based on the motion confidence corresponding to each feature point; and using the Gauss-Newton method, based on the localization correction weights corresponding to each feature point, correcting the camera pose of the depth camera and the feature point coordinates corresponding to each feature point to obtain the corrected camera pose and the corrected feature point coordinates.
[0069] Specifically, the motion confidence scores corresponding to each feature point can be temporally smoothed to obtain temporally smoothed motion confidence scores. Then, based on the temporally smoothed motion confidence scores and target category corresponding to each feature point, the localization correction weights corresponding to each feature point can be determined. Finally, the Gauss-Newton method can be used to correct the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point, based on the localization correction weights corresponding to each feature point, to obtain the corrected camera pose and corrected feature point coordinates.
[0070] For example, the time-smoothed moving confidence level corresponding to each feature point can be determined using the following specific calculation formula: .
[0071] in, Indicates the first The feature point at the th ... Frame shift confidence after temporal smoothing Indicates the first The movement confidence of each feature point Indicates the first The feature point at the th ... Frame shift confidence after temporal smoothing This represents the predefined time-series smoothing weight coefficients. It is worth noting that, in order to efficiently calculate the... The confidence level of the moving feature point after temporal smoothing in the initial frame can be used to determine the confidence level of the first feature point. The confidence level of the movement of each feature point after temporal smoothing in the initial frame is set to... .
[0072] Then, the localization correction weights corresponding to each feature point can be determined using the following specific calculation formula: .
[0073] Among them, when hour ,when hour ,when hour ; Representing feature points In the static area, Representing feature points In the dynamic region, Representing feature points It is in a blurry area.
[0074] Then, the following least-squares optimization objective function can be constructed: .
[0075] in, Represents the total residual energy; This indicates the total number of feature points selected; Indicates the first Localization correction weights for each feature point; This represents a predefined projection function; Indicates the first Camera pose of 1 feature point; Indicates the first The coordinates of the feature point of the i-th feature point are, which are the coordinates of the i-th feature point. The three-dimensional coordinates of each feature point in the map coordinate system; Indicates the first Two-dimensional observation pixel coordinates of each feature point.
[0076] Based on the least squares optimization objective function, construct This global Jacobian matrix is constructed based on the localization correction weights corresponding to each feature point. This is a diagonal weight matrix. Among them, This indicates a position that is comparable to, This indicates a point about Jacobi. Indicates the first to the last The localization correction weights corresponding to each feature point. This represents the total number of feature points selected.
[0077] Finally, it can be built This Gauss-Newton equation is solved to obtain the optimized increment vector. .in, Represents the global Jacobian matrix; Represents the transpose of the global Jacobian matrix; Represents the diagonal weight matrix; , Indicates the first Camera pose correction for each feature point Indicates the first Coordinate correction amount for each feature point; This represents the total residual energy.
[0078] After obtaining the optimized increment vector Then, a formula can be used. This determines the corrected camera pose and the corrected feature point coordinates. Including the first Uncorrected camera pose and feature point coordinates for each feature point. Including the first Corrected camera pose and corrected feature point coordinates for each feature point.
[0079] S2100: Based on the corrected camera pose and the corrected feature point coordinates, correct the original position of the mobile robot to obtain the corrected position of the mobile robot, and construct an environmental map based on the corrected position.
[0080] The technical solution of this embodiment, through a pre-constructed semantic segmentation network, determines the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence, and outputs a semantic segmentation image sequence based on the depth color image sequence carrying the pixel semantic comprehensive confidence level. It then identifies candidate dynamic targets in the semantic segmentation image sequence, and based on these targets, determines the region of interest (ROI) within the sequence, extracting feature points from the ROI. This expands the feature point selection area, prevents tracking loss, and thus ensures the positioning accuracy and mapping accuracy of the mobile robot. Secondly, based on the semantic score, motion score, and geometric score corresponding to each feature point, it determines the motion confidence level corresponding to each feature point. Based on this motion confidence level, it corrects the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point, obtaining the corrected camera pose and corrected feature point coordinates. This approach saves overhead, ensures real-time performance, improves the positioning accuracy of the mobile robot, and guarantees the mapping accuracy of the mobile robot.
[0081] Example 3 Figure 3 This is a schematic diagram of a dynamic visual SLAM device according to Embodiment 3 of the present invention. This embodiment is applicable to the situation of performing dynamic visual SLAM on mobile robots. The dynamic visual SLAM device can be implemented in hardware and / or software and can be configured in electronic devices such as computers.
[0082] like Figure 3 As shown, the dynamic visual SLAM device disclosed in this embodiment includes: Image acquisition module 31 is used to acquire a time-series continuous sequence of depth color images using a depth camera mounted on a mobile robot; The scoring determination module 32 is used to extract feature points in the depth color image sequence and determine the semantic score, motion score and geometric score corresponding to each feature point respectively. The confidence determination module 33 is used to determine the movement confidence corresponding to each feature point based on the semantic score, motion score and geometric score corresponding to each feature point respectively; The pose correction module 34 is used to correct the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point based on the motion confidence corresponding to each feature point, so as to obtain the corrected camera pose and the corrected feature point coordinates. The environment map construction module 35 is used to correct the original position of the mobile robot based on the corrected camera pose and the corrected feature point coordinates, obtain the corrected position of the mobile robot, and construct an environment map based on the corrected position.
[0083] The technical solution in this embodiment, through the cooperation of the image acquisition module 31, the scoring determination module 32, the confidence determination module 33, the pose correction module 34, and the environment map construction module 35, solves the problems of high computational overhead and difficulty in ensuring real-time performance in dynamic object removal algorithms, and the semantic SLAM method's inability to distinguish whether an object is moving, which leads to a decrease in localization and mapping accuracy. It can quickly and accurately identify dynamic objects, thereby improving the localization accuracy and mapping accuracy of mobile robots.
[0084] Optionally, the scoring determination module 32 includes: The feature point extraction unit is used to determine the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence through a pre-constructed semantic segmentation network, and output a semantic segmentation image sequence based on the depth color image sequence carrying the pixel semantic comprehensive confidence level; determine candidate dynamic targets in the semantic segmentation image sequence; determine the region of interest in the semantic segmentation image sequence based on the candidate dynamic targets, and extract feature points from the region of interest; The semantic scoring determination unit is used to obtain the pixel semantic comprehensive confidence of each feature point from the semantic segmentation image sequence, and determine the motion prior probability of each feature point based on the pixel semantic comprehensive confidence of each feature point; and determine the semantic score of each feature point based on the motion prior probability of each feature point. The motion scoring determination unit is used to determine the lateral and vertical pixel displacements of each feature point in multiple sets of adjacent depth color images based on the depth color image sequence; to determine the single-frame motion consistency score and multi-frame motion consistency score corresponding to each feature point based on the lateral and vertical pixel displacements corresponding to each feature point; to determine the final motion consistency score corresponding to each feature point based on the single-frame and multi-frame motion consistency scores corresponding to each feature point; and to determine the motion score corresponding to each feature point based on the final motion consistency score corresponding to each feature point. The geometric score determination unit is used to determine the depth change corresponding to each feature point based on the depth color image sequence; determine the depth change standard deviation and depth change threshold corresponding to each feature point based on the depth change corresponding to each feature point; and determine the geometric score corresponding to each feature point based on the depth change, depth change standard deviation and depth change threshold corresponding to each feature point.
[0085] Optionally, when the semantic segmentation network includes a backbone network, a multi-class feature segmentation module, and a decoder, and the backbone network includes a pixel encoding module and a residual double pyramid network, the feature point extraction unit is specifically used for: reading the depth color image sequence through the pixel encoding module; performing downsampling processing on each depth color image in the depth color image sequence through the residual double pyramid network to obtain downsampled image sequences corresponding to each depth color image, and fusing the downsampled image sequences corresponding to each depth color image to obtain feature information maps corresponding to each depth color image; performing feature enhancement on each feature information map through the multi-class feature segmentation module to obtain a feature enhancement map sequence; and determining the pixel semantic comprehensive confidence level corresponding to each pixel point in the depth color image sequence based on the feature enhancement map sequence through the decoder.
[0086] Optionally, the pose correction module 34 is specifically used to: determine the positioning correction weights corresponding to each feature point based on the movement confidence corresponding to each feature point; and use the Gauss-Newton method to correct the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point based on the positioning correction weights corresponding to each feature point, so as to obtain the corrected camera pose and the corrected feature point coordinates.
[0087] The dynamic visual SLAM device provided in this embodiment of the invention can execute the dynamic visual SLAM method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution. Content not described in detail in this embodiment can be referred to the description in any method embodiment of this application.
[0088] Example 4 Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of the present invention is shown. For example... Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0089] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0090] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as dynamic visual SLAM methods.
[0091] In some embodiments, the dynamic visual SLAM method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the dynamic visual SLAM method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the dynamic visual SLAM method by any other suitable means (e.g., by means of firmware).
[0092] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0093] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0094] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0095] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0096] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0097] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0098] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0099] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A dynamic visual SLAM method, characterized in that, The method includes: A sequential sequence of depth-color images is captured using a depth camera mounted on a mobile robot. Feature points are extracted from the depth color image sequence, and semantic score, motion score and geometric score corresponding to each feature point are determined respectively; Based on the semantic score, motion score and geometric score corresponding to each feature point, the motion confidence corresponding to each feature point is determined. Based on the motion confidence corresponding to each of the aforementioned feature points, the camera pose of the depth camera and the coordinates of the feature points corresponding to each of the aforementioned feature points are corrected to obtain the corrected camera pose and the corrected feature point coordinates. Based on the corrected camera pose and the corrected feature point coordinates, the original position of the mobile robot is corrected to obtain the corrected position of the mobile robot, and an environmental map is constructed based on the corrected position.
2. The method according to claim 1, characterized in that, Extracting feature points from the depth color image sequence includes: By using a pre-constructed semantic segmentation network, the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence is determined, and a semantic segmentation image sequence is output based on the depth color image sequence carrying the pixel semantic comprehensive confidence level. Identify candidate dynamic targets in the semantically segmented image sequence; Based on the candidate dynamic targets, the regions of interest (ROIs) in the semantic segmentation image sequence are determined, and feature points are extracted from the ROIs.
3. The method according to claim 2, characterized in that, The semantic segmentation network includes a backbone network, a multi-class feature segmentation module, and a decoder. The backbone network includes a pixel encoding module and a residual double pyramid network. Using a pre-constructed semantic segmentation network, the comprehensive semantic confidence of each pixel in the depth color image sequence is determined, including: The depth color image sequence is read through the pixel encoding module; The residual dual pyramid network is used to downsample each deep color image in the deep color image sequence to obtain a downsampled image sequence corresponding to each deep color image. The downsampled image sequences corresponding to each deep color image are then fused to obtain a feature information map corresponding to each deep color image. The feature enhancement is performed on each feature information map by the multi-class feature segmentation module to obtain a feature enhancement map sequence; The decoder determines the pixel semantic comprehensive confidence level corresponding to each pixel in the depth color image sequence based on the feature enhancement map sequence.
4. The method according to claim 2, characterized in that, Determining the semantic score corresponding to each of the aforementioned feature points includes: Obtain the pixel semantic comprehensive confidence score corresponding to each feature point from the semantic segmentation image sequence, and determine the motion prior probability corresponding to each feature point based on the pixel semantic comprehensive confidence score corresponding to each feature point. Based on the motion prior probabilities corresponding to each feature point, a semantic score corresponding to each feature point is determined.
5. The method according to claim 1, characterized in that, Determining the motion score corresponding to each of the aforementioned feature points includes: Based on the depth color image sequence, determine the lateral and vertical pixel displacements of each feature point in multiple sets of adjacent depth color images; Based on the horizontal and vertical pixel displacements corresponding to each feature point, the single-frame motion consistency score and multi-frame motion consistency score corresponding to each feature point are determined. Based on the single-frame motion consistency score and multi-frame motion consistency score corresponding to each of the aforementioned feature points, the final motion consistency score corresponding to each of the aforementioned feature points is determined. Based on the final motion consistency score corresponding to each of the aforementioned feature points, a motion score corresponding to each of the aforementioned feature points is determined.
6. The method according to claim 1, characterized in that, Determining the geometric score corresponding to each of the aforementioned feature points includes: Based on the depth color image sequence, determine the depth change corresponding to each of the feature points; Based on the depth change corresponding to each of the aforementioned feature points, the standard deviation of the depth change and the depth change threshold corresponding to each of the aforementioned feature points are determined. Based on the depth change, depth change standard deviation, and depth change threshold corresponding to each feature point, a geometric score is determined for each feature point.
7. The method according to claim 1, characterized in that, Based on the motion confidence corresponding to each of the aforementioned feature points, the camera pose of the depth camera is corrected, along with the coordinates of the feature points corresponding to each of the aforementioned feature points, to obtain the corrected camera pose and corrected feature point coordinates, including: Based on the movement confidence corresponding to each of the aforementioned feature points, the positioning correction weights corresponding to each of the aforementioned feature points are determined. Using the Gauss-Newton method, the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point are corrected based on the localization correction weights corresponding to each feature point, so as to obtain the corrected camera pose and the corrected feature point coordinates.
8. A dynamic visual SLAM device, characterized in that, The device includes: The image acquisition module is used to acquire a time-series continuous sequence of depth color images using a depth camera mounted on a mobile robot. The scoring determination module is used to extract feature points from the depth color image sequence and determine the semantic score, motion score and geometric score corresponding to each feature point. The confidence determination module is used to determine the movement confidence corresponding to each of the aforementioned feature points based on the semantic score, motion score, and geometric score corresponding to each of the aforementioned feature points respectively; The pose correction module is used to correct the camera pose of the depth camera and the coordinates of the feature points corresponding to each feature point based on the motion confidence corresponding to each feature point, so as to obtain the corrected camera pose and the corrected feature point coordinates. An environment map construction module is used to correct the original position of the mobile robot based on the corrected camera pose and the corrected feature point coordinates, obtain the corrected position of the mobile robot, and construct an environment map based on the corrected position.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the dynamic visual SLAM method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the dynamic visual SLAM method according to any one of claims 1-7.
