#include <ransac.h>
Public Types | |
| typedef Problem | ProblemType |
| This typedef simply shadows template argument Problem. | |
| typedef Problem::ModelType | ResultType |
| This typedef indicates the type of model that will be estimated by the RANSAC algorithm. | |
Public Member Functions | |
| Ransac (ProblemType const &problem, size_t minimumConsensusSize=0, double requiredConfidence=0.99, double inlierProbability=0.5) | |
| This constructor sets up the Ransac instance so that it is ready to solve the model fitting problem, but does not run the RANSAC algorithm. | |
| virtual | ~Ransac () |
| The destructor cleans up any system resources and destroys *this. | |
| virtual ResultType | getResult () |
| This member function runs the RANSAC algorithm and returns the computed model. | |
Protected Member Functions | |
| void | computeConsensusSet (ResultType &model, std::vector< bool > &consensusFlags) |
| bool | estimate (ResultType &model) |
| bool | isConverged (std::vector< bool > const &consensusFlags, std::vector< bool > &previousConsensusFlags, size_t &consensusSetSize, size_t &previousConsensusSetSize, size_t &strikes) |
Protected Attributes | |
| size_t | m_minimumConsensusSize |
| size_t | m_numberOfRandomSampleSets |
| ProblemType | m_problem |
The template argument, Problem, provides all of the user-supplied problem-specific code, such as model estimation and error computation. The easiest way to do make an appropriate Problem class is to derive from class RansacProblem, below. For an example, see the file test/ransacTest.cpp.
[1] M. Fischler and R. Bolles. Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Graphics and Image Processing, 24(6):381--395, 1981.
Definition at line 52 of file ransac.h.
| typedef Problem dlr::computerVision::Ransac< Problem >::ProblemType |
| typedef Problem::ModelType dlr::computerVision::Ransac< Problem >::ResultType |
This typedef indicates the type of model that will be estimated by the RANSAC algorithm.
Its value is controlled by the user specified RansacProblem class.
| dlr::computerVision::Ransac< Problem >::Ransac | ( | ProblemType const & | problem, | |
| size_t | minimumConsensusSize = 0, |
|||
| double | requiredConfidence = 0.99, |
|||
| double | inlierProbability = 0.5 | |||
| ) | [inline] |
This constructor sets up the Ransac instance so that it is ready to solve the model fitting problem, but does not run the RANSAC algorithm.
| problem | This argument is a class instance implementing the RansacProblem interface, which provides all of the problem-specific code. | |
| minimumConsensusSize | This argument specifies the smallest set of "agreeing" samples that should be taken as proof that the correct model has been found (and grounds for terminating the algorithm). Setting this value to zero will make the Ransac constructor compute an appropriate value using arguments requiredConfidence and inlierProbability. | |
| requiredConfidence | This argument indicates how confident we need to be that one run of the RANSAC algorithm will find the correct model. It affects the number of iterations that the RANSAC algorithm will be allowed to run, as well as the automatically computed value for minimumConsensusSize (see above). | |
| inlierProbability | This argument indicates the likelihood that any particular input value (data point, sample, whatever) is an "inlier" for the purpose of estimating a model. If you had 10 sample points, and thought that 3 of them had excessive noise, then you would supply a value of 0.7 for this argument. It affects the number of iterations that the RANSAC algorithm will be allowed to run. |
| virtual dlr::computerVision::Ransac< Problem >::~Ransac | ( | ) | [inline, virtual] |
| virtual ResultType dlr::computerVision::Ransac< Problem >::getResult | ( | ) | [inline, virtual] |
1.5.8