ORB-SLAM is a feature-based visual SLAM system that estimates the pose of a moving camera and builds a sparse 3D map of keypoints in real time, using ORB features for tracking, mapping, relocalization and loop closure. In robotics perception, it is one of the most widely studied open-source reference systems for simultaneous localization and mapping with cameras alone or with an added inertial sensor.
The family began with the monocular system published in 2015 by researchers at the University of Zaragoza, followed by ORB-SLAM2 for monocular, stereo and RGB-D cameras and ORB-SLAM3 with visual-inertial fusion and multi-map support. Its central design choice is to use one feature type for every task, which keeps the pipeline coherent, fast and reusable across sessions.
How ORB-SLAM tracks and maps with three parallel threads
ORB-SLAM splits the work into three concurrent threads so that frame-rate tracking never waits for slower optimization. The tracking thread localizes every incoming frame, the local mapping thread refines recent geometry, and the loop closing thread detects revisited places and removes accumulated drift.
Tracking extracts ORB keypoints, predicts the pose with a constant-velocity motion model, matches features against nearby map points and refines the pose with motion-only bundle adjustment. It then decides whether the frame should become a keyframe, which is the only kind of frame stored in the map.
Local mapping triangulates new points from the latest keyframe and its neighbors, runs local bundle adjustment over a window of covisible keyframes and culls redundant data. A keyframe is typically discarded when about 90% of its map points are already observed by at least three other keyframes, which keeps the map compact during long sessions.
The table below summarizes what each thread does and how often it runs.
| Thread | Main task | Typical rate | Key output |
|---|---|---|---|
| Tracking | Pose estimation per frame | Every frame, often 20-30 Hz | Camera pose and keyframe decision |
| Local mapping | Triangulation and local optimization | Per new keyframe | Refined local map |
| Loop closing | Place recognition and drift correction | Per keyframe, query only | Corrected pose graph |
| Full bundle adjustment | Global refinement after a loop | Occasional, in ORB-SLAM2 and later | Globally consistent map |
Why ORB features and the covisibility graph matter
ORB (Oriented FAST and Rotated BRIEF) combines the FAST corner detector with an orientation estimate and a 256-bit binary descriptor that is compared by Hamming distance. Binary matching is far cheaper than floating-point descriptors such as SIFT, which allows real-time operation on a CPU without a GPU.
Keypoints are extracted over an image pyramid, commonly 8 levels with a scale factor of 1.2, to tolerate changes in viewing distance. Typical budgets are about 1,000 features for VGA images and about 2,000 for wide automotive stereo frames, distributed over a grid so that features cover the whole image.
The map is organized as a covisibility graph, where keyframes are linked when they share enough map points. A sparser essential graph keeps only the spanning tree, strong covisibility edges and loop edges, which makes pose graph optimization fast after a loop is closed. Place recognition relies on a bag of binary words built with the DBoW2 library.
The following table lists the parameters that most influence accuracy and speed.
| Parameter | Common value | Effect of increasing it |
|---|---|---|
| Features per frame | 1,000-2,000 | More robust tracking, higher CPU load |
| Pyramid levels | 8 | Better scale invariance, more extraction time |
| Scale factor | 1.2 | Coarser levels, fewer matches across distance |
| FAST threshold | 20, falling back to 7 | Fewer but stronger corners |
| Camera frame rate | 20-30 fps | Smaller motion between frames, easier matching |
ORB-SLAM versions and sensor configurations
Each release of ORB-SLAM extended the sensor set while keeping the same feature-based core. The choice of version therefore depends mainly on which cameras and inertial sensors a robot carries.
| Version | Supported sensors | Notable additions | Scale observability |
|---|---|---|---|
| ORB-SLAM | Monocular | Automatic initialization, Sim(3) loop closure | Unknown, drifts |
| ORB-SLAM2 | Monocular, stereo, RGB-D | Localization-only mode, full bundle adjustment | Metric with stereo or depth |
| ORB-SLAM3 | Adds IMU, pinhole and fisheye | Atlas multi-map system, maximum a posteriori IMU initialization | Metric with IMU or stereo |
Monocular operation cannot observe absolute scale, so the system initializes by computing a homography and a fundamental matrix in parallel and selecting the model that better explains the motion. Loop closure in monocular mode therefore estimates a Sim(3) similarity transform, correcting both pose and scale drift.
ORB-SLAM3 introduced the Atlas, a set of disconnected maps. When tracking is lost, a new map starts, and later map merging joins it to an earlier one once a common place is recognized, which greatly improves robustness in long or interrupted runs.
ORB-SLAM compared with related perception methods
ORB-SLAM is a specific implementation of visual SLAM, whereas pure visual odometry estimates motion without maintaining a reusable map or closing loops. Direct methods and LiDAR pipelines take different routes to the same localization problem.
| Approach | Input used | Map type | Main strength | Main weakness |
|---|---|---|---|---|
| ORB-SLAM | Sparse keypoints | Sparse, reusable | Loop closure and relocalization | Fails in low texture |
| Visual odometry | Keypoints or pixels | None or local only | Low latency, simple | Unbounded drift |
| Direct methods | Pixel intensities | Semi-dense | Works on weak edges | Sensitive to exposure changes |
| LiDAR odometry | Range scans | Dense point cloud | Lighting independent | Costly sensor, geometric degeneracy |
In practice, ORB-SLAM often serves as the localization backbone, while separate modules such as semantic mapping or an OctoMap occupancy grid build the dense representations that planners need. The sparse ORB map alone is not suitable for obstacle avoidance.
Limitations and common failure modes
ORB-SLAM assumes a mostly static, textured scene, and most failures follow from violating that assumption. Knowing the symptoms helps engineers decide whether to tune parameters, add sensors or choose another method.
| Symptom | Likely cause | Practical remedy |
|---|---|---|
| Tracking lost in corridors | Low texture, few keypoints | Lower FAST threshold, add IMU or depth |
| Map scale changes | Monocular scale drift | Use stereo, RGB-D or inertial mode |
| Ghost points in crowds | Moving objects treated as static | Mask dynamic regions before tracking |
| Initialization fails | Pure rotation or small baseline | Translate the camera sideways at start |
| Pose jumps | Motion blur or rolling shutter | Shorter exposure, global shutter camera |
Accuracy also depends on careful camera calibration: errors in intrinsics or in the camera to IMU transform appear directly as trajectory error. The code is released under the GPLv3 license, which matters for commercial products that would need to publish derived source code or negotiate a separate license.
The short version
ORB-SLAM lets a robot work out where it is and what its surroundings look like using only a camera, sometimes helped by a motion sensor. It picks out thousands of small, distinctive spots in each image. These may be corners of furniture or edges of posters. It follows them as the camera moves.
By watching how those spots shift, it calculates the camera path. It also places each spot in 3D space. When the robot returns to a familiar place, it recognizes the scene and corrects the small errors that built up. A hiker does the same after reaching a known landmark and fixing the position marked on a paper map.
Where it makes a difference
A research team building an indoor inspection drone for a warehouse without GPS mounts a global shutter stereo camera and an IMU, then runs ORB-SLAM3 in stereo-inertial mode on an onboard computer. The drone flies a 400-meter loop along storage racks at about 1.5 meters per second, with 1,200 features extracted per frame at 30 frames per second.
Before the loop closes, accumulated drift reaches roughly half a meter. When the drone passes the starting aisle again, the bag-of-words query recognizes the place, pose graph optimization redistributes the error, and the final position error falls to a few centimeters. The team saves the map and reuses it in localization-only mode, so later flights start already aligned with the stored rack positions.