Toroidal Constraints for Two-Point Localization Under High Outlier Ratios

Federico Camposeco, Torsten Sattler, Andrea Cohen, Andreas Geiger, Marc Pollefeys

Abstract

Image-based localization in large-scale environments often suffers from high outlier ratios due to repetitive visual features. This paper introduces a highly efficient geometric solver that estimates camera position using only two 2D-3D correspondences. By integrating a toroidal geometric constraint with "triangulation directions"—viewing rays stored within the 3D model—the proposed method functions as a rapid outlier filter. The solver operates in under one microsecond and demonstrates extreme robustness, handling outlier ratios exceeding 90% without requiring external sensor data such as gravity or camera height.

Introduction

Determining the precise location of a camera relative to a 3D map is a fundamental task in robotics and augmented reality. As 3D models scale to city-sized environments, the probability of incorrect feature matches increases significantly. In scenarios where the vast majority of matches are outliers, standard algorithms like RANSAC (Random Sample Consensus) struggle, requiring an exponential number of iterations to find a correct minimal set. Existing solutions often rely on auxiliary data, like inertial measurement units (IMUs) or known camera heights, which are not always available in crowdsourced or legacy datasets. This work addresses the challenge by exploiting geometric information inherent in the 3D models themselves.

Methodology

The Toroidal Constraint

A key geometric insight is that two 2D-3D correspondences do not uniquely determine a camera's position but instead constrain it to a specific surface. Specifically, the camera must lie on a torus (a donut-shaped surface) defined by the two 3D points and the angle between their corresponding 2D image features.

The toroidal constraint: (a) shows the geometric construction in 2D, while (b) illustrates the resulting 3D torus surface where the camera must reside.

The Triangulation Constraint

To disambiguate the camera's position on the torus, the authors introduce the "triangulation constraint." 3D points in Structure-from-Motion (SfM) models are generated by triangulating multiple original camera views. Each 3D point in the model is thus associated with the viewing directions of the cameras that originally observed it. The authors observe that the query camera is likely to have a similar viewing direction to the original camera that provided the best-matching descriptor for a given 3D point.

Illustration of the triangulation constraint: a 3D point is associated with multiple viewing directions from the original SfM model.

Efficient Solver and Outlier Filtering

Combining the toroidal and triangulation constraints leads to a complex mathematical system. While an exact solution involves a 32nd-degree polynomial, the authors derived an approximate solver that reduces the problem to two simple quadratic equations. This solver is exceptionally fast, executing in approximately 1 microsecond.

For outlier filtering, the system evaluates pairs of matches and uses an octree data structure to identify clusters of predicted camera positions. Matches that contribute to the most significant cluster are retained, while others are discarded as outliers. This pruning step allows a subsequent standard RANSAC process to converge almost instantly.

Experimental Results

Synthetic and Real-World Performance

The method was rigorously tested on synthetic data and the real-world Dubrovnik dataset, which contains 1.89 million 3D points.

  • Robustness: In synthetic tests, the filter maintained high precision and recall even at a 95% outlier ratio.
  • Accuracy: On the Dubrovnik benchmark, the method achieved a median translation error of 0.22 meters, significantly outperforming standard RANSAC+P3P (1.20m error).
  • Efficiency: The microsecond-scale solver allows for checking O(N²) match pairs efficiently, making it feasible for real-time applications even with thousands of initial matches.

Conclusion and Limitations

This research demonstrates that viewpoint variance, often seen as a hurdle in descriptor matching, can be leveraged as a powerful geometric cue. By utilizing stored triangulation rays, the proposed two-point solver provides a sensor-agnostic, high-speed filter for large-scale localization.

One limitation is that the solver is an approximation; while statistically sufficient for filtering, it is not an exact 6DOF solution. Additionally, the method's performance depends on the density of viewing directions in the 3D model. Future work may involve tighter integration of orientation data to further refine the initial pose estimate.

Summary updated

BibTeX
@inproceedings{camposeco2017toroidal,
  author = {Federico Camposeco and Torsten Sattler and Andrea Cohen and Andreas Geiger and Marc Pollefeys},
  title = {{Toroidal Constraints for Two-Point Localization Under High Outlier Ratios}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  doi = {10.1109/cvpr.2017.709},
}
Figure