LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::transformEstimator Class Reference

A parent class for estimating a transform from sets of points. More...

#include <ltiTransformEstimator.h>

Inheritance diagram for lti::transformEstimator:
Inheritance graph
[legend]
Collaboration diagram for lti::transformEstimator:
Collaboration graph
[legend]

List of all members.

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
transformEstimatorcopy (const transformEstimator &other)
transformEstimatoroperator= (const transformEstimator &other)
virtual functorclone () const =0
const parametersgetParameters () const

Detailed Description

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.

See also:
lti::homography8DOFEstimator, lti::homography9DOFEstimator, lti::fMatrixEstimator, lti::monteCarloEstimator

Also planned:


Constructor & Destructor Documentation

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.

Parameters:
other the object to be copied
virtual lti::transformEstimator::~transformEstimator (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

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.

Parameters:
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.
Returns:
true if the transform could be estimated and false otherwise.

Implemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.

virtual functor* lti::transformEstimator::clone (  )  const [pure virtual]
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.

Parameters:
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
Returns:
true on success and false otherwise.

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.

Parameters:
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
Returns:
true on success and false otherwise.

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.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

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.

Parameters:
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.

Parameters:
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
virtual const char* lti::transformEstimator::getTypeName (  )  const [virtual]
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]
transformEstimator& lti::transformEstimator::operator= ( const transformEstimator other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

Reimplemented in lti::fMatrixEstimator, lti::fMatrixEstimatorBase, lti::homography8DofEstimator, lti::homography9DofEstimator, lti::homographyEstimatorBase, and lti::translationScaleEstimator.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:57 2010 for LTI-Lib by Doxygen 1.6.1