Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::MeanDoubleRANSACEvaluator Class Reference

helper class for implementation of PreemptievRANSAC and COSAC for robust computation of the mean of a vector of doubles More...

#include <MathAlgo/Tests/MeanDoubleRANSACEvaluator.hh>

+ Inheritance diagram for BIAS::MeanDoubleRANSACEvaluator:
+ Collaboration diagram for BIAS::MeanDoubleRANSACEvaluator:

Public Member Functions

virtual bool GenerateSamples (const unsigned sample_index, const unsigned sample_size, const unsigned data_size, std::vector< unsigned > &which_samples)
 randomly generates the indizes of the samples used for computation of the solution. More...
 
unsigned GetMinNumSamplesForSolutionComputation () const
 Returns the minimum required samples for computation of a solution. More...
 
unsigned GetNumMeasurements () const
 Returns the number of available measurements. More...
 
int GetSampleSolutions (const std::vector< unsigned > &which_samples, std::vector< double > &solutions)
 Compute solution(s) for the given set of samples. More...
 
int Init (const std::vector< double > &data, const double &sigma3)
 
bool IsInlier (const double &solution, const unsigned data_index, double &score)
 Checks whether a certain sample (i.e. More...
 
 MeanDoubleRANSACEvaluator ()
 
bool RefineSolution (const std::vector< bool > &inliers, double &solution)
 Refine a solution based on the inliers vector. More...
 
virtual ~MeanDoubleRANSACEvaluator ()
 

Protected Member Functions

bool GenerateSamplesRandom_ (const unsigned sample_index, const unsigned sample_size, const unsigned data_size, std::vector< unsigned > &which_samples)
 purely random generation of sample indizes More...
 

Protected Attributes

std::vector< double > Data_
 
double Sigma3_
 

Detailed Description

helper class for implementation of PreemptievRANSAC and COSAC for robust computation of the mean of a vector of doubles

, TestPreemptiveRANSAC, RANSACEvaluatorInterface, COSAC, PreemptiveRANSAC

Author
woelk 01/2010 (c) www.vision-n.de

Definition at line 40 of file MeanDoubleRANSACEvaluator.hh.

Constructor & Destructor Documentation

BIAS::MeanDoubleRANSACEvaluator::MeanDoubleRANSACEvaluator ( )

Definition at line 75 of file MeanDoubleRANSACEvaluator.hh.

BIAS::MeanDoubleRANSACEvaluator::~MeanDoubleRANSACEvaluator ( )
virtual

Definition at line 104 of file MeanDoubleRANSACEvaluator.hh.

Member Function Documentation

virtual bool BIAS::RANSACEvaluatorInterface< double >::GenerateSamples ( const unsigned  sample_index,
const unsigned  sample_size,
const unsigned  data_size,
std::vector< unsigned > &  which_samples 
)
virtualinherited

randomly generates the indizes of the samples used for computation of the solution.

This function can be overloaded, for example when it is of advantage when the samples span a big area (for example in the image)

bool BIAS::RANSACEvaluatorInterface< double >::GenerateSamplesRandom_ ( const unsigned  sample_index,
const unsigned  sample_size,
const unsigned  data_size,
std::vector< unsigned > &  which_samples 
)
protectedinherited

purely random generation of sample indizes

unsigned BIAS::MeanDoubleRANSACEvaluator::GetMinNumSamplesForSolutionComputation ( ) const
inlinevirtual

Returns the minimum required samples for computation of a solution.

Implements BIAS::RANSACEvaluatorInterface< double >.

Definition at line 52 of file MeanDoubleRANSACEvaluator.hh.

Referenced by GetSampleSolutions(), and Init().

unsigned BIAS::MeanDoubleRANSACEvaluator::GetNumMeasurements ( ) const
inlinevirtual

Returns the number of available measurements.

Implements BIAS::RANSACEvaluatorInterface< double >.

Definition at line 50 of file MeanDoubleRANSACEvaluator.hh.

References Data_.

int BIAS::MeanDoubleRANSACEvaluator::GetSampleSolutions ( const std::vector< unsigned > &  which_samples,
std::vector< double > &  solutions 
)
inlinevirtual

Compute solution(s) for the given set of samples.

Returns
the number of solutions found.

The which_samples array will be of length sample_size, selecting the indices to be fit to from the subclass's data array.

Implements BIAS::RANSACEvaluatorInterface< double >.

Definition at line 133 of file MeanDoubleRANSACEvaluator.hh.

References Data_, GetMinNumSamplesForSolutionComputation(), and IsInlier().

int BIAS::MeanDoubleRANSACEvaluator::Init ( const std::vector< double > &  data,
const double &  sigma3 
)
bool BIAS::MeanDoubleRANSACEvaluator::IsInlier ( const double &  solution,
const unsigned  data_index,
double &  score 
)
inlinevirtual

Checks whether a certain sample (i.e.

data) is an inlier and computes the associated score. Good solutions result in a small score, bad solutions result in big scores. Scores may also be negative. It is often a good idea do define the score as the logarithm of some normalized distance measure.

Implements BIAS::RANSACEvaluatorInterface< double >.

Definition at line 109 of file MeanDoubleRANSACEvaluator.hh.

References Data_, BIAS::Equal(), and Sigma3_.

Referenced by GetSampleSolutions().

bool BIAS::MeanDoubleRANSACEvaluator::RefineSolution ( const std::vector< bool > &  inliers,
double &  solution 
)
inlinevirtual

Refine a solution based on the inliers vector.

Implements BIAS::RANSACEvaluatorInterface< double >.

Definition at line 170 of file MeanDoubleRANSACEvaluator.hh.

References Data_.

Member Data Documentation

std::vector<double> BIAS::MeanDoubleRANSACEvaluator::Data_
protected
double BIAS::MeanDoubleRANSACEvaluator::Sigma3_
protected

Definition at line 65 of file MeanDoubleRANSACEvaluator.hh.

Referenced by Init(), and IsInlier().


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