Skip to the lesson
FixTheRobot Explore Robotics / Localization & SLAM / M6 Visual and Visual-Inertial SLAM / M6-T9

Localization & SLAM · Theory · M6

M6-T9 — Failure Modes in Visual SLAM

Visual SLAM works well when its assumptions hold and fails in specific, predictable ways when they do not. Knowing the list is half of debugging.

  • Lesson 9 of 9
  • Module 6: Visual and Visual-Inertial SLAM
  • Theory
  • About 10 minutes to read

Every module of this track has ended with failures, because failure analysis is how SLAM is actually engineered. For visual SLAM the list is long: the front end depends on images that are sharp, textured, well lit and of a static scene, and the estimator depends on geometry that is non-degenerate. This lesson catalogues the failures, what each looks like in the logs, and what to do. The third lab of this module gives you logs and asks you to find the cause.

Learning objectives

After this lesson, you should be able to:

  • List the main failure modes of visual and visual-inertial SLAM and the physical or geometric cause of each.
  • Compute motion blur in pixels from angular velocity, exposure and focal length.
  • Identify the signal in the logs (inlier count, parallax, residuals, covariance) that reveals each failure.
  • Describe relocalisation and why it can fail or give a false recovery.

The problem and the intuition

A visual SLAM system is a chain: image quality, then features, then matches, then geometry, then optimisation. The quality of each link limits the next, and the failures are best organised by the link that breaks. Dark, blurred or textureless images give few features. Few features, or ones that are repeated, give few or wrong matches. Wrong matches or degenerate motion give a poorly conditioned or incorrect pose. A wrong pose, fed back into map building, contaminates the map and the following frames.

The most useful habit is to look upstream: when the pose is wrong, ask which earlier link first degraded. Failures are rarely sudden; the count of tracked features falls, parallax shrinks, residuals rise, and only then does the system report “lost”.

Failures are chains. Find the first link that degraded, usually in the logs before the system itself notices.

Visual SLAM state machineStates of a visual SLAM system: initialising, tracking, recently lost, lost and relocalising, with the events that move between them. A drop in the number of tracked features precedes loss.Initialise Trackinginliers high Recently lostinliers falling Lost RelocaliseBoW + PnP recovered Failure is a process: the inlier count, parallax and residuals degrade before the state flips to lost.
A visual SLAM system moves through states; the signals degrade before it declares itself lost.

The catalogue: causes, signals, mitigations

Problem. Recognise why a visual or visual-inertial SLAM run failed or degraded, from sensor, feature, geometry and estimator signals.

Assumptions. The system is a feature-based tracker with keyframes and a map (M6-T5), optionally with an IMU (M6-T6). The analysis uses available logs: tracked feature counts, inlier counts, reprojection residuals, parallax, state transitions, bias estimates and covariances.

Image-level failures

  • Motion blur. Blur length in pixels ≈ f · ω · texposure for rotation. Blurred gradients make corners disappear and descriptors unrepeatable.
  • Low texture. White walls, floors, a clear sky: few corners, G small (M6-T2). Direct and learned methods or active depth sensors can help.
  • Illumination change and auto-exposure. Brightness constancy breaks; features saturate or vanish when the camera turns toward a window. Fix the exposure or use photometric calibration.
  • Lens flare, rain, dirt. Local loss of image; the features detected there are spurious.

Correspondence failures

  • Repeated texture and perceptual aliasing. Identical windows, tiles, aisles: matches are plausible and wrong; a false loop closure folds the map (M5-T10, M4-T4).
  • Dynamic objects. Features on moving people or vehicles. If they form the largest rigid group, RANSAC may select them as the model; the robot appears to move opposite to the vehicle. Mitigate with semantic masks, IMU consistency and robust kernels.
  • Reflections and transparent surfaces. Features on reflections move differently from the scene and appear at the wrong depth.

Geometric failures

  • Pure rotation. No baseline: depth cannot be triangulated and the map points stop being created; tracking continues for a while on the existing points and then fails when they leave the view (M6-T3).
  • Planar or near-planar scenes. The essential matrix is degenerate; use the homography.
  • Small parallax or far scenes. Depth is ill-conditioned; all points are effectively at infinity and only rotation is observed.
  • Forward motion along the optical axis (driving straight): the image expands from the focus of expansion with little lateral parallax; depth near the axis is poorly constrained.
  • Collinear or clustered features. The pose has weak directions.

Sensor and estimator failures

  • Rolling shutter during fast motion: skewed geometry and larger residuals (M6-T8).
  • Calibration and time offsets: biases that depend on the motion (M6-T8).
  • IMU saturation or bad initialisation: the scale or gravity is wrong from the start, and the system never recovers until a reset.
  • Scale drift in monocular systems: the trajectory shrinks or stretches over time and is only corrected by a loop closure with Sim(3) (M6-T5).
  • Map contamination: a wrong pose adds wrong map points, which then attract further wrong matches.

Relocalisation

After tracking is lost the system looks up the current image in the bag-of-words database and verifies a candidate with PnP and RANSAC (M6-T5). Failure modes: the place was never mapped or looks different (lighting, season, moved furniture); the candidate is aliased; the camera has moved far and the first view has too few matches. A false relocalisation is worse than none, because the system tracks confidently in the wrong place: always require a minimum inlier count and consistency over several frames.

quantities used to read a failed run
blur(pixels)≈f⋅ω⋅texposure\text{blur}(\text{pixels})\approx f\cdot \omega \cdot t_{\text{exposure}}
parallax angle≈baselinedepth\text{parallax angle}\approx \frac{\text{baseline}}{\text{depth}}
inliers / tracked features
inlier count
number of features consistent with the estimated pose; the primary health signal.
parallax
angular or pixel shift of features between keyframes; low parallax means ill-conditioned depth.
f·ω·t
motion blur length in pixels for rotation rate ω and exposure t.
FOE
focus of expansion: the image point toward which the camera moves.

Signals and mitigations

Visual SLAM failures, signals and mitigations
FailureSignal in the logsMitigation
Blur / fast motionTracked features drop with angular rate; sharpness metric fallsShorter exposure, higher frame rate, IMU prediction, global shutter
Low textureFew detections; low corner response; large empty image cellsAdd depth or lidar, use direct methods, plan paths with texture
Illumination changeSudden loss with brightness step; exposure value jumpsLocked or controlled exposure, photometric calibration, learned features
Aliasing / false loopLarge pose jump at loop acceptance; wrong map overlap; good descriptor but poor geometryGeometric and temporal verification, robust back end (M5-T10)
Dynamic objectsInliers concentrated in one image region; pose disagrees with IMUSemantic masking, IMU gating, robust estimation
Pure rotation / planarParallax near zero; no new map points; homography fits better than EKeyframe selection by parallax; model selection; add translation
Scale driftLoop closure needs a scale ≠ 1; trajectory length shrinks or stretchesUse stereo, depth or IMU; Sim(3) loop correction
Wrong calibrationBias or extrinsic estimates wander with motionRecalibrate; hardware sync (M6-T8)

A worked example: reading a failed run

  1. Blur. A handheld camera with f = 600 px pans at ω = 1 rad/s with a 20 ms exposure. Blur length = 600 × 1 × 0.020 = 12 px. With a 5 ms exposure it is 3 px. The first is blur across a 12 px smear (corners vanish), the second is tolerable. The cost of the shorter exposure is more noise in dim light: a trade-off.
  2. Reading logs. A run reports tracked features per frame: 220, 215, 218, 190, 120, 60, 22, then LOST. Parallax and residual stay normal until frame 4. The decline is steady over six frames and correlates with the gyroscope rate rising from 0.3 to 1.8 rad/s: blur from a fast turn, not a sudden occlusion. A sudden drop from 220 to 20 in one frame would instead suggest an exposure jump or a lens cover.
  3. Dynamic objects. A robot waits at a junction while a bus passes. The bus fills 60% of the image with 130 features and the static background has 90. RANSAC finds the largest consistent set, which is the bus. The estimated camera velocity opposes the bus’s motion, while the IMU says the robot is stationary. A check that the visual rotation agrees with the gyroscope within a threshold would reject this model.
  4. Pure rotation. The robot spins in place. After 40° of rotation there are no new map points (parallax is zero), and the old points leave the field of view. Tracked inliers fall to fewer than 15 and the system is lost although the images are sharp. The fix is design, not tuning: rotate slowly while translating, or add an IMU and accept that scale is not updated during the spin.
  5. False recovery. After a loss, relocalisation matches the image to a keyframe of an identical aisle with 38 inliers. The threshold was 30. The system resumes tracking 12 m away from the truth and corrupts the map. A rule such as “at least 50 inliers and three consecutive consistent candidates” would have rejected it.

Engineering implications and limitations

Engineering implications

  • Instrument the system. Log feature counts, inliers, parallax, exposure, state transitions, bias estimates and covariance for every run. Failures that cannot be seen in logs cannot be fixed.
  • Define health thresholds on those signals and act before the system is lost: slow down, stop, switch to another source (wheel odometry, lidar), or stop adding keyframes.
  • Control the camera. Fix or bound exposure, use a short exposure and a high frame rate, prefer a global shutter for fast platforms.
  • Keep an independent fallback. An IMU, wheel odometry or lidar to bridge outages and to cross-check the visual pose.
  • Do not accept recoveries blindly. Require high inlier counts and temporal consistency; log all relocalisation events.
  • Test in the failure conditions (dim light, glare, moving crowds, long corridors) before deployment, not only in the lab.

Limits

No mitigation removes the dependence on the visual front end: if the camera sees nothing distinctive, a camera-only system has nothing to work with. Redundant sensing is the dependable answer. And the failure analysis here assumes feature-based systems; direct and learned systems fail differently, for example with photometric changes that features survive, or with out-of-distribution scenes for a network.

Common misconceptions

“If the system says tracking is OK, the pose is right.”

The state flag lags the truth. A confident wrong pose from aliasing or dynamic objects is common; cross-check with another sensor.

“Failures are random.”

They follow from physical causes (light, motion, texture) and geometric degeneracies and are largely predictable.

“Relocalisation always helps.”

A wrong relocalisation is worse than staying lost, because the system continues with a wrong map.

“More features fix low texture.”

If the scene has no texture, there is nothing to detect; the only remedies are other sensors or other methods.

Engineering takeaways

  1. Visual SLAM failures are chains from image quality to features to matches to geometry to estimation; look for the first broken link.
  2. Blur is about f·ω·t pixels; low texture, aliasing, dynamic objects, pure rotation and rolling shutter are the common causes.
  3. The logs (inliers, parallax, residuals, bias estimates) degrade before the state flag changes.
  4. Relocalisation needs verification; a false recovery is dangerous.
  5. Redundant sensing and instrumentation are the practical defences.

References and further reading

Primary papers and authoritative documentation.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

A handheld camera with f = 500 px rotates at 0.8 rad/s with a 10 ms exposure. How long is the blur, and is it a problem?

Explanation

Blur length ≈ f ω t = 500 × 0.8 × 0.010 = 4 px. This is a smear of several pixels, enough to degrade corner detection and descriptors; a shorter exposure or a lower rotation rate would reduce it, with a trade-off in image noise.

Question 2

Tracked features fall steadily from 220 to 20 over six frames while the gyroscope rate rises. What is the likely cause, and how does it differ from a sudden drop in one frame?

Explanation

A steady fall that tracks the angular rate suggests motion blur or too large a displacement for the tracker. A sudden single-frame drop points to an event, such as an exposure jump, a lens cover or a lighting change, not a gradual degradation.

Question 3

Why can a bus filling most of the image make the estimated camera motion wrong, and what check can catch it?

Explanation

RANSAC selects the largest geometrically consistent set; if the moving bus provides the most features, the estimated motion is the bus’s relative motion. Comparing the visual rotation with the gyroscope, or masking dynamic classes, reveals the inconsistency and rejects the model.

What’s next

That completes the theory of visual and visual-inertial SLAM. The four labs ask you to diagnose feature tracking, quantify visual odometry drift, read the logs of a failed tracker and estimate a camera–IMU time offset.

Practice this lesson

Investigate ORB-SLAM Failure Modes

Given the state logs of a keyframe-based tracker, identify why tracking was lost and how it relocalised.

Next lesson

M7-T1 — SLAM System Architecture in ROS 2

Map the nodes, topics, frames and parameters of a ROS 2 SLAM system.

Nothing below is required to finish this lesson.