A Quaternion-based Certifiably Optimal Solution to the Wahba Problem with Outliers

Heng Yang, Luca CarloneICCV 2019

Abstract

The Wahba problem, also known as rotation search, seeks to find the best rotation to align two sets of vector observations given putative correspondences, and is a fundamental routine in many computer vision and robotics applications. This work proposes the first polynomial-time certifiably optimal approach for solving the Wahba problem when a large number of vector observations are outliers. Our first contribution is to formulate the Wahba problem using a Truncated Least Squares (TLS) cost that is insensitive to a large fraction of spurious correspondences. The second contribution is to rewrite the problem using unit quaternions and show that the TLS cost can be framed as a Quadratically-Constrained Quadratic Program (QCQP). Since the resulting optimization is still highly non-convex and hard to solve globally, our third contribution is to develop a convex Semidefinite Programming (SDP) relaxation. We show that while a naive relaxation performs poorly in general, our relaxation is tight even in the presence of large noise and outliers. We validate the proposed algorithm, named QUASAR (QUAternion-based Semidefinite relAxation for Robust alignment), in both synthetic and real datasets showing that the algorithm outperforms RANSAC, robust local optimization techniques, global outlier-removal procedures, and Branch-and-Bound methods. QUASAR is able to compute certifiably optimal solutions (i.e. the relaxation is exact) even in the case when 95% of the correspondences are outliers.

Introduction

The Wahba problem is a cornerstone of spatial AI, used to find the best rotation to align two sets of vector observations. A classic example is aligning a satellite's star tracker data to a known celestial map. While closed-form solutions exist for data corrupted by simple Gaussian noise, they fail catastrophically in the presence of outliers—incorrect data associations caused by sensor glitches or feature-matching errors.

Existing approaches to handle outliers usually fall into three camps: stochastic methods like RANSAC, which lack guarantees and scale poorly; local optimization, which is prone to local minima; and global optimization like Branch-and-Bound, which can take exponential time. This paper introduces QUASAR, a polynomial-time algorithm that is both robust to extreme outliers and certifiable, meaning it can prove it has found the mathematically best possible solution.

Robust Estimation via Truncated Least Squares

To address the sensitivity of standard least squares to outliers, the authors propose using a Truncated Least Squares (TLS) cost function. Unlike the standard squared-error cost, which allows a single large outlier to significantly pull the solution away from the truth, the TLS cost "ignores" any measurement whose error exceeds a certain threshold by treating it as a constant cost.

Comparison of standard Least Squares and Truncated Least Squares (TLS) costs.

As shown in Figure 1, the TLS cost function levels off for large residuals, effectively categorizing points as either inliers or outliers. This formulation allows the algorithm to remain focused on the consensus of the inlier set.

The QUASAR Algorithm

The QUASAR algorithm (QUAternion-based Semidefinite relAxation for Robust alignment) relies on three key mathematical innovations:

  1. Binary Cloning: To handle the "either/or" nature of the TLS cost, the authors introduce binary variables (\pm 1) for each measurement. This allows the problem to be rewritten as a Quadratically-Constrained Quadratic Program (QCQP).
  2. Unit Quaternions: By representing the rotation as a unit quaternion ($S^3$ manifold) instead of a rotation matrix ($SO(3)$), the authors simplify the constraints of the optimization problem.
  3. Tight SDP Relaxation: While QCQPs are generally NP-hard, the authors relax the problem into a Semidefinite Program (SDP). By adding redundant quadratic constraints, they ensure the relaxation is "tight," allowing the solver to recover the exact global optimum even in high-noise scenarios.

Experimental Validation and Results

The authors validated QUASAR using a mix of synthetic and real-world data, including random unit vectors, the Stanford "Bunny" point cloud, and the PASSTA image dataset.

Performance of QUASAR across synthetic datasets, point cloud registration, and real-world image stitching.

Key results include:

  • Extreme Robustness: QUASAR remains certifiably optimal even when 95% of the correspondences are outliers. In contrast, competing methods like Fast Global Registration (FGR) begin to fail when outliers exceed 70-80%.
  • Superior Accuracy: In synthetic tests with 90% outliers, QUASAR consistently returned rotation errors near zero, while RANSAC often converged to poor local solutions.
  • Real-World Success: In an image stitching task using the "Lunch Room" sequence from the PASSTA dataset with a 66% outlier rate, QUASAR successfully aligned the images, whereas standard M-estimator SAmple Consensus (MSAC) failed.

Discussion and Conclusion

QUASAR provides a "gold standard" for rotation search by offering certifiability. If the resulting solution matrix is rank-1, there is a mathematical proof that the global optimum has been found. While the algorithm currently faces computational overhead compared to RANSAC—taking between 500 and 1200 seconds for 100 correspondences using the MOSEK solver—future work on specialized SDP solvers could enable real-time applications in robotics. Furthermore, the "binary cloning" and redundant constraint techniques introduced here could be extended to other fundamental geometric problems, such as Pose Graph Optimization and SLAM.

Summary updated

BibTeX
@inproceedings{yang2019quaternion,
  author = {Heng Yang and Luca Carlone},
  title = {{A Quaternion-based Certifiably Optimal Solution to the Wahba Problem with Outliers}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  url = {https://openreview.net/forum?id=4XBTJ7dfWA},
}
Figure