latest version v1.9 - last update 10 Apr 2010 |
A parent class for estimating a transform from sets of points. More...
#include <ltiTransformEstimator.h>
Classes | |
class | parameters |
The parameters for the class transformEstimator. More... | |
Public Member Functions | |
transformEstimator () | |
transformEstimator (const parameters &par) | |
transformEstimator (const transformEstimator &other) | |
virtual | ~transformEstimator () |
virtual const char * | getTypeName () const |
virtual bool | apply (const matrix< ipoint > &src, fvector &dest) const =0 |
virtual bool | apply (const matrix< ipoint > &src, fvector &dest, fvector &error) const =0 |
virtual bool | apply (const matrix< ipoint > &src, fvector &dest, const ivector &indices, int numCorrespondences) const =0 |
virtual bool | apply (const matrix< ipoint > &src, fvector &dest, fvector &error, const ivector &indices, int numCorrespondences) const =0 |
virtual bool | apply (const matrix< fpoint > &src, fvector &dest) const =0 |
virtual bool | apply (const matrix< fpoint > &src, fvector &dest, fvector &error) const =0 |
virtual bool | apply (const matrix< fpoint > &src, fvector &dest, const ivector &indices, int numCorrespondences) const =0 |
virtual bool | apply (const matrix< fpoint > &src, fvector &dest, fvector &error, const ivector &indices, int numCorrespondences) const =0 |
virtual bool | apply (const matrix< dpoint > &src, dvector &dest) const =0 |
virtual bool | apply (const matrix< dpoint > &src, dvector &dest, dvector &error) const =0 |
virtual bool | apply (const matrix< dpoint > &src, dvector &dest, const ivector &indices, int numCorrespondences) const =0 |
virtual bool | apply (const matrix< dpoint > &src, dvector &dest, dvector &error, const ivector &indices, int numCorrespondences) const =0 |
virtual bool | computeResidual (const matrix< fpoint > &src, const fvector &transform, fvector &dest) const =0 |
virtual bool | computeResidual (const matrix< dpoint > &src, const dvector &transform, dvector &dest) const =0 |
virtual int | minNumberCorrespondences () const =0 |
virtual int | minCorrespondenceDimension () const =0 |
virtual int | maxCorrespondenceDimension () const =0 |
virtual bool | denormalize (fvector &srcdest, const vector< fpoint > &scale, const vector< fpoint > &shift) const =0 |
virtual bool | denormalize (dvector &srcdest, const vector< dpoint > &scale, const vector< dpoint > &shift) const =0 |
transformEstimator & | copy (const transformEstimator &other) |
transformEstimator & | operator= (const transformEstimator &other) |
virtual functor * | clone () const =0 |
const parameters & | getParameters () const |
A parent class for estimating a transform from sets of points.
For automtic outlier detection please use one of the Monte Carlo estimators, which call a transform estimator in their main loop. The Monte Carlo estimators perform data normalization on request, whereas this class does not.
If you derive a class please remember to support the paramter for returning a squared error measure (e.g. squared residual) instead of the error (e.g. residual), and thus spare taking the square root.
Also planned:
lti::transformEstimator::transformEstimator | ( | ) |
Default constructor.
lti::transformEstimator::transformEstimator | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::transformEstimator::transformEstimator | ( | const transformEstimator & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::transformEstimator::~transformEstimator | ( | ) | [virtual] |
Destructor.
virtual bool lti::transformEstimator::apply | ( | const matrix< dpoint > & | src, | |
dvector & | dest, | |||
dvector & | error, | |||
const ivector & | indices, | |||
int | numCorrespondences | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, whereby only the points specified in the index vector are considered.
Usually this method calls the apply without the residual first, and then computes the residual.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<dpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | dvector the estimated transform. | |
error | dvector containing the deviation of each point from the estimated transform. Usually this is the residual or elementwise squared residual. | |
indices | ivector with the indices of the relevant points. | |
numCorrespondences | the first numCorrespondences indices are considered. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< dpoint > & | src, | |
dvector & | dest, | |||
const ivector & | indices, | |||
int | numCorrespondences | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, whereby only the points specified in the index vector are considered.
This method is used by robost estimators using a monte carlo approach.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<dpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | dvector the estimated transform. | |
indices | which rows of the src matrix have to be considered. | |
numCorrespondences | the first numCorrespondences indices are considered. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< dpoint > & | src, | |
dvector & | dest, | |||
dvector & | error | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, where all points are considered.
Usually this method calls the apply without the residual first, and then computes the residual.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<dpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | dvector the estimated transform. | |
error | dvector containing the deviation of each point from the estimated transform. Usually this is the residual or elementwise squared residual. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< dpoint > & | src, | |
dvector & | dest | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, where all points are considered.
Please implement efficient code using iterators here. Not all robust estimators use a random sampling approach. Some estimators consider all input points and weight them according to their deviation from the transform computed at the prior iteration.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<dpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | dvector the estimated transform. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< fpoint > & | src, | |
fvector & | dest, | |||
fvector & | error, | |||
const ivector & | indices, | |||
int | numCorrespondences | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, whereby only the points specified in the index vector are considered.
Usually this method calls the apply without the residual first, and then computes the residual.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<fpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | fvector the estimated transform. | |
error | fvector containing the deviation of each point from the estimated transform. Usually this is the residual or elementwise squared residual. All correspondences are considered, discarding the valid indices. | |
indices | ivector with the indices of the relevant points. | |
numCorrespondences | the first numCorrespondences indices are considered. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< fpoint > & | src, | |
fvector & | dest, | |||
const ivector & | indices, | |||
int | numCorrespondences | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, whereby only the points specified in the index vector are considered.
This method is used by robost estimators using a monte carlo approach.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<dpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | fvector the estimated transform. | |
indices | ivector with the indices of the relevant points. | |
numCorrespondences | the first numCorrespondences indices are considered. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< fpoint > & | src, | |
fvector & | dest, | |||
fvector & | error | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, where all points are considered.
Usually this method calls the apply without the residual first, and then computes the residual.
src | matrix<fpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. All points of one point set give a matrix row, whereas all elements of a specific correspondence stand in a matrix column. | |
dest | fvector the estimated transform. | |
error | fvector containing the deviation of each point from the estimated transform. Usually this is the residual or elementwise squared residual. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< fpoint > & | src, | |
fvector & | dest | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, where all points are considered.
Please implement efficient code using iterators here. Not all robust estimators use a random sampling approach. Some estimators consider all input points and weight them according to their deviation from the transform computed at the prior iteration.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<fpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | fvector the estimated transform. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< ipoint > & | src, | |
fvector & | dest, | |||
fvector & | error, | |||
const ivector & | indices, | |||
int | numCorrespondences | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, whereby only the points specified in the index vector are considered.
Usually this method calls the apply without the residual first, and then computes the residual.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<ipoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | fvector the estimated transform. | |
error | fvector containing the deviation of each point from the estimated transform. Usually this is the residual or elementwise squared residual. All correspondences are considered, discarding the valid indices. | |
indices | ivector with the indices of the relevant points. | |
numCorrespondences | the first numCorrespondences indices are considered. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< ipoint > & | src, | |
fvector & | dest, | |||
const ivector & | indices, | |||
int | numCorrespondences | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, whereby only the points specified in the index vector are considered.
This method is used by robost estimators using a monte carlo approach.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<ipoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | fvector the estimated transform. | |
indices | ivector with the indices of the relevant points. | |
numCorrespondences | the first numCorrespondences indices are considered. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< ipoint > & | src, | |
fvector & | dest, | |||
fvector & | error | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, where all points are considered.
Usually this method calls the apply without the residual first, and then computes the residual.
src | matrix<ipoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. All points of one point set give a matrix row, whereas all elements of a specific correspondence stand in a matrix column. | |
dest | fvector the estimated transform. | |
error | fvector containing the deviation of each point from the estimated transform. Usually this is the residual or elementwise squared residual. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::apply | ( | const matrix< ipoint > & | src, | |
fvector & | dest | |||
) | const [pure virtual] |
Estimates a transform from the supplied point sets, where all points are considered.
Please implement efficient code using iterators here. Not all robust estimators use a random sampling approach. Some estimators consider all input points and weight them according to their deviation from the transform computed at the prior iteration.
All points of one point set give a matrix row, whereas all elements of a specifec correspondence stand in a matrix column.
src | matrix<ipoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
dest | fvector the estimated transform. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual functor* lti::transformEstimator::clone | ( | ) | const [pure virtual] |
Returns a pointer to a clone of this functor.
Implements lti::functor.
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::computeResidual | ( | const matrix< dpoint > & | src, | |
const dvector & | transform, | |||
dvector & | dest | |||
) | const [pure virtual] |
Compute the residual for the given correspondences and transformation vector.
src | matrix<dpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
transform | dvector with the transformation | |
dest | dvector with the residual |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::computeResidual | ( | const matrix< fpoint > & | src, | |
const fvector & | transform, | |||
fvector & | dest | |||
) | const [pure virtual] |
Compute the residual for the given correspondences and transformation vector.
src | matrix<fpoint> with the point sets. All points of the same image stand in a row. The correspondences in another image stand in the according columns. | |
transform | fvector with the transformation | |
dest | fvector with the residual |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
transformEstimator& lti::transformEstimator::copy | ( | const transformEstimator & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::denormalize | ( | dvector & | srcdest, | |
const vector< dpoint > & | scale, | |||
const vector< dpoint > & | shift | |||
) | const [pure virtual] |
A transform estimated on normalized data usually differs from the transform of the original data.
Considering the normalization performed this methods computes the transform which applies to the original data.
srcdest | the normalized transform. The result will be left here too. | |
scale | a vector containing the scale applied to each point set. | |
shift | a vector containing the shift of each scaled point set. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual bool lti::transformEstimator::denormalize | ( | fvector & | srcdest, | |
const vector< fpoint > & | scale, | |||
const vector< fpoint > & | shift | |||
) | const [pure virtual] |
A transform estimated on normalized data usually differs from the transform of the original data.
Considering the normalization performed this methods computes the transform which applies to the original data.
srcdest | the normalized transform. The result will be left here too. | |
scale | a vector containing the scale applied to each point set. | |
shift | a vector containing the shift of each scaled point set. |
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
const parameters& lti::transformEstimator::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::functor.
Reimplemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual const char* lti::transformEstimator::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("transformEstimator").
Reimplemented from lti::functor.
Reimplemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual int lti::transformEstimator::maxCorrespondenceDimension | ( | ) | const [pure virtual] |
Returns the maximum dimension of a correspondence, e.g.
the maximum dimension of a correspondence pair is 2, whereas transformEstimator running on n-tuples may allow an infinite number. Each derived transform estimator only works on correspondences of priori defined dimensions.
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual int lti::transformEstimator::minCorrespondenceDimension | ( | ) | const [pure virtual] |
Returns the mininum dimension of a correspondence, e.g.
the minimum dimension of a correspondence pair is 2. Each derived transform estimator only works on correspondences of priori defined dimensions.
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
virtual int lti::transformEstimator::minNumberCorrespondences | ( | ) | const [pure virtual] |
Returns the minimum number of correspondences required to estimate the transform.
Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.
transformEstimator& lti::transformEstimator::operator= | ( | const transformEstimator & | other | ) |
Alias for copy member.
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.