latest version v1.9 - last update 10 Apr 2010 |
This class estimates a transform using the Ransac algorithm. More...
#include <ltiRansacEstimator.h>
Classes | |
class | parameters |
The parameters for the class ransacEstimator. More... | |
Public Member Functions | |
ransacEstimator () | |
ransacEstimator (const parameters &par) | |
ransacEstimator (const ransacEstimator &other) | |
virtual | ~ransacEstimator () |
virtual const char * | getTypeName () const |
virtual bool | apply (const matrix< fpoint > &src, fvector &dest) const |
virtual bool | apply (const matrix< fpoint > &src, fvector &dest, fvector &error) const |
virtual bool | apply (const matrix< dpoint > &src, dvector &dest) const |
virtual bool | apply (const matrix< dpoint > &src, dvector &dest, dvector &error) const |
ransacEstimator & | copy (const ransacEstimator &other) |
ransacEstimator & | operator= (const ransacEstimator &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
This class estimates a transform using the Ransac algorithm.
The Ransac algorithm 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 ransac estimation in case of a bad estimation. For the homography estimators this may be performed by the homographyVerfication (coming up soon).
lti::ransacEstimator::ransacEstimator | ( | ) |
Default constructor.
lti::ransacEstimator::ransacEstimator | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::ransacEstimator::ransacEstimator | ( | const ransacEstimator & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::ransacEstimator::~ransacEstimator | ( | ) | [virtual] |
Destructor.
virtual bool lti::ransacEstimator::apply | ( | const matrix< dpoint > & | src, | |
dvector & | dest, | |||
dvector & | error | |||
) | const [virtual] |
Estimates a transform from the supplied point sets.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | std::vector<vector<dpoint> > with the point sets. | |
dest | dvector the estimated transform. | |
error | fvector containing the deviation of each point from the estimated transform. Usually this is the residual, also a if a squared residual is computed inside the transform estimator. |
Implements lti::monteCarloEstimator.
virtual bool lti::ransacEstimator::apply | ( | const matrix< dpoint > & | src, | |
dvector & | dest | |||
) | const [virtual] |
Estimates a transform from the supplied point sets.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | std::vector<vector<dpoint> > with the point sets. | |
dest | dvector the estimated transform. |
Implements lti::monteCarloEstimator.
virtual bool lti::ransacEstimator::apply | ( | const matrix< fpoint > & | src, | |
fvector & | dest, | |||
fvector & | error | |||
) | const [virtual] |
Estimates a transform from the supplied point sets.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | std::vector<vector<dpoint> > with the point sets. | |
dest | fvector the estimated transform. | |
error | fvector containing the deviation of each point from the estimated transform. Usually this is the residual, also a if a squared residual is computed inside the transform estimator. |
Implements lti::monteCarloEstimator.
virtual bool lti::ransacEstimator::apply | ( | const matrix< fpoint > & | src, | |
fvector & | dest | |||
) | const [virtual] |
Estimates a transform from the supplied point sets.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | std::vector<vector<dpoint> > with the point sets. | |
dest | fvector the estimated transform. |
Implements lti::monteCarloEstimator.
virtual functor* lti::ransacEstimator::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Implements lti::monteCarloEstimator.
ransacEstimator& lti::ransacEstimator::copy | ( | const ransacEstimator & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::monteCarloEstimator.
const parameters& lti::ransacEstimator::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::monteCarloEstimator.
virtual const char* lti::ransacEstimator::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("ransacEstimator").
Reimplemented from lti::monteCarloEstimator.
ransacEstimator& lti::ransacEstimator::operator= | ( | const ransacEstimator & | other | ) |
Alias for copy member.
other | the functor to be copied |
Reimplemented from lti::monteCarloEstimator.