Model search implementations: RANSAC and genetic algorithm.
The type TModelFit is a user-supplied struct/class that implements this interface:
There are two methods provided in this class to fit a model:
For an example of usage, see "samples/model_search_test/"
Definition at line 65 of file model_search.h.
#include <mrpt/math/model_search.h>
Classes | |
| struct | TSpecies |
Public Member Functions | |
| template<typename TModelFit > | |
| bool | ransacSingleModel (const TModelFit &p_state, size_t p_kernelSize, const typename TModelFit::Real &p_fitnessThreshold, typename TModelFit::Model &p_bestModel, vector_size_t &p_inliers) |
| Run the ransac algorithm searching for a single model. More... | |
| template<typename TModelFit > | |
| bool | geneticSingleModel (const TModelFit &p_state, size_t p_kernelSize, const typename TModelFit::Real &p_fitnessThreshold, size_t p_populationSize, size_t p_maxIteration, typename TModelFit::Model &p_bestModel, vector_size_t &p_inliers) |
| Run a generic programming version of ransac searching for a single model. More... | |
Private Member Functions | |
| void | pickRandomIndex (size_t p_size, size_t p_pick, vector_size_t &p_ind) |
| Select random (unique) indices from the 0..p_size sequence. More... | |
| void | pickRandomIndex (std::set< size_t > p_set, size_t p_pick, vector_size_t &p_ind) |
| Select random (unique) indices from the set. More... | |
| bool mrpt::math::ModelSearch::geneticSingleModel | ( | const TModelFit & | p_state, |
| size_t | p_kernelSize, | ||
| const typename TModelFit::Real & | p_fitnessThreshold, | ||
| size_t | p_populationSize, | ||
| size_t | p_maxIteration, | ||
| typename TModelFit::Model & | p_bestModel, | ||
| vector_size_t & | p_inliers | ||
| ) |
Run a generic programming version of ransac searching for a single model.
Definition at line 97 of file model_search_impl.h.
References ASSERT_, and pickRandomIndex().

|
private |
Select random (unique) indices from the 0..p_size sequence.
Definition at line 19 of file model_search.cpp.
References ASSERT_.
Referenced by geneticSingleModel(), and ransacSingleModel().

|
private |
Select random (unique) indices from the set.
The set is destroyed during pick
Definition at line 35 of file model_search.cpp.
| bool mrpt::math::ModelSearch::ransacSingleModel | ( | const TModelFit & | p_state, |
| size_t | p_kernelSize, | ||
| const typename TModelFit::Real & | p_fitnessThreshold, | ||
| typename TModelFit::Model & | p_bestModel, | ||
| vector_size_t & | p_inliers | ||
| ) |
Run the ransac algorithm searching for a single model.
Definition at line 26 of file model_search_impl.h.
References ASSERT_, eps, min, and pickRandomIndex().

| Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |