Basic Image AlgorithmS Library
2.8.0
|
Interface for computation of solutions and evaluation of measurements. More...
#include <MathAlgo/RANSACEvaluatorInterface.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... | |
virtual unsigned | GetMinNumSamplesForSolutionComputation () const =0 |
Returns the minimum required samples for computation of a solution. More... | |
virtual unsigned | GetNumMeasurements () const =0 |
Returns the number of available measurements. More... | |
virtual int | GetSampleSolutions (const std::vector< unsigned > &which_samples, std::vector< SolutionType > &solutions)=0 |
Compute solution(s) for the given set of samples. More... | |
virtual bool | IsInlier (const SolutionType &solution, const unsigned data_index, double &score)=0 |
Checks whether a certain sample (i.e. More... | |
virtual bool | RefineSolution (const std::vector< bool > &inliers, SolutionType &solution)=0 |
Refine a solution based on the inliers vector. More... | |
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... | |
Interface for computation of solutions and evaluation of measurements.
This interface is used by the PreemptiveRANSAC and the COSAC classes and decouples the problem (for example Homography estimation) from the algorithm (for example PreemptiveRANSAC or Complete Sampling Consesus / COSAC).
A standard implementation for sample generation is also given.
, COSAC
Definition at line 44 of file RANSACEvaluatorInterface.hh.
|
virtual |
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)
Definition at line 98 of file RANSACEvaluatorInterface.hh.
|
protected |
purely random generation of sample indizes
Definition at line 110 of file RANSACEvaluatorInterface.hh.
References BIAS::Random::GetUniformDistributedInt().
|
pure virtual |
Returns the minimum required samples for computation of a solution.
Implemented in BIAS::MeanDoubleRANSACEvaluator.
|
pure virtual |
Returns the number of available measurements.
Implemented in BIAS::MeanDoubleRANSACEvaluator.
|
pure virtual |
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.
Implemented in BIAS::MeanDoubleRANSACEvaluator.
|
pure virtual |
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.
Implemented in BIAS::MeanDoubleRANSACEvaluator.
|
pure virtual |
Refine a solution based on the inliers vector.
Implemented in BIAS::MeanDoubleRANSACEvaluator.