RANSAC Consensus Line Fitting
Separate consensus inliers from outliers before refitting a line.
Free theory articleSeparate consensus inliers from outliers before refitting a line.
Concept & interpretation
Random Sample Consensus (RANSAC) is an iterative method used to estimate parameters of a mathematical model from a set of observed data that contains outliers. Unlike ordinary least squares which attempts to fit all data points, RANSAC separates the data into inliers and outliers based on a threshold and then fits the model only using the consensus set of inliers.
Experiment
Open the RANSAC Consensus Line Fitting module and verify the behavior of the deterministic consensus approach.
- Select the Dataset to "One outlier".
- Set the Residual threshold to 0.25 and the Trial budget to 1. Notice that the resulting refit slope is -7, matching our manual calculation.
- Increase the Trial budget to 6. The algorithm now tests more hypotheses, finding the true underlying line supported by the 5 clean points, resulting in a slope of 2.