SLAM and VIO Basics
An egocentric camera moves whenever the wearer’s head moves. Before a capture pipeline can turn first-person video into hand trajectories or robot actions, it has to know where the camera was at every moment: its six-degree-of-freedom (6-DoF) pose, meaning 3D position plus 3D orientation, in a fixed world frame measured in metres. Visual odometry, visual-inertial odometry and SLAM are the families of algorithms that estimate it.
The rigs these algorithms now run on have changed. In current public capture rigs (2025–2026), a calibrated stereo pair with an IMU is the baseline on the head, and some public rigs carry more cameras: Grounded Superintelligence’s RoboCap hat has six cameras and two IMUs feeding one estimator, Maniformer’s MEgo View has three fisheye cameras forming two stereo pairs (MEgoVista), and Meta’s Ego-1K studio rig places twelve global-shutter fisheye cameras around a Quest 3 headset. Many rigs add wrist cameras. Monocular-inertial tracking is still used on single-camera devices such as UMI-style handheld grippers and action cameras.
This page explains the concepts and the classical (non-learned) estimators. Running SLAM on Wearable Footage covers what goes wrong on head-worn video and how published pipelines fix it, and Learned SLAM and Dense Reconstruction covers DROID-SLAM, MASt3R-SLAM and Gaussian splatting.
Terms used on this page
Section titled “Terms used on this page”For the field guide’s terms in one place, grouped by topic, see the glossary.
| Term | Meaning |
|---|---|
| 6-DoF pose | A rigid transform: 3D rotation plus 3D translation of the camera (or IMU body) in the world frame. |
| Visual odometry (VO) | Estimating the camera’s motion frame to frame from images alone, without keeping a reusable map. Error accumulates over time. |
| Visual-inertial odometry (VIO) | Odometry that fuses camera images with an IMU (gyroscope and accelerometer). The IMU bridges blurred frames, makes roll and pitch observable from gravity, and can make metric scale observable. |
| SLAM | Simultaneous localisation and mapping: odometry plus a persistent map that the estimator can recognise and reuse, so drift can be corrected when a place is seen again. |
| Keyframe | A selected frame whose pose and observations are kept in the estimator’s window or map; the frames in between are tracked but not all optimised. |
| Bundle adjustment (BA) | Nonlinear least-squares optimisation that jointly refines camera poses and 3D points (and, in visual-inertial BA, velocities and IMU biases) so that reprojected points match their detections. |
| Reprojection error | The distance in pixels between where a 3D point projects into an image and where it was detected. |
| IMU preintegration | Summarising the many IMU samples between two keyframes into one relative-motion constraint, so they need not be re-integrated each time the estimate changes (Forster et al., 2016). |
| Marginalisation | Removing old states from a sliding window while keeping their information as a prior on the remaining states, which bounds computation. |
| Loop closure | Recognising a previously visited place and adding a constraint that pulls the accumulated drift back out of the trajectory. |
| Relocalisation | Recovering the pose against the existing map after tracking has been lost. |
| Scale drift | In monocular systems, the unit of length slowly changes along the trajectory, so a metre early in a clip and a metre late in it no longer agree. |
| Absolute trajectory error (ATE) | Root-mean-square distance between estimated and ground-truth positions after aligning the whole trajectory once. Measures global consistency. |
| Relative pose error (RPE) | Error of the motion over a fixed time or distance interval. Measures local accuracy and smoothness. |
| Causal (online) vs offline | A causal estimate uses only past and present measurements, as a live tracker must. An offline estimate can use the whole recording, including future frames and every loop closure. |
Why an egocentric pipeline needs camera poses
Section titled “Why an egocentric pipeline needs camera poses”A hand detector run on one frame measures where the hand is relative to the moving lens. To turn that into a trajectory that a robot can learn from, the pipeline subtracts the head’s motion using the camera pose at each timestamp. The RoboCap authors put the stakes plainly: “The quality of egocentric data is bounded by the accuracy of its 3D labels, namely the human hand and head poses” (RoboCap, 2026).
Poses also give trajectories a consistent “up” (from the IMU’s gravity estimate), put several devices in one frame when they localise against the same map, as UMI does for its two grippers, and are the input to 3D reconstruction of the scene.
VO, VIO and SLAM: what each one remembers
Section titled “VO, VIO and SLAM: what each one remembers”The ORB-SLAM3 authors state the difference between odometry and SLAM:
“The goal of Visual SLAM is to use the sensors on-board a mobile agent to build a map of the environment and compute in real-time the pose of the agent in that map. In contrast, VO systems put their focus on computing the agent’s ego-motion, not on building a map.” — Campos et al., 2020 (ORB-SLAM3)
The same paper sorts this by what the estimator matches the current frame against (ORB-SLAM3):
- Short-term association: features seen in the last few seconds. This is all that VO uses, so once a point leaves the view it is forgotten and drift grows continuously.
- Mid-term association: map points near the current pose that were seen earlier. Inside a mapped area such as a workbench, this lets SLAM run without adding drift.
- Long-term association: place recognition against anywhere seen before, which enables loop closure and relocalisation.
- Multi-map association: matching against separate maps from earlier in the session or from a previous mapping run, and merging them.
Adding an IMU changes which directions can drift. Gravity is an absolute vertical reference, so roll and pitch stop drifting. What remains is set out in the IMU preintegration paper: “For generic motion, the VIO problem has four unobservable degrees of freedom, three corresponding to the global translation and one to the global orientation around the gravity direction (yaw)” (Forster et al., 2016). VIO therefore drifts in position and yaw only; loop closure is what bounds those.
Front-ends: features, optical flow and direct methods
Section titled “Front-ends: features, optical flow and direct methods”An estimator has a front-end, which turns images into measurements, and a back-end, which estimates the state from them. The DSO authors define the two kinds of front-end:
“In the case of passive vision, the direct approach thus optimizes a photometric error , since the sensor provides photometric measurements. Indirect methods on the other hand optimize a geometric error , since the pre-computed values – point-positions or flow-vecors – are geometric quantities.” — Engel, Koltun and Cremers, 2016 (DSO)
Indirect: descriptors and KLT tracking
Section titled “Indirect: descriptors and KLT tracking”Indirect front-ends detect keypoints and pass their pixel positions to the back-end, which minimises reprojection error. They come in two styles:
- Descriptor matching. ORB-SLAM3 extracts ORB keypoints and binary descriptors on every frame and uses the same features for tracking and for bag-of-words place recognition (DBoW2).
- Optical-flow tracking. VINS-Mono tracks corners from frame to frame with the KLT (Kanade-Lucas-Tomasi) sparse optical-flow method, detecting new corners “to maintain a minimum number (100-300) of features in each image”. For loop detection it separately detects 500 more corners per keyframe and describes them with BRIEF descriptors. Basalt makes the same split on purpose: “For the VIO layer, our method uses image features designed for fast and accurate tracking, while for the mapping layer we employ distinctive but lighting and viewpoint invariant keypoints that are suitable for loop closing.”
Direct: photometric error
Section titled “Direct: photometric error”Direct methods such as DSO and its visual-inertial extension DM-VIO skip keypoint matching and minimise differences in pixel intensity. They can use any pixels with enough gradient, including edges on weakly textured surfaces. The cost is sensitivity to geometric error and to brightness changes. From the DSO paper: “While the direct approach outperforms the indirect approach on well-calibrated data, it is ill-suited in the presence of strong geometric noise, e.g., originating from a rolling shutter or inaccurate intrinsic calibration.” DSO therefore models exposure time, the camera response curve and lens vignetting explicitly (see Vignetting and Photometric Calibration and Global vs Rolling Shutter).
Wide-angle and fisheye lenses
Section titled “Wide-angle and fisheye lenses”Egocentric rigs use wide or fisheye lenses so that the hands stay in view (Projections and Distortion). Rectifying a fisheye image to a pinhole image throws away the periphery, so current estimators model the lens directly:
- VINS-Mono defines the visual residual on a unit sphere, because “almost all types of cameras, including wide-angle, fisheye or omnidirectional cameras, can be modeled as a unit ray connecting the surface of a unit sphere.”
- ORB-SLAM3 supports pinhole and Kannala-Brandt fisheye models. For a stereo fisheye rig it does not rectify; it treats the two cameras as fisheye cameras with a known rigid transform between them, triangulates points in the overlapping region, and uses the rest of each image as monocular information.
- RoboCap applies the same idea to six cameras: “All cameras feed one estimator. Cameras with overlapping fields of view form a stereo pair, giving landmarks metric depth from their first frame; on RoboCap this is the front pair, while the lateral cameras track their own landmarks monocularly and keep the estimator constrained when the hands cover the front pair.”
Back-ends: filters versus sliding-window optimisation
Section titled “Back-ends: filters versus sliding-window optimisation”Filters: the MSCKF and OpenVINS
Section titled “Filters: the MSCKF and OpenVINS”A filter propagates the state and its covariance forward with each IMU sample and applies one linearised update when a camera measurement arrives. OpenVINS is the open-source reference implementation of the Multi-State Constraint Kalman Filter (MSCKF). Its inertial state has 15 degrees of freedom (orientation, position, velocity, gyroscope bias and accelerometer bias), plus a window of past camera poses. Most features are used to constrain those past poses and then discarded, rather than kept in the state; optionally, long-lived features are kept as SLAM landmarks. To stop the filter from wrongly believing that yaw is observable, OpenVINS uses First-Estimates Jacobians (FEJ).
On five EuRoC Vicon-room sequences, keeping SLAM landmarks reduced OpenVINS’s average monocular ATE from 0.148 m to 0.079 m; with stereo the average was 0.054 m (OpenVINS, Table II). The authors note that the landmarks help much more in the monocular case than with stereo.
Sliding-window optimisation
Section titled “Sliding-window optimisation”Optimisation-based estimators, including VINS-Mono, VINS-Fusion, Basalt, DM-VIO and ORB-SLAM3’s local mapping, solve bundle adjustment over a window of recent keyframes with visual and preintegrated IMU factors, re-linearising over several iterations. Old keyframes are marginalised into a prior. Full optimisation is slow, so systems run a cheaper tracker on every frame: in VINS-Mono, the full visual-inertial optimisation “may cause more than 50ms on state-of-the-art embedded computers”, while motion-only bundle adjustment “only takes about 5ms to compute”.
The VINS-Fusion authors note a practical advantage for multi-sensor rigs: “Compared with filter-based method, optimization-based method have advantage in time synchronization. Because the big bundle serves as a nature buffer, it can easily handle the case when measurments from multiple sensors come in disorder.”
Calibration sets a floor on accuracy
Section titled “Calibration sets a floor on accuracy”Both kinds of back-end assume accurate camera calibration, IMU calibration, stereo extrinsics and camera-IMU time offset. A second camera does not help if its extrinsics are wrong: “Stereo cameras with an IMU didn’t always perform best, because it requires more accurate calibration than the case of a monocular camera with an IMU” (VINS-Fusion). Several estimators refine calibration online. In OpenVINS’s 20-run simulation with a deliberately wrong starting calibration, the filter with online calibration reached 0.139 m ATE, while the same filter without it diverged to 508.719 m (OpenVINS, Table I). How online calibration works on wearable rigs is covered in Factory, On-Device and Online Calibration.
Metric scale and initialisation
Section titled “Metric scale and initialisation”Metric scale means distances come out in real metres. How a rig gets it is the main practical difference between monocular and stereo tracking; Mono vs Stereo covers the comparison in full.
With a calibrated stereo pair, the known baseline gives metric depth by triangulation on the first frame. ORB-SLAM3 extends its initialisation to stereo-inertial “by fixing the scale factor to one and taking it out from the inertial-only optimization variables, enhancing its convergence” (ORB-SLAM3).
With one camera, vision recovers motion only up to an unknown scale, and the IMU must supply it. The reason is the pinhole projection: a point at camera coordinates (X, Y, Z) lands at pixel (f·X/Z, f·Y/Z). Multiply every scene point and every camera translation by the same factor s and each ratio X/Z and Y/Z is unchanged, so the images are identical. A room twice as large, walked through with steps twice as long, looks exactly the same to one camera; no amount of image data can tell the two apart. A stereo pair breaks the tie because its baseline is a length measured in metres. An IMU breaks it because its accelerometer reports acceleration in m/s²: comparing that with the acceleration of the up-to-scale visual trajectory gives the missing factor. At constant velocity both accelerations are zero, apart from gravity, so there is nothing to compare, which is the degenerate case quoted below.
The VINS-Mono paper calls a camera plus IMU “the minimum sensor suite for metric six degrees-of-freedom (DOF) state estimation” (VINS-Mono). The IMU only reveals scale when the device accelerates:
“However, the scale is not always observable, the most common degenerate case being movement with a constant velocity [ 2 ] . Hence, initialization of such system can take arbitrarily long, depending on the trajectory. Even worse, when initialized prematurely the IMU can in fact worsen the performance.” — von Stumberg and Cremers, 2022 (DM-VIO)
Pure rotation is a second trap: it moves pixels without giving any depth parallax. VINS-Mono uses “short-term integration of gyroscope measurements to compensate rotation when calculating parallax” before it triangulates.
Three published ways to initialise a monocular-inertial system:
- Linear alignment (VINS-Mono). Build an up-to-scale structure-from-motion solution over the window, then align it with the preintegrated IMU to solve for gyroscope bias, velocities, gravity and scale, and refine the gravity direction (VINS-Mono).
- Maximum-a-posteriori estimation (ORB-SLAM3). Run visual SLAM for 2 seconds, inserting keyframes at 4 Hz, then solve an inertial-only estimation problem for scale, gravity direction, biases and velocities. The authors report it reaches “5% scale error with trajectories of 2 seconds”; visual-inertial bundle adjustments at 5 and 15 seconds bring it to 1% (ORB-SLAM3).
- Delayed marginalisation (DM-VIO). Start tracking immediately with vision only, keep a second graph whose marginalisation is delayed, and inject the IMU states once there has been enough motion to estimate them (DM-VIO).
How these steps fail on head-worn footage is covered in Running SLAM on Wearable Footage.
Loop closure and global optimisation
Section titled “Loop closure and global optimisation”VIO alone drifts in position and yaw. In VINS-Mono’s walk of more than 700 metres through a lab building and around a playground, the final drift without loop closure was [-5.47, 2.76, -0.29] m, “0.88% with respect to the total trajectory length”; with loop closure the final drift was bounded to [-0.032, 0.09, -0.07] m (VINS-Mono). Systems handle loop closure in three ways:
- 4-DoF pose graph (VINS-Mono, VINS-Fusion). Roll and pitch are already observable from gravity, so the pose graph after a loop optimises only position and yaw (VINS-Mono).
- Non-linear factor recovery (Basalt). Basalt condenses the information from its VIO window into relative-pose and roll-pitch factors between keyframes, then runs global bundle adjustment over keyframes with loop-closure features (Basalt).
- Multi-map Atlas (ORB-SLAM3). When fewer than 15 map points are tracked, ORB-SLAM3’s visual-inertial mode is “visually lost”. For up to 5 seconds it predicts the pose from the IMU and searches for matches in a wide window; after that it starts a new map, which is merged with the earlier maps when a mapped area is seen again (ORB-SLAM3).
An offline system can go further: it can run bundle adjustment over the whole session once every revisit is known. On RoboCap, “the causal estimate available during capture is about twice as inaccurate as the offline trajectory” (RoboCap). Training labels are therefore usually made offline.
The classical systems at a glance
Section titled “The classical systems at a glance”The main open-source classical estimators, by approach:
- Indirect, optimisation-based SLAM: ORB-SLAM3 (mono, stereo, RGB-D, with or without IMU; multi-map).
- KLT tracking, sliding-window optimisation: VINS-Mono, VINS-Fusion, Basalt.
- Filter-based VIO: OpenVINS.
- VIO with a metric-semantic mesh: Kimera.
- Direct (photometric): DSO and, with an IMU, DM-VIO.
Their papers, sensors, lens models, online calibration, licences and published accuracy are tabulated in one place on SLAM and VIO Systems Compared. How the benchmarks and their ground truth are produced is on VIO Benchmarks and Ground Truth.
Prompts you can give an AI
Section titled “Prompts you can give an AI”I am building an offline egocentric processing pipeline for robot manipulation data.My rig has [mono / stereo / N-camera] [global / rolling]-shutter fisheye cameras at [fps], and a [hardware-synced / software-timestamped] IMU at [rate] Hz.Using the ORB-SLAM3, OpenVINS, Basalt, VINS-Fusion and Kimera papers:1. Which estimator designs fit this sensor set, and what does each paper say about fisheye support?2. Which licences (GPL-3.0, BSD) affect how I can ship the pipeline?3. Why should training labels come from offline bundle adjustment rather than the causal estimate?Our stereo-inertial tracker drifts more than our mono-inertial tracker on the same rig.Using the VINS-Fusion remark that stereo with an IMU "requires more accurate calibration" and OpenVINS's online calibration results, list the checks I should run on intrinsics, stereo extrinsics, camera-IMU extrinsics and time offset, in order, and what each result would tell me.Sources
Section titled “Sources”- ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM (Campos et al., 2020; IEEE T-RO 2021)
- VINS-Mono: A Robust and Versatile Monocular Visual-Inertial State Estimator (Qin, Li and Shen, 2017; IEEE T-RO 2018)
- A General Optimization-based Framework for Local Odometry Estimation with Multiple Sensors (VINS-Fusion; Qin, Pan, Cao and Shen, 2019)
- OpenVINS: A Research Platform for Visual-Inertial Estimation (Geneva et al., ICRA 2020)
- Visual-Inertial Mapping with Non-Linear Factor Recovery (Basalt; Usenko et al., 2019; IEEE RA-L 2020)
- Kimera: an Open-Source Library for Real-Time Metric-Semantic Localization and Mapping (Rosinol et al., ICRA 2020)
- Direct Sparse Odometry (Engel, Koltun and Cremers, 2016; IEEE TPAMI 2018)
- DM-VIO: Delayed Marginalization Visual-Inertial Odometry (von Stumberg and Cremers, IEEE RA-L 2022)
- On-Manifold Preintegration for Real-Time Visual-Inertial Odometry (Forster, Carlone, Dellaert and Scaramuzza; IEEE T-RO 2016)
- RoboCap: A New Platform for Egocentric Robot Learning (2026)
- MEgoVista: Multi-view Ego-aware Motion Estimation for Metric 4D Hands and Head in the Wild (2026)
- Ego-1K: A Large-Scale Multiview Video Dataset for Egocentric Vision (2026)
- Universal Manipulation Interface: In-The-Wild Robot Teaching Without In-The-Wild Robots (Chi et al., 2024)
- Official repositories, for licences: ORB_SLAM3, VINS-Mono, VINS-Fusion, open_vins, basalt, Kimera-VIO, dso, dm-vio