last update 20 Sep 2009 |
#include <cvrRansacEstimation.h>
Classes | |
class | parameters |
The parameters for the class ransacEstimation. More... | |
Public Member Functions | |
ransacEstimation () | |
ransacEstimation (const parameters &par) | |
ransacEstimation (const ransacEstimation< E > &other) | |
virtual | ~ransacEstimation () |
template<class P > | |
bool | apply (const std::vector< P > &setA, const std::vector< P > &setB, typename E::parameters &result) const |
template<class P > | |
bool | apply (const std::vector< P > &setA, const std::vector< P > &setB, ivector &inliers, typename E::parameters &result) const |
ransacEstimation< E > & | copy (const ransacEstimation< E > &other) |
ransacEstimation< E > & | operator= (const ransacEstimation< E > &other) |
virtual const std::string & | name () const |
virtual ransacEstimation< E > * | clone () const |
virtual ransacEstimation< E > * | newInstance () const |
const parameters & | getParameters () const |
virtual bool | updateParameters () |
This class estimates a transform E using the RANSAC algorithm, which is a robust estimation approach that maximizes the number of inliers. At each iteration a subset of points/correspondences is drawn from which the transform is computed.
Theoretically the RANSAC algorithm copes with up to 90% outliers. It is advised though, to verify the estimated transform and repeat the estimation in case the result is not satisfactory.
The template type E corresponds to a basic estimation class like:
In any case, it is expected for that class E to provide the methods
cvr::ransacEstimation< E >::ransacEstimation | ( | ) |
Default constructor.
cvr::ransacEstimation< E >::ransacEstimation | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
cvr::ransacEstimation< E >::ransacEstimation | ( | const ransacEstimation< E > & | other | ) |
virtual cvr::ransacEstimation< E >::~ransacEstimation | ( | ) | [virtual] |
Destructor.
bool cvr::ransacEstimation< E >::apply | ( | const std::vector< P > & | setA, | |
const std::vector< P > & | setB, | |||
ivector & | inliers, | |||
typename E::parameters & | result | |||
) | const [inline] |
Estimates the transformation for the given set of correspondences.
It will be assumed that for any valid index i the point setA[i] has a correspondent point setB[i].
setA | first set of points of type P. | |
setB | second set of points of type P. | |
inliers | output container with the indices of the inliers detected | |
dest | std::vector<P> where the result will be left. |
bool cvr::ransacEstimation< E >::apply | ( | const std::vector< P > & | setA, | |
const std::vector< P > & | setB, | |||
typename E::parameters & | result | |||
) | const [inline] |
Estimates the transformation for the given set of correspondences.
It will be assumed that for any valid index i the point setA[i] has a correspondent point setB[i].
setA | first set of points of type P. | |
setB | second set of points of type P. | |
dest | std::vector<P> where the result will be left. |
virtual ransacEstimation<E>* cvr::ransacEstimation< E >::clone | ( | ) | const [virtual] |
ransacEstimation<E>& cvr::ransacEstimation< E >::copy | ( | const ransacEstimation< E > & | other | ) |
const parameters& cvr::ransacEstimation< E >::getParameters | ( | ) | const |
virtual const std::string& cvr::ransacEstimation< E >::name | ( | ) | const [virtual] |
virtual ransacEstimation<E>* cvr::ransacEstimation< E >::newInstance | ( | ) | const [virtual] |
ransacEstimation<E>& cvr::ransacEstimation< E >::operator= | ( | const ransacEstimation< E > & | other | ) |
virtual bool cvr::ransacEstimation< E >::updateParameters | ( | ) | [virtual] |