Image Component Library (ICL)
|
Generic RANSAC (RAndom SAmpling Consensus) Implementation. More...
#include <RansacFitter.h>
Classes | |
struct | Result |
result structure More... | |
Public Types | |
typedef std::vector< DataPoint > | DataSet |
DataSet type (just a set of DataPoint instances) More... | |
typedef utils::Function< Model, const DataSet & > | ModelFitting |
Function for the fitting module (gets a dataset and returns the fitted model) More... | |
typedef utils::Function< icl64f, const Model &, const DataPoint & > | PointError |
Error function for single points. More... | |
Public Member Functions | |
RansacFitter () | |
empty constructor (creates a dummy instance) More... | |
RansacFitter (int minPointsForModel, int iterations, ModelFitting fitting, PointError err, icl64f maxModelDistance, int minClosePointsForGoodModel, icl64f minErrorExit=0) | |
constructor with given parameters More... | |
const Result & | fit (const DataSet &allPoints) |
fitting function (actual RANSAC algorithm) More... | |
Private Member Functions | |
void | find_random_consensus_set (DataSet &currConsensusSet, const DataSet &allPoints, std::vector< int > &usedIndices) |
internal utility method More... | |
Static Private Member Functions | |
static bool | find_in (const std::vector< int > &v, int i, int n) |
internal utility method More... | |
Private Attributes | |
int | m_minPointsForModel |
minimum points that are used to create a coarse model More... | |
int | m_iterations |
number of iterations More... | |
icl64f | m_maxModelDistance |
maximum distance of a point to the model to become an inlier More... | |
int | m_minClosePointsForGoodModel |
minimum amount of inliers for a 'good' model More... | |
ModelFitting | m_fitting |
fitting function More... | |
PointError | m_err |
point-model error function More... | |
icl64f | m_minErrorExit |
min error criterion for early exit More... | |
Result | m_result |
internal result buffer More... | |
Generic RANSAC (RAndom SAmpling Consensus) Implementation.
The RansacFitter provides a generic framework, for RANSAC based model fitting.
The RANSAC Algorithm is well described on Wikipedia
An example is given in the ICL Manual
The two tempalte parameters are kept very general. Therefore, there are just a few restrictions for the DataPoint and Model classes.
typedef std::vector<DataPoint> icl::math::RansacFitter< DataPoint, Model >::DataSet |
DataSet type (just a set of DataPoint instances)
typedef utils::Function<Model,const DataSet&> icl::math::RansacFitter< DataPoint, Model >::ModelFitting |
Function for the fitting module (gets a dataset and returns the fitted model)
typedef utils::Function<icl64f,const Model&,const DataPoint&> icl::math::RansacFitter< DataPoint, Model >::PointError |
Error function for single points.
|
inline |
empty constructor (creates a dummy instance)
|
inline |
constructor with given parameters
The parameters functionality is documented with the analogously named member variables
|
inlinestaticprivate |
internal utility method
|
inlineprivate |
internal utility method
|
inline |
fitting function (actual RANSAC algorithm)
|
private |
point-model error function
|
private |
fitting function
|
private |
number of iterations
|
private |
maximum distance of a point to the model to become an inlier
|
private |
minimum amount of inliers for a 'good' model
|
private |
min error criterion for early exit
|
private |
minimum points that are used to create a coarse model
|
private |
internal result buffer