Minimal Solutions for Panoramic Stitching Given Gravity Prior

Yaqing Ding, Daniel Barath, Zuzana Kukelova

TL;DR

By leveraging the gravity vector—easily obtained from modern smartphone IMUs—this paper introduces four new minimal solvers for panoramic image stitching. These solvers reduce the relative camera orientation from a complex 3-DOF problem to a simple 1-DOF yaw rotation, significantly decreasing the number of required point correspondences and leading to faster, more robust, and more accurate image alignment.

What Problem Does This Paper Address?

Panoramic image stitching is the process of combining multiple images taken from a single point into a wide-angle view. Traditionally, this involves estimating the camera's intrinsic parameters (like focal length) and its 3D rotation (3 degrees of freedom or DOF).

The standard pipeline relies on minimal solvers within a RANSAC framework to find the best alignment. However, estimating full 3-DOF rotation is computationally expensive and requires more point correspondences. The authors identify a missed opportunity: most people hold their phones vertically when taking panoramas, and modern devices have Inertial Measurement Units (IMUs) that can precisely measure the direction of gravity. By using this "gravity prior," the stitching problem can be simplified, yet existing state-of-the-art solvers haven't fully exploited this information.

Figure 1: Panorama stitching with known gravity vector g.

Methods

The authors propose four new minimal solvers tailored to different real-world camera configurations, all assuming the cameras are aligned with the gravity vector:

  1. H1f (Common Focal Length): For a single camera with a fixed focal length and no radial distortion. It requires only 1 point correspondence.
  2. H2f1f2 (Varying Focal Lengths): For cases like zooming between shots. It requires 2 point correspondences.
  3. H2λ (Common Focal Length & Distortion): For wide-angle lenses with unknown radial distortion. It requires 2 point correspondences.
  4. H3λ1λ2 (Varying Focal Length & Distortion): The most general case, requiring 3 point correspondences.

Technically, the authors use the Cayley parameterization to represent the unknown yaw rotation as a single variable. They also employ the one-parameter division model for radial distortion, which keeps the resulting polynomial equations simple enough to be solved in closed-form or via efficient techniques like Sturm sequences and Gröbner bases.

Datasets

The researchers evaluated their solvers using three distinct sources:

  • Synthetic Data: 1,000 pairs of generated images used to test resilience against image noise and IMU inaccuracies (roll/pitch noise).
  • SUN360 Dataset: A massive public dataset from which they generated over 579,800 image pairs to test performance at scale.
  • Smartphone Dataset: A new benchmark created by the authors using an iPhone 6s and iPhone 11 Pro, capturing 7,770 image pairs with synchronized IMU data.
Example scenes and stitching results from the SUN360 and Smartphone datasets.

Key Insights and Ideas

  • The Power of Priors: Knowing the vertical axis reduces the search space for rotation from a sphere to a circle. This simplification is the "secret sauce" that makes the math easier and the results more stable.
  • RANSAC Efficiency: The time RANSAC takes to find a solution grows exponentially with the number of points in a sample. By reducing the required points (e.g., from 4 points in standard H4 to just 1 point in H1f), the authors achieve a massive speedup in robust estimation.
  • Handling Distortion is Critical: The paper emphasizes that modeling radial distortion inside the minimal solver is essential for wide-angle lenses. Without it, the initial alignment is poor, and subsequent optimization (Bundle Adjustment) often fails to recover the correct geometry.

Key Results

The proposed solvers consistently outperformed state-of-the-art methods across all metrics:

  • Speed: The gravity-based solvers are significantly faster. For example, the H1f(G) solver is nearly real-time, completing in roughly 5 microseconds per estimation.
  • Robustness: As shown in Figure 5(b), the proposed solvers require far fewer RANSAC iterations to reach a solution, especially in high-outlier scenarios (where many point matches are wrong).
  • Accuracy: In real-world tests on the SUN360 dataset, the new solvers produced lower re-projection errors and more accurate focal length estimates than traditional 3-DOF solvers.
Cumulative distribution functions showing the proposed solvers (in blue/purple) reaching higher probability of success faster and with lower error.

Limitations and Future Work

While highly effective, the methods do rely on the quality of the IMU data. While the authors tested for "noisy" gravity vectors and found their solvers to be resilient up to 0.5° of tilt error, extremely poor IMU calibration could degrade performance.

Future work might involve integrating these solvers into more complex SLAM (Simultaneous Localization and Mapping) systems or exploring how to handle rolling shutter effects in combination with the gravity prior.

Summary updated

BibTeX
@misc{ding2020minimal,
  author = {Yaqing Ding and Daniel Barath and Zuzana Kukelova},
  title = {{Minimal Solutions for Panoramic Stitching Given Gravity Prior}},
  year = {2020},
  eprint = {2012.00465},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.00465},
}
Figure