A General and Simple Method for Camera Pose and Focal Length Determination

Yinqiang Zheng, Shigeki Sugimoto, Imari Sato, Masatoshi OkutomiCVPR 2014

Abstract

In this paper, we revisit the pose determination problem of a partially calibrated camera with unknown focal length, hereafter referred to as the PnPf problem, by using n(n ≥ 4) 3D-to-2D point correspondences. Our core contribution is to introduce the angle constraint and derive a compact bivariate polynomial equation for each point triplet. Based on this polynomial equation, we propose a truly general method for the PnPf problem, which is suited both to the minimal 4-point based RANSAC application, and also to large scale scenarios with thousands of points, irrespective of the 3D point configuration. In addition, by solving bivariate polynomial systems via the Sylvester resultant, our method is very simple and easy to implement. Experiment results have demonstrated its superiority in accuracy and efficiency when compared with the existing state-of-the-art solutions.

Introduction

The Perspective-n-Point (PnP) problem is a cornerstone of computer vision, essential for determining camera pose relative to a known 3D model. While standard PnP assumes full calibration, many practical applications—such as structure-from-motion with uncalibrated internet photos or real-time tracking with zooming lenses—require estimating the focal length ($f$) alongside pose. This is the PnPf problem. Existing solutions often face a trade-off between computational complexity, numerical stability, and geometric constraints (e.g., requiring non-planar points). This work introduces a unified framework that is efficient, stable, and general across point configurations.

Methodology: The Angle Constraint

The primary innovation of this method is the shift from distance-ratio constraints to an angle constraint. The algorithm follows a multi-step process:

  1. Intermediate Coordinate System: An intermediate frame is established using two 3D points, allowing for the separation of the rotation axis and the rotation angle estimation.
  2. Geometric Invariance: The method leverages the fact that the angle between vectors from the camera center to 3D points is invariant across coordinate systems.
  3. Polynomial Formulation: By applying the angle constraint, the authors derive a compact bivariate polynomial for each point triplet. Crucially, this formulation reduces the highest degree of the focal length variable ($w = f^2$) from 4 to 3. This degree reduction is vital for improving numerical stability and reducing spurious solutions.
Geometric configuration of the PnPf problem illustrating the angle constraint between 3D points and the camera center.

For the minimal 4-point case, the system is solved using the Sylvester resultant and a characteristic polynomial technique, resulting in a highly optimized solver (GP4Pf-CP). For larger datasets, the method minimizes the sum of squared errors across all triplets, followed by a Gauss-Newton refinement to ensure optimal precision.

Experimental Results

The proposed method was rigorously tested against synthetic datasets and real-world imagery.

Efficiency and Scalability

The C-implemented 4-point solver is exceptionally fast, requiring only 26.8 microseconds per iteration, making it ideal for RANSAC-based outlier rejection. The general solver (GPnPf) exhibits $O(n)$ complexity, ensuring scalability for large-scale point clouds.

Accuracy and Robustness

Synthetic tests under varying Gaussian image noise (0.5 to 5 pixels) demonstrate that the proposed GPnPf+GN method consistently outperforms state-of-the-art solutions like UPnPf and DLT. As shown in the performance plots, the method maintains lower rotation, translation, and focal length errors across different noise levels and point counts.

Comparison of rotation, translation, focal length, and reprojection errors under varying Gaussian image noise levels for different PnPf solvers.

Conclusion

This paper presents a general, simple, and efficient solution to the PnPf problem. By introducing the angle constraint and a compact bivariate polynomial formulation, the authors have created a solver that is both numerically stable and computationally fast. Its ability to handle both planar and non-planar configurations in a unified framework makes it a robust choice for modern computer vision pipelines in augmented reality and 3D reconstruction.

Summary updated

BibTeX
@inproceedings{zheng2014general,
  author = {Yinqiang Zheng and Shigeki Sugimoto and Imari Sato and Masatoshi Okutomi},
  title = {{A General and Simple Method for Camera Pose and Focal Length Determination}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2014},
  url = {https://openreview.net/forum?id=ByELgkzd-B},
}
Figure