Skip to content
AI360Xpert
Beta

ORB-SLAM Feature SLAM System

Track sharp corners, remember keyframes, and fix the map when you return. ORB-SLAM is the feature-based SLAM that made sparse maps reliable.

ORB corners feed tracking and mapping threads while loop closure corrects the whole path
ORB corners feed tracking and mapping threads while loop closure corrects the whole path

Why Does This Exist?

Visual odometry drifts because it forgets. ORB-SLAM exists to remember efficiently: it keeps a sparse map of triangulated ORB corners attached to keyframes, then reuses that map for tracking, local mapping, and loop repair. It became the reference sparse system because its three threads plus bag-of-words relocalization run in real time on a CPU.

This page covers the sparse feature pipeline. Direct pixel methods live in LSD-SLAM and DSO; inertial fusion lives in VINS. Loop repair detail is loop closure.

Think of It Like This

A hiker marking cairns on a trail

A hiker stacks small stone cairns at every junction and photographs each one. Between cairns she counts steps; when she recognizes an old cairn she fixes her whole step count at once instead of trusting the sum.

ORB corners are cairns, keyframes are the photos, and the bag-of-words lookup is recognizing an old stack. The analogy stops at lighting: cairns look the same all day while corner descriptors shift with viewpoint and blur.

How It Actually Works

Tracking extracts about 10001000 ORB features per frame, matches them to the local map, and solves motion-only bundle adjustment for the current pose. Mapping triangulates new points from unmatched features, culls weak points that fail a visibility ratio test, and runs local bundle adjustment over connected keyframes in the covisibility graph. Loop closing converts each keyframe into a bag-of-words vector, finds candidates with high similarity, verifies with geometric checks, then runs pose-graph plus full bundle adjustment to distribute the correction.

Worked numbers

A corridor run keeps 120120 keyframes and 90009000 map points. Tracking matches 320320 points per frame with mean residual 0.60.6 px. A loop candidate scores similarity 0.420.42 against a threshold 0.350.35, verifies with 8585 inlier matches, and the correction shifts the far end by 0.350.35 m, cutting end-to-end drift from 1.11.1 percent to 0.10.1 percent.

Code

def bow_similarity(a: dict[int, float], b: dict[int, float]) -> float:    common = set(a) & set(b)  # shared visual words only    return sum(a[w] * b[w] for w in common)

print(bow_similarity({1: 0.5, 2: 0.3}, {1: 0.5, 3: 0.4}))  # -> 0.25

Watch Out For

Running ORB in textureless corridors

Blank walls yield under 5050 features where the system wants hundreds, so tracking falls back to motion prediction and then loses. The symptom is repeated relocalization prompts in white hallways. Add keyframes aggressively, widen the search window briefly, or fuse depth or inertial data instead of trusting corners alone.

The Quick Version

  • ORB-SLAM is a sparse feature SLAM built on ORB corners and keyframes.
  • Tracking solves motion-only bundle adjustment against the local map.
  • Mapping triangulates, culls, and refines through the covisibility graph.
  • Bag-of-words loop closure finds revisits and triggers global correction.
  • Typical indoor drift falls near 0.10.1 percent after loop repair.
  • Textureless scenes starve the feature front end first.