vSLAM
Visual simultaneous localization and mapping (vSLAM), refers to the process of calculating the position and orientation of a camera, with respect to its surroundings, while simultaneously mapping the environment. The process uses only visual inputs from the camera. Applications for visual SLAM include augmented reality, robotics, and autonomous driving. For more details, see Implement Visual SLAM in MATLAB.
Functions
Detect, Extract, and Match Features
detectSURFFeatures | Detect SURF features |
detectORBFeatures | Detect ORB keypoints |
extractFeatures | Extract interest point descriptors |
matchFeatures | Find matching features |
matchFeaturesInRadius | Find matching features within specified radius (Since R2021a) |
Reconstruct 3-D Structure
triangulate | 3-D locations of undistorted matching points in stereo images |
img2world2d | Determine world coordinates of image points (Since R2022b) |
world2img | Project world points into image (Since R2022b) |
Estimate Motion
estgeotform2d | Estimate 2-D geometric transformation from matching point pairs (Since R2022b) |
estgeotform3d | Estimate 3-D geometric transformation from matching point pairs (Since R2022b) |
estimateFundamentalMatrix | Estimate fundamental matrix from corresponding points in stereo images |
estworldpose | Estimate camera pose from 3-D to 2-D point correspondences (Since R2022b) |
findWorldPointsInView | Find world points observed in view (Since R2020b) |
findWorldPointsInTracks | Find world points that correspond to point tracks (Since R2020b) |
estrelpose | Calculate relative rotation and translation between camera poses (Since R2022b) |
Optimize Motion and 3-D Structure
optimizePoses | Optimize absolute poses using relative pose constraints (Since R2020a) |
createPoseGraph | Create pose graph (Since R2020a) |
bundleAdjustment | Adjust collection of 3-D points and camera poses |
bundleAdjustmentMotion | Adjust collection of 3-D points and camera poses using motion-only bundle adjustment (Since R2020a) |
bundleAdjustmentStructure | Refine 3-D points using structure-only bundle adjustment (Since R2020a) |
Evaluate Results
compareTrajectories | Compare estimated trajectory against ground truth (Since R2024b) |
trajectoryErrorMetrics | Store accuracy metrics for trajectories (Since R2024b) |
Visualize Results
imshow | Display image |
showMatchedFeatures | Display corresponding feature points |
plot | Plot image view set views and connections (Since R2020a) |
plotCamera | Plot a camera in 3-D coordinates |
pcshow | Plot 3-D point cloud |
pcplayer | Visualize streaming 3-D point cloud data |
Manage Data
bagOfFeatures | Bag of visual words object |
bagOfFeaturesDBoW | Bag of visual words using DBoW2 library (Since R2024b) |
dbowLoopDetector | Detect loop closure using visual features (Since R2024b) |
imageviewset | Manage data for structure-from-motion, visual odometry, and visual SLAM (Since R2020a) |
worldpointset | Manage 3-D to 2-D point correspondences (Since R2020b) |
indexImages | Create image search index |
invertedImageIndex | Search index that maps visual words to images |
Monocular Visual SLAM
monovslam | Visual simultaneous localization and mapping (vSLAM) with monocular camera (Since R2023b) |
addFrame | Add image frame to visual SLAM object (Since R2023b) |
hasNewKeyFrame | Check if new key frame added in visual SLAM object (Since R2023b) |
checkStatus | Check status of visual SLAM object (Since R2023b) |
isDone | End-of-file status (logical) |
mapPoints | Build 3-D map of world points (Since R2023b) |
poses | Absolute camera poses of key frames (Since R2023b) |
plot | Plot 3-D map points and estimated camera trajectory in visual SLAM (Since R2023b) |
reset | Reset visual SLAM object (Since R2023b) |
RGB-D Visual SLAM
rgbdvslam | Feature-based visual simultaneous localization and mapping (vSLAM) with RGB-D camera (Since R2024a) |
addFrame | Add pair of color and depth images to RGB-D visual SLAM object (Since R2024a) |
hasNewKeyFrame | Check if new key frame added in RGB-D visual SLAM object (Since R2024a) |
checkStatus | Check status of visual RGB-D SLAM object (Since R2024a) |
isDone | End-of-processing status for RGB-D visual SLAM object (Since R2024a) |
mapPoints | Build 3-D map of world points from RGB-D vSLAM object (Since R2024a) |
poses | Absolute camera poses of RGB-D vSLAM key frames (Since R2024a) |
plot | Plot 3-D map points and estimated camera trajectory in RGB-D visual SLAM (Since R2024a) |
reset | Reset RGB-D visual SLAM object (Since R2024a) |
Stereo Visual SLAM
stereovslam | Feature-based visual simultaneous localization and mapping (vSLAM) with stereo camera (Since R2024a) |
addFrame | Add pair of color and depth images to stereo visual SLAM object (Since R2024a) |
hasNewKeyFrame | Check if new key frame added in stereo visual SLAM object (Since R2024a) |
checkStatus | Check status of stereo visual SLAM object (Since R2024a) |
isDone | End-of-processing status for stereo visual SLAM object (Since R2024a) |
mapPoints | Build 3-D map of world points from stereo vSLAM object (Since R2024a) |
poses | Absolute camera poses of stereo key frames (Since R2024a) |
plot | Plot 3-D map points and estimated camera trajectory in stereo visual SLAM (Since R2024a) |
reset | Reset stereo visual SLAM object (Since R2024a) |
Topics
- Implement Visual SLAM in MATLAB
Understand the visual simultaneous localization and mapping (vSLAM) workflow and how to implement it using MATLAB.
- Choose SLAM Workflow Based on Sensor Data
Choose the right simultaneous localization and mapping (SLAM) workflow and find topics, examples, and supported features.
- Develop Visual SLAM Algorithm Using Unreal Engine Simulation (Automated Driving Toolbox)
Develop a visual simultaneous localization and mapping (SLAM) algorithm using image data from the Unreal Engine® simulation environment.
Featured Examples
Simulate RGB-D Visual SLAM System with Cosimulation in Gazebo and Simulink
Simulates an RGB-D visual simultaneous localization and mapping (SLAM) system to estimate the camera poses using data from a mobile robot in Gazebo.
(ROS Toolbox)
- Since R2024b
Monocular Visual-Inertial SLAM
Perform SLAM by combining images captured by a monocular camera with measurements from an IMU sensor.
Performant and Deployable Monocular Visual SLAM
Use visual inputs from a camera to perform vSLAM and generate multi-threaded C/C++ code.
Monocular Visual Simultaneous Localization and Mapping
Visual simultaneous localization and mapping (vSLAM).
Performant and Deployable Stereo Visual SLAM with Fisheye Images
Use fisheye image data from a stereo camera to perform VSLAM and generate multi-threaded C/C++ code.
Stereo Visual Simultaneous Localization and Mapping
Process image data from a stereo camera to build a map of an outdoor environment and estimate the trajectory of the camera.
Build and Deploy Visual SLAM Algorithm with ROS in MATLAB
Implement and generate C ++ code for a vSLAM algorithm that estimates poses for the TUM RGB-D Benchmark and deploy as an ROS node to a remote device.
Visual Localization in a Parking Lot
Develop a visual localization system using synthetic image data from the Unreal Engine® simulation environment.
Stereo Visual SLAM for UAV Navigation in 3D Simulation
Develop a visual SLAM algorithm for a UAV equipped with a stereo camera.
Estimate Camera-to-IMU Transformation Using Extrinsic Calibration
Estimate SE(3) transformation to define spatial relationship between camera and IMU.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)