Robust Fitting in Computer Vision: Easy or Hard?

Tat-Jun Chin, Zhipeng Cai, Frank Neumann

Abstract

Consensus maximization (MAXCON) is a cornerstone of robust model fitting in computer vision, yet its fundamental computational limits have long been debated. This paper provides a rigorous theoretical analysis of MAXCON, proving it to be NP-hard, W[1]-hard, and APX-hard. These results demonstrate that finding a globally optimal solution is fundamentally intractable for high-dimensional data or large outlier sets. However, the problem is shown to be Fixed-Parameter Tractable (FPT) with respect to the number of outliers, offering a narrow path for efficient global optimization in specific scenarios. These findings justify the continued reliance on randomized heuristics like RANSAC and suggest new directions for robust fitting research.

Introduction

In the field of computer vision, many tasks involve fitting a geometric model—such as a line, a plane, or a complex camera pose—to data that is inherently "dirty." Real-world data is frequently contaminated with noise and outliers that do not follow the underlying model. The standard approach to this challenge is consensus maximization (MAXCON). The goal of MAXCON is to identify the model parameters that maximize the number of "inliers," defined as data points that fall within a predefined distance $\epsilon$ of the model.

While the computer vision community has developed numerous "globally optimal" algorithms in recent years, a critical question remained: Is MAXCON fundamentally solvable in a reasonable timeframe, or have we merely been successful with small, low-dimensional datasets? This paper addresses this ambiguity by analyzing the computational complexity of the MAXCON problem through the lens of theoretical computer science.

Defining the Consensus Maximization Problem

To understand the complexity of MAXCON, one must first visualize the geometric constraints it imposes. The problem seeks a hyperplane (or more complex manifold) such that the maximum number of points lie within a "slab" of width $2\epsilon$.

Geometric representation of the consensus maximization problem, illustrating the inlier threshold epsilon and the arrangement of data points.

As shown in Figure 1, the choice of model parameters determines which points are counted as inliers. The discrete nature of this counting process, combined with the spatial distribution of data, is what introduces significant combinatorial complexity.

Methodology: Complexity Reductions

The authors employ complexity reductions to map known "hard" problems onto the MAXCON framework. By showing that an impossible-to-solve-quickly problem can be transformed into a MAXCON instance, they prove that MAXCON must be at least as difficult as the original problem. The analysis covers three critical dimensions of complexity:

  1. General Complexity (NP-hardness): Through a reduction from the $k$-SLAB problem, the authors prove that MAXCON is NP-hard. This means no algorithm can solve it in polynomial time relative to the total input size unless P=NP.
  2. Parametrized Complexity (W[1]-hardness): A common misconception was that if the dimension $d$ (e.g., 2D for lines, 6D for camera poses) is fixed, the problem becomes tractable. However, using a reduction from $k$-CLIQUE, the authors show MAXCON is W[1]-hard. This implies that the dimension $d$ will likely always remain in the exponent of the runtime (e.g., $O(N^d)$), making high-dimensional problems exponentially more difficult.
  3. Approximability (APX-hardness): The authors use an L-reduction from MAX-2SAT to prove that MAXCON is APX-hard. This is a significant result because it rules out the existence of a Polynomial Time Approximation Scheme (PTAS). In practical terms, it is impossible to efficiently find a solution guaranteed to be within a small percentage of the global optimum.

Key Insights and the "Outlier Exception"

The theoretical results presented in this paper highlight several "traps" for researchers:

  • The Dimension Trap: The W[1]-hardness result explains why algorithms that work for 2D line fitting fail spectacularly when applied to 6-degree-of-freedom camera pose estimation. As $d$ increases, the search space grows at a rate that quickly becomes unmanageable.
  • The Approximation Wall: Because the problem is APX-hard, practitioners cannot rely on finding "near-optimal" solutions quickly through general-purpose approximation algorithms.

However, the paper identifies a "silver lining" through Fixed-Parameter Tractability (FPT). MAXCON is shown to be FPT in the number of outliers ($o$) and the dimension ($d$). The runtime is approximately $O(d^o \text{poly}(N, d))$. This means that if a dataset is very large ($N$ is high) but the number of outliers is very small (e.g., $o < 10$), the global optimum can be found efficiently. Unfortunately, in typical computer vision tasks where outliers can exceed 50%, this result provides little relief.

Conclusion and Future Directions

The establishment of these four hardness results—NP-hard, W[1]-hard, APX-hard, and FPT in outliers—provides a definitive "reality check" for the field. While the proofs focus on linear models, the authors argue that non-linear geometric problems common in vision (like homographies or fundamental matrices) are likely even more complex, reinforcing the general applicability of these hardness results.

This analysis explains why randomized heuristics like RANSAC remain the industry standard: they are often the only practical choice for high-outlier, high-dimensional scenarios. The authors suggest that instead of pursuing universal global solvers, the community should pivot toward:

  1. Improved Heuristics: Refining RANSAC-style methods to be more efficient and robust.
  2. Preprocessing: Developing advanced "outlier removal" or "pruning" techniques to reduce the outlier count ($o$) before the fitting stage.
  3. Alternative Formulations: Investigating robust cost functions that might offer better mathematical properties than the discrete inlier count used in MAXCON.

By understanding the inherent hardness of the problem, researchers can better allocate their efforts toward tractable sub-problems and more effective heuristic strategies.

Summary updated

BibTeX
@inproceedings{chin2018robust,
  author = {Tat-Jun Chin and Zhipeng Cai and Frank Neumann},
  title = {{Robust Fitting in Computer Vision: Easy or Hard?}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01258-8\_43},
}
Figure