Abstract
Estimating the relative pose between cameras is a cornerstone of Structure-from-Motion (SfM) and SLAM. However, real-world applications often involve scenarios where only one camera's internal parameters are known, such as matching a smartphone photo to a calibrated 3D map. This paper introduces a novel approach that leverages the gravity sensor (IMU) found in modern smartphones to simplify this problem. We present a minimal 4-point solver ($E4f_s$) that estimates relative pose and unknown focal length by aligning camera axes with the gravity vector. Our method is significantly faster, more accurate, and more robust to geometric degeneracies than existing 6-point or 7-point solvers. Evaluation on synthetic data, the KITTI dataset, and a new dedicated smartphone dataset demonstrates the practical advantages of our approach in mobile vision tasks.
Introduction
Relative pose estimation—determining the rotation and translation between two camera views—is essential for 3D reconstruction. Standard methods typically assume both cameras are calibrated. In practice, however, one image might come from a "calibrated" source (like a pre-built 3D model or a database with known EXIF data), while the second image (e.g., a user-submitted smartphone photo) might have an unknown focal length due to cropping, resizing, or missing metadata.
Existing solvers for this "one calibrated, one uncalibrated" case often require at least six point correspondences and are prone to failure in common "degenerate" configurations, such as parallel optical axes. This research addresses these limitations by incorporating a "gravity prior" available from ubiquitous smartphone IMUs.
Methodology
The core innovation of this work is the use of gravity as a common reference frame to reduce the complexity of the relative pose problem.
Gravity Alignment
By using the gravity vector to align the vertical ($y$) axes of both cameras, the unknown rotation is reduced from three degrees of freedom to a single yaw angle around the gravity vector. This simplification allows for a more efficient mathematical formulation.
Proposed Solvers
- Minimal 4-Point Solver ($E4f_s$): With gravity alignment, only four point correspondences are required to solve for the relative pose and the unknown focal length. We formulate this as a system of polynomial equations and solve it using the "hidden variable method," which transforms the problem into a polynomial eigenvalue problem.
- Linear Non-minimal Solver ($E6l$): For scenarios with more than six points, we provide a linear solver that is ideal for refining estimates during the local optimization phase of a RANSAC loop.
Experimental Evaluation
The proposed solvers were rigorously tested against synthetic data and two real-world datasets: the KITTI autonomous driving benchmark and a newly collected "PHONE" dataset consisting of over 12,000 image pairs with ground truth poses and synchronized IMU data.
Key Results
- Efficiency: The $E4f_s$ solver is extremely fast, executing in approximately 38–51 microseconds. This is a significant improvement over existing gravity-based essential matrix solvers.
- Accuracy: On the PHONE dataset, our method achieved a median rotation error of 0.57°, vastly outperforming the 4.93° error seen with standard 7-point fundamental matrix solvers.
- Robustness: Because the solver requires fewer points (4 vs. 7), it significantly reduces the number of RANSAC iterations needed to find a consensus set. On the KITTI dataset, our method required an average of 100 iterations, compared to nearly 800 for state-of-the-art alternatives.
Discussion and Conclusion
The use of gravity as a "cheat code" for geometry provides a powerful advantage in mobile computer vision. By reducing the search space, our solvers avoid many of the mathematical ambiguities that plague traditional methods. While the approach depends on the accuracy of smartphone IMUs and their calibration with the camera, the results show that modern hardware is more than capable of supporting this technique. Future work will focus on integrating these solvers into large-scale SfM pipelines to enhance the speed and reliability of 3D mapping services.
Summary updated