Keyframe-Based Visual-Inertial Online SLAM with Relocalization

Anton Kasyanov, Francis Engelmann, Jörg Stückler, Bastian Leibe · DOI

Abstract

Complementing images with inertial measurements has become one of the most popular approaches to achieve highly accurate and robust real-time camera pose tracking. In this paper, we present a keyframe-based approach to visual-inertial simultaneous localization and mapping (SLAM) for monocular and stereo cameras. Our visual-inertial SLAM system is based on a real-time capable visual-inertial odometry method that provides locally consistent trajectory and map estimates. We achieve global consistency in the estimate through online loop-closing and non-linear optimization. Furthermore, our system supports relocalization in a map that has been previously obtained and allows for continued SLAM operation. We evaluate our approach in terms of accuracy, relocalization capability and run-time efficiency on public indoor benchmark datasets and on newly recorded outdoor sequences. We demonstrate state-of-the-art performance of our system compared to a visual-inertial odometry method and baseline visual SLAM approaches in recovering the trajectory of the camera.

Introduction

While Visual-Inertial Odometry (VIO) is a standard for motion tracking in robotics and AR/VR, it inherently suffers from drift. Because VIO typically optimizes over a small "sliding window" of recent frames, small errors accumulate over time, causing the estimated trajectory to deviate from reality. Purely visual SLAM systems can mitigate this through loop closure but often fail during fast motion or in low-texture environments. This work presents a robust, real-time visual-inertial SLAM system that combines the high-frequency tracking of odometry with the global consistency of a map, enabling loop closure and relocalization in previously mapped environments.

System Architecture and Methodology

The proposed system utilizes a two-layered architecture to balance real-time tracking with global optimization.

The two-layered system architecture (top) showing the parallel processing of VIO and SLAM, alongside a visualization of loop closure correcting trajectory drift (bottom).

1. The Local Layer (VIO)

The frontend performs tightly coupled non-linear optimization of camera poses, IMU biases, and 3D landmarks. It employs BRISK features for tracking and uses marginalization of old states to maintain real-time performance.

2. The Global Layer (SLAM)

Running in a parallel thread, this layer manages global consistency:

  • Loop Closure: Using DBoW2, the system identifies previously visited locations. Matches are verified via RANSAC-based 3D-to-2D alignment.
  • Optimization: Confirmed loops trigger a global pose graph optimization (using the gtsam3 framework) to realign the trajectory and correct accumulated drift.
  • Relocalization: The system maintains location hypotheses within old maps, requiring four sequential consistent matches before merging the live trajectory into the existing coordinate system.

Experimental Evaluation

The system was rigorously tested on both indoor benchmarks and large-scale outdoor environments.

Relocalization sequence (a-b) and sample images from the challenging outdoor datasets used for evaluation.
  • EuRoC MAV: A standard public benchmark featuring 11 indoor sequences from a micro-aerial vehicle.
  • Custom Outdoor Sequences: Four large-scale datasets (875m to 2.8km) recorded via handheld or bicycle-mounted rigs. These sequences are particularly challenging due to forward-only motion and rapid turns.

Key Insights and Results

  • Parallelism and Latency: Separating high-frequency VIO from heavy-duty SLAM optimization ensures low-latency pose estimation while the map is corrected in the background.
  • Gravity Constraints: The IMU provides an absolute horizontal reference, significantly constraining optimization and preventing the "tilt" drift common in visual-only systems.
  • Global Accuracy: On outdoor sequences, the SLAM system dramatically reduced errors. For instance, checkpoint error dropped from 40.7m (VIO only) to 0.93m in one sequence.
  • Stereo Performance: Stereo configurations consistently outperformed monocular setups, providing more stable scale and higher accuracy.
  • Efficiency: The VIO frontend remains extremely fast, processing frames in 6–9ms.

Limitations and Future Work

Despite its robustness, the system struggles with extreme motion blur where the underlying VIO fails to track features. Additionally, very similar environments can still lead to "perceptual aliasing" and false loop closures. Future research will investigate "switchable constraints" to allow the pose graph to automatically reject outlier loops, further increasing robustness in repetitive environments.

Summary updated

BibTeX
@inproceedings{kasyanov2017keyframe,
  author = {Anton Kasyanov and Francis Engelmann and Jörg Stückler and Bastian Leibe},
  title = {{Keyframe-Based Visual-Inertial Online SLAM with Relocalization}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2017},
  doi = {10.1109/iros.2017.8206581},
}
Figure