Gravity-aligned Rotation Averaging with Circular Regression

Linfei Pan, Marc Pollefeys, Dániel Baráth · DOI

Introduction

Structure-from-Motion (SfM) is a fundamental task in computer vision, aimed at reconstructing 3D scenes from collections of 2D images. While Incremental SfM offers high accuracy, it suffers from poor scalability. Global SfM provides a faster alternative but often struggles with accuracy during the rotation averaging phase. Rotation averaging involves estimating the absolute orientation of cameras from noisy relative rotations, typically treated as a non-linear optimization problem with three degrees of freedom (DoF) per camera.

This paper proposes a novel approach that leverages gravity direction—information readily available from Inertial Measurement Units (IMUs) in modern smartphones, drones, and AR headsets. By aligning cameras to a common gravity vector, the complex 3D rotation averaging problem is simplified into a 1D circular regression task, focusing solely on the unknown yaw (horizontal viewing angle).

Methodology

The core of the proposed method is the reduction of the search space from 3-DoF to 1-DoF. When the gravity vector is known, the tilt and roll of a camera are constrained, leaving only the rotation around the gravity axis (yaw) to be determined.

Circular Regression and Optimization

Because angles are periodic, standard linear regression is unsuitable. The authors employ circular regression based on the Von Mises distribution. A key innovation is an iterative optimization algorithm that solves for camera angles while simultaneously refining the $2\pi$ phase offsets (the "period"). Unlike previous methods that fix these offsets early, this approach can rectify period errors during optimization, enhancing robustness.

Handling Real-World Data

To address noise in IMU data, the system includes a majority-voting mechanism to identify and correct erroneous gravity vectors by analyzing local neighborhood consistency. Furthermore, the framework supports "hybrid" datasets containing both gravity-aligned and unaligned images, using a stratified approach to solve for 1-DoF and 3-DoF cameras concurrently.

Experimental Evaluation

The method was evaluated across four diverse datasets:

  • EuRoC: Drone footage with high-fidelity IMU data.
  • KITTI: A standard benchmark for autonomous driving.
  • LaMAR: A large-scale AR benchmark featuring indoor and outdoor smartphone/HoloLens data.
  • 1DSfM: Internet photo collections with synthetic gravity data to test robustness.

Results

The proposed method demonstrates significant improvements in both efficiency and precision:

  • Accuracy: On the KITTI dataset, the method improved orientation estimates by 13 AUC@1° points over standard SfM baselines and by 23 AUC points compared to existing planar pose graph techniques.
  • Efficiency: The algorithm is approximately 8 times faster than the state-of-the-art Theia library. It exhibits linear scaling, successfully processing synthetic datasets exceeding 100,000 images where competing methods often fail.
  • Robustness: The system maintains high accuracy even in the presence of 50% outliers in relative poses, a scenario where traditional methods like LAGO typically collapse.

Conclusion

By treating gravity as a primary hard constraint rather than a soft penalty, this work transforms rotation averaging into a more stable and efficient 1D problem. The resulting system is faster, more accurate, and more robust than traditional 3D solvers. The implementation is integrated into the GLOMAP library, available at https://github.com/colmap/glomap.

Summary updated

BibTeX
@inproceedings{pan2024gravity,
  author = {Linfei Pan and Marc Pollefeys and Dániel Baráth},
  title = {{Gravity-aligned Rotation Averaging with Circular Regression}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73661-2\_6},
}
Figure