Basic Image AlgorithmS Library
2.8.0
|
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>
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_ |
helper class for implementation of PreemptievRANSAC and COSAC for robust computation of the mean of a vector of doubles
, TestPreemptiveRANSAC, RANSACEvaluatorInterface, COSAC, PreemptiveRANSAC
Definition at line 40 of file MeanDoubleRANSACEvaluator.hh.
BIAS::MeanDoubleRANSACEvaluator::MeanDoubleRANSACEvaluator | ( | ) |
Definition at line 75 of file MeanDoubleRANSACEvaluator.hh.
|
virtual |
Definition at line 104 of file MeanDoubleRANSACEvaluator.hh.
|
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)
|
protectedinherited |
purely random generation of sample indizes
|
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().
|
inlinevirtual |
Returns the number of available measurements.
Implements BIAS::RANSACEvaluatorInterface< double >.
Definition at line 50 of file MeanDoubleRANSACEvaluator.hh.
References Data_.
|
inlinevirtual |
Compute solution(s) for the given set of samples.
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 | ||
) |
Definition at line 81 of file MeanDoubleRANSACEvaluator.hh.
References Data_, GetMinNumSamplesForSolutionComputation(), and Sigma3_.
|
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().
|
inlinevirtual |
Refine a solution based on the inliers vector.
Implements BIAS::RANSACEvaluatorInterface< double >.
Definition at line 170 of file MeanDoubleRANSACEvaluator.hh.
References Data_.
|
protected |
Definition at line 64 of file MeanDoubleRANSACEvaluator.hh.
Referenced by GetNumMeasurements(), GetSampleSolutions(), Init(), IsInlier(), and RefineSolution().
|
protected |
Definition at line 65 of file MeanDoubleRANSACEvaluator.hh.
Referenced by Init(), and IsInlier().