rgbdvslam
Feature-based visual simultaneous localization and mapping (vSLAM) and visual-inertial sensor fusion with RGB-D camera
Since R2025a
Description
Use the rgbdvslam
object to perform visual simultaneous
localization and mapping (vSLAM) with RGB-D camera data. RGB-D vSLAM combines depth
information from sensors, such as RGB-D cameras or depth sensors, with RGB images to
simultaneously estimate the camera pose and create a map of the environment. To learn more
about visual SLAM, see Implement Visual SLAM in MATLAB (Computer Vision Toolbox).
The rgbdvslam
object extracts Oriented FAST and Rotated BRIEF (ORB)
features from incrementally read images, and then tracks those features to estimate camera
poses, identify key frames, and reconstruct a 3-D environment. The vSLAM algorithm also
searches for loop closures using the bag-of-features algorithm, and then optimizes the camera
poses using pose graph optimization. You can enhance the accuracy and robustness of the SLAM
by integrating this object with IMU data to perform visual-inertial sensor fusion.
Creation
Syntax
Description
creates an RGB-D visual SLAM object, vslam
= rgbdvslam(intrinsics
)vslam
, by using the specified
camera intrinsic parameters.
The rgbdvslam
object assumes the color and the depth images have
been preregistered with one-to-one correspondence.
The object represents 3-D map points and camera poses in world coordinates, and
assumes the camera pose of the first key frame is an identity rigidtform3d
(Image Processing Toolbox)
transform.
Note
The rgbdvslam
object runs on multiple threads internally, which can delay the processing of an image frame added by using the addFrame
function. Additionally, the object running on multiple threads means the current frame the object is processing can be different than the recently added frame.
specifies the depth correction factor of the RGB-D camera, which the camera manufacturer
usually provides. Use this syntax when the depth scale factor for the sensor is not equal
to vslam
= rgbdvslam(intrinsics
,depthScaleFactor
)1
.
performs RGB-D visual-inertial SLAM based on the specified
vslam
= rgbdvslam(___,imuParameters
)imuParameters
.
sets properties using one or more name-value arguments. For example,
vslam
= rgbdvslam(intrinsics
,PropertyName=Value
)MaxNumPoints=850
sets the maximum number of ORB feature points to
extract from each image to 850
.
Input Arguments
Properties
Object Functions
addFrame | Add pair of color and depth images to RGB-D visual SLAM object |
hasNewKeyFrame | Check if new key frame added in RGB-D visual SLAM object |
checkStatus | Check status of visual RGB-D SLAM object |
isDone | End-of-processing status for RGB-D visual SLAM object |
mapPoints | Build 3-D map of world points from RGB-D vSLAM object |
poses | Absolute camera poses of RGB-D vSLAM key frames |
plot | Plot 3-D map points and estimated camera trajectory in RGB-D visual SLAM |
reset | Reset RGB-D visual SLAM object |
Examples
References
[1] Mur-Artal, Raul, J. M. M. Montiel, and Juan D. Tardos. “ORB-SLAM: A Versatile and Accurate Monocular SLAM System.” IEEE Transactions on Robotics 31, no. 5 (October 2015): 1147–63. https://doi.org/10.1109/TRO.2015.2463671.
Extended Capabilities
Version History
Introduced in R2025aSee Also
Objects
monovslam
|factorGraph
|factorIMUParameters
|cameraIntrinsics
(Computer Vision Toolbox) |imageDatastore
Functions
detectORBFeatures
(Computer Vision Toolbox)
Topics
- Implement Visual SLAM in MATLAB (Computer Vision Toolbox)
- Visual SLAM with RGB-D Camera (Computer Vision Toolbox)
- Simulate RGB-D Visual SLAM System with Cosimulation in Gazebo and Simulink (ROS Toolbox)
- Monocular Visual Simultaneous Localization and Mapping (Computer Vision Toolbox)
- Monocular Visual-Inertial SLAM (Computer Vision Toolbox)