[]Trait cv::Consensus

pub trait Consensus<E, Data> where
    E: Estimator<Data>,
    <Self::Inliers as IntoIterator>::Item == usize
{ type Inliers: IntoIterator; fn model<I>(
        &mut self,
        estimator: &E,
        data: I
    ) -> Option<<E as Estimator<Data>>::Model>
    where
        I: Iterator<Item = Data> + Clone
;
fn model_inliers<I>(
        &mut self,
        estimator: &E,
        data: I
    ) -> Option<(<E as Estimator<Data>>::Model, Self::Inliers)>
    where
        I: Iterator<Item = Data> + Clone
; }

A consensus algorithm extracts a consensus from an underlying model of data. This consensus includes a model of the data and which datapoints fit the model.

Note that all the consensus methods take a &mut self. This allows the consensus to store state such as an RNG or pre-allocted memory. This means multiple threads will be forced to create their own Consensus instance, which is most efficient.

Associated Types

type Inliers: IntoIterator

Iterator over the indices of the inliers in the clonable iterator.

Loading content...

Required methods

fn model<I>(
    &mut self,
    estimator: &E,
    data: I
) -> Option<<E as Estimator<Data>>::Model> where
    I: Iterator<Item = Data> + Clone

Takes a slice over the data and an estimator instance. It returns None if no valid model could be found for the data and Some if a model was found.

fn model_inliers<I>(
    &mut self,
    estimator: &E,
    data: I
) -> Option<(<E as Estimator<Data>>::Model, Self::Inliers)> where
    I: Iterator<Item = Data> + Clone

Takes a slice over the data and an estimator instance. It returns None if no valid model could be found for the data and Some if a model was found. It includes the inliers consistent with the model.

Loading content...

Implementors

impl<E, R, Data> Consensus<E, Data> for Arrsac<R> where
    E: Estimator<Data>,
    R: RngCore
[src]

type Inliers = Vec<usize>

Loading content...