AliceVision
Photogrammetric Computer Vision Framework
Public Types | Public Member Functions | List of all members
aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ > Class Template Reference

AContrario Kernel to solve a translation triplet & structure problem. More...

#include <TranslationTripletKernelACRansac.hpp>

Inheritance diagram for aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >:
aliceVision::robustEstimation::IRansacKernel< ModelT_ >

Public Types

using SolverT = SolverT_
 
using ErrorT = SolverT_
 
using ModelT = ModelT_
 

Public Member Functions

 TranslationTripletKernelACRansac (const Mat &x1, const Mat &x2, const Mat &x3, const std::vector< Mat3 > &vec_KRi, const Mat3 &K, const double ThresholdUpperBound)
 
std::size_t getMinimumNbRequiredSamples () const override
 Return the minimum number of required samples for the solver. More...
 
std::size_t getMaximumNbModels () const override
 Return the maximum number of models for the solver. More...
 
void fit (const std::vector< std::size_t > &samples, std::vector< ModelT_ > &models) const override
 This function is called to estimate the model from the minimum number of sample minSample (i.e. minimal problem solver). More...
 
double error (std::size_t sample, const ModelT_ &model) const override
 error More...
 
void errors (const ModelT_ &model, std::vector< double > &errors) const override
 Function that computes the estimation error for a given model and all the elements. More...
 
std::size_t nbSamples () const override
 
void unnormalize (ModelT_ &model) const override
 Function used to unnormalize the model. More...
 
double logalpha0 () const override
 
double errorVectorDimension () const override
 
Mat3 normalizer1 () const override
 
double thresholdNormalizer () const override
 
double unormalizeError (double val) const override
 
std::size_t getMinimumNbRequiredSamplesLS () const
 
void fitLS (const std::vector< std::size_t > &inliers, std::vector< ModelT > &models, const std::vector< double > *weights=nullptr) const
 This function is called to estimate the model using a least squared algorithm from a minimum of minSampleLS. More...
 
void computeWeights (const ModelT &model, const std::vector< std::size_t > &inliers, std::vector< double > &weights, const double eps=0.001) const
 Function used to estimate the weights, typically used by the least square algorithm. More...
 

Detailed Description

template<typename SolverT_, typename ErrorT_, typename ModelT_>
class aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >

AContrario Kernel to solve a translation triplet & structure problem.

Member Function Documentation

◆ computeWeights()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
void aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::computeWeights ( const ModelT &  model,
const std::vector< std::size_t > &  inliers,
std::vector< double > &  weights,
const double  eps = 0.001 
) const
inlinevirtual

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).

Implements aliceVision::robustEstimation::IRansacKernel< ModelT_ >.

◆ error()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
double aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::error ( std::size_t  sample,
const ModelT_ &  model 
) const
inlineoverridevirtual

error

Parameters
sample
model
Returns

Implements aliceVision::robustEstimation::IRansacKernel< ModelT_ >.

◆ errors()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
void aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::errors ( const ModelT_ &  model,
std::vector< double > &  errors 
) const
inlineoverridevirtual

Function that computes the estimation error for a given model and all the elements.

Parameters
[in]modelThe model to consider.
[out]vec_errorsThe vector containing all the estimation errors for every element.

Implements aliceVision::robustEstimation::IRansacKernel< ModelT_ >.

◆ fit()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
void aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::fit ( const std::vector< std::size_t > &  samples,
std::vector< ModelT_ > &  models 
) const
inlineoverridevirtual

This function is called to estimate the model from the minimum number of sample minSample (i.e. minimal problem solver).

Parameters
[in]samplesA vector containing the indices of the data to be used for the minimal estimation.
[out]modelsThe model(s) estimated by the minimal solver.

Implements aliceVision::robustEstimation::IRansacKernel< ModelT_ >.

◆ fitLS()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
void aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::fitLS ( const std::vector< std::size_t > &  inliers,
std::vector< ModelT > &  models,
const std::vector< double > *  weights = nullptr 
) const
inlinevirtual

This function is called to estimate the model using a least squared algorithm from a minimum of minSampleLS.

Parameters
[in]inliersAn array containing the indices of the data to use.
[out]modelsThe model(s) estimated using the least squared algorithm.
[in]weightsAn optional array of weights, one for each sample

Implements aliceVision::robustEstimation::IRansacKernel< ModelT_ >.

◆ getMaximumNbModels()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
std::size_t aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::getMaximumNbModels ( ) const
inlineoverride

Return the maximum number of models for the solver.

Returns
maximum number of models

◆ getMinimumNbRequiredSamples()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
std::size_t aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::getMinimumNbRequiredSamples ( ) const
inlineoverride

Return the minimum number of required samples for the solver.

Returns
minimum number of required samples

◆ unnormalize()

template<typename SolverT_ , typename ErrorT_ , typename ModelT_ >
void aliceVision::sfm::TranslationTripletKernelACRansac< SolverT_, ErrorT_, ModelT_ >::unnormalize ( ModelT_ &  model) const
inlineoverridevirtual

Function used to unnormalize the model.

Parameters
[in,out]modelThe model to unnormalize.

Implements aliceVision::robustEstimation::IRansacKernel< ModelT_ >.


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