JA EN

RANSAC

Random Sample Consensus. An iterative algorithm for robustly estimating model parameters from data containing outliers. Essential for homography estimation and 3D point cloud fitting in computer vision.

RANSAC (Random Sample Consensus), proposed by Fischler and Bolles in 1981, is a robust estimation algorithm designed to fit models to data contaminated with a significant proportion of outliers. Unlike least-squares methods that treat all data points equally and are easily corrupted by outliers, RANSAC iteratively identifies the largest subset of data consistent with a hypothesized model.

The algorithm follows a straightforward procedure: randomly select the minimum number of points required to define the model, compute the model parameters from this minimal set, then count how many remaining data points (inliers) fall within a distance threshold of the model. This process repeats for a predetermined number of iterations, and the model with the most inliers is selected as the final result.

In computer vision, RANSAC is the standard method for estimating homographies and fundamental matrices after feature matching. OpenCV's cv2.findHomography() internally runs RANSAC and returns both the transformation matrix and an outlier mask, enabling downstream processing to use only geometrically consistent correspondences.

Related Terms

Related Articles