API reference
API reference
Select your platform
No SDKs available
No versions available

RandomSampleConsensus Class

Class implementing the Random Sample Consensus (RANSAC) algorithm for a generic data type.
RANSAC is an iterative non-deterministic algorithm used for fitting estimation in the presence of a large number of outliers in the data.
Others
TModel
The type of the model being fitted to the data.

Member Functions

Delegate for generating a model from a pair of samples, represented by their indices.
Parameters
index1
The first sample index.
index2
The second sample index.
Returns
A model generated from the provided indices.
Delegate for evaluating the agreement score of a model with respect to the entire dataset.
Parameters
model
The model to be evaluated.
modelSet
The set of all generated models for comparison.
Returns
The score representing the model's agreement with the data.
Initializes a new instance of the RandomSampleConsensus class.
Parameters
maxDataPoints
The total number of sample points.
exclusionZone
The threshold to avoid selecting samples too close to each other.
Calculates the best fitting model based on the RANSAC algorithm.
Parameters
modelGenerator
The function to generate models from data points.
modelScorer
The function to evaluate the agreement score of a model.
Returns
The model that best fits the data according to the RANSAC algorithm.
Calculates the best fitting model based on the RANSAC algorithm.
Parameters
modelGenerator
The function to generate models from data points.
modelScorer
The function to evaluate the agreement score of a model.
dataPointsCount
The number of data points to evaluate.
Returns
The model that best fits the data according to the RANSAC algorithm.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon