Robust RANSAC

Automatic feature matching (using SIFT or ORB) invariably generates outliers—mismatched point pairs that do not follow the underlying geometry. Least-squares estimation is extremely sensitive to these; a single bad match can destroy the entire result.

The RANSAC Algorithm

Random Sample Consensus (RANSAC) solves this by iteratively sampling minimal subsets of data:

  1. Pick a random minimal set of points (4 for homography).
  2. Compute a candidate model $H$ from these points.
  3. Count how many other points are consistent with $H$ within a threshold $\epsilon$.
  4. Repeat $N$ times and keep the model with the highest consensus.

Statistical Guarantees

The number of iterations $N$ required to find an outlier-free set with probability $p$ is:

$N = \frac{\ln(1-p)}{\ln(1 - (1-e)^s)}$

Where $e$ is the outlier ratio and $s$ is the sample size.

Pro Insight: As the outlier ratio $e$ increases, $N$ explodes. For a 50% outlier ratio, $N$ is small (~72), but at 90%, it exceeds 46,000.
Max Iterations (N) 50
Inlier Threshold (ε) 3.0px
Inliers Found
0 / 50
Model Confidence
0%