AliceVision
Photogrammetric Computer Vision Framework
Public Member Functions | List of all members
aliceVision::robustEstimation::IRansacKernel< ModelT > Class Template Referenceabstract

A generic kernel used for the ACRANSAC / LORANSAC framework. More...

#include <IRansacKernel.hpp>

Public Member Functions

virtual std::size_t getMinimumNbRequiredSamples () const =0
 Return the minimum number of required samples for the solver. More...
 
virtual std::size_t getMinimumNbRequiredSamplesLS () const =0
 Return the minimum number of required samples for the solver Ls. More...
 
virtual std::size_t getMaximumNbModels () const =0
 Return the maximum number of models for the solver. More...
 
virtual void fit (const std::vector< std::size_t > &samples, std::vector< ModelT > &models) const =0
 This function is called to estimate the model from the minimum number of sample minSample (i.e. minimal problem solver). More...
 
virtual void fitLS (const std::vector< std::size_t > &inliers, std::vector< ModelT > &models, const std::vector< double > *weights=nullptr) const =0
 This function is called to estimate the model using a least squared algorithm from a minimum of minSampleLS. More...
 
virtual void computeWeights (const ModelT &model, const std::vector< std::size_t > &inliers, std::vector< double > &weights, const double eps=0.001) const =0
 Function used to estimate the weights, typically used by the least square algorithm. More...
 
virtual double error (std::size_t sample, const ModelT &model) const =0
 Function that computes the estimation error for a given model and a given element. More...
 
virtual void errors (const ModelT &model, std::vector< double > &errors) const =0
 Function that computes the estimation error for a given model and all the elements. More...
 
virtual void unnormalize (ModelT &model) const =0
 Function used to unnormalize the model. More...
 
virtual std::size_t nbSamples () const =0
 The number of elements in the data. More...
 
virtual double logalpha0 () const =0
 Get logalpha0, Alpha0 is used to make the error adaptive to the image size. More...
 
virtual double errorVectorDimension () const =0
 
virtual double unormalizeError (double val) const =0
 
virtual Mat3 normalizer1 () const =0
 
virtual double thresholdNormalizer () const =0
 

Detailed Description

template<typename ModelT>
class aliceVision::robustEstimation::IRansacKernel< ModelT >

A generic kernel used for the ACRANSAC / LORANSAC framework.

Template Parameters
ModelTThe class representing the model to estimate.
Note
Handle data normalization and compute the corresponding logalpha 0 that depends of the error model (point to line, or point to point)

Member Function Documentation

◆ computeWeights()

template<typename ModelT >
virtual void aliceVision::robustEstimation::IRansacKernel< ModelT >::computeWeights ( const ModelT &  model,
const std::vector< std::size_t > &  inliers,
std::vector< double > &  weights,
const double  eps = 0.001 
) const
pure virtual

Function used to estimate the weights, typically used by the least square algorithm.

Parameters
[in]modelThe model against which the weights are computed.
[in]inliersThe array of the indices of the data to be used.
[out]vec_weightsThe array of weight of the same size as inliers.
[in]epsAn optional threshold to max out the value of the threshold (typically to avoid division by zero or too small numbers).

Implemented in aliceVision::robustEstimation::PointFittingRansacKernel< SolverT_, ErrorT_, robustEstimation::Mat3Model, robustEstimation::UndefinedSolver< robustEstimation::Mat3Model > >, aliceVision::robustEstimation::PointFittingRansacKernel< SolverT_, ErrorT_, robustEstimation::Mat34Model, robustEstimation::UndefinedSolver< robustEstimation::Mat34Model > >, aliceVision::robustEstimation::PointFittingRansacKernel< SolverT_, ErrorT_, ModelT_, SolverLsT_ >, and aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >.

◆ error()

template<typename ModelT >
virtual double aliceVision::robustEstimation::IRansacKernel< ModelT >::error ( std::size_t  sample,
const ModelT &  model 
) const
pure virtual

◆ errors()

template<typename ModelT >
virtual void aliceVision::robustEstimation::IRansacKernel< ModelT >::errors ( const ModelT &  model,
std::vector< double > &  errors 
) const
pure virtual

◆ fit()

template<typename ModelT >
virtual void aliceVision::robustEstimation::IRansacKernel< ModelT >::fit ( const std::vector< std::size_t > &  samples,
std::vector< ModelT > &  models 
) const
pure virtual

◆ fitLS()

template<typename ModelT >
virtual void aliceVision::robustEstimation::IRansacKernel< ModelT >::fitLS ( const std::vector< std::size_t > &  inliers,
std::vector< ModelT > &  models,
const std::vector< double > *  weights = nullptr 
) const
pure virtual

◆ getMaximumNbModels()

template<typename ModelT >
virtual std::size_t aliceVision::robustEstimation::IRansacKernel< ModelT >::getMaximumNbModels ( ) const
pure virtual

◆ getMinimumNbRequiredSamples()

template<typename ModelT >
virtual std::size_t aliceVision::robustEstimation::IRansacKernel< ModelT >::getMinimumNbRequiredSamples ( ) const
pure virtual

◆ getMinimumNbRequiredSamplesLS()

template<typename ModelT >
virtual std::size_t aliceVision::robustEstimation::IRansacKernel< ModelT >::getMinimumNbRequiredSamplesLS ( ) const
pure virtual

Return the minimum number of required samples for the solver Ls.

Returns
minimum number of required samples

◆ logalpha0()

template<typename ModelT >
virtual double aliceVision::robustEstimation::IRansacKernel< ModelT >::logalpha0 ( ) const
pure virtual

◆ nbSamples()

template<typename ModelT >
virtual std::size_t aliceVision::robustEstimation::IRansacKernel< ModelT >::nbSamples ( ) const
pure virtual

◆ unnormalize()

template<typename ModelT >
virtual void aliceVision::robustEstimation::IRansacKernel< ModelT >::unnormalize ( ModelT &  model) const
pure virtual

The documentation for this class was generated from the following file: