[][src]Trait sample_consensus::Model

pub trait Model<Data> {
    fn residual(&self, data: &Data) -> f64;
}

A model is a best-fit of at least some of the underlying data. You can compute residuals in respect to the model.

Required methods

fn residual(&self, data: &Data) -> f64

Note that the residual error is returned as a 64-bit float. This allows the residual to be used for things other than sample consensus, such as optimization problems. For sample consensus, the residual should only be used to ensure it is within a threshold that roughly distinguishes inliers from outliers.

The returned residual should always be positive, with a lower residual being associated with higher probability of being an inlier rather than an outlier.

Loading content...

Implementors

Loading content...