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

lti::fMatrixEstimator Class Reference

A class for estimating the fundamental matrix with a least squares approach. More...

#include <ltiFMatrixEstimator.h>

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

List of all members.

Classes

class  parameters
 The parameters for the class fMatrixEstimator. More...

Public Member Functions

 fMatrixEstimator ()
 fMatrixEstimator (const parameters &par)
 fMatrixEstimator (const fMatrixEstimator &other)
virtual ~fMatrixEstimator ()
virtual const char * getTypeName () const
virtual bool apply (const matrix< ipoint > &src, fvector &dest) const
virtual bool apply (const matrix< ipoint > &src, fvector &dest, fvector &error) const
virtual bool apply (const matrix< ipoint > &src, fvector &dest, const ivector &indices, int numCorrespondences) const
virtual bool apply (const matrix< ipoint > &src, fvector &dest, fvector &error, const ivector &indices, int numCorrespondences) 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< fpoint > &src, fvector &dest, const ivector &indices, int numCorrespondences) const
virtual bool apply (const matrix< fpoint > &src, fvector &dest, fvector &error, const ivector &indices, int numCorrespondences) const
virtual bool apply (const matrix< dpoint > &src, dvector &dest) const
virtual bool apply (const matrix< dpoint > &src, dvector &dest, dvector &error) const
virtual bool apply (const matrix< dpoint > &src, dvector &dest, const ivector &indices, int numCorrespondences) const
virtual bool apply (const matrix< dpoint > &src, dvector &dest, dvector &error, const ivector &indices, int numCorrespondences) const
virtual bool computeResidual (const matrix< fpoint > &src, const fvector &transform, fvector &dest) const
virtual bool computeResidual (const matrix< dpoint > &src, const dvector &transform, dvector &dest) const
virtual int minNumberCorrespondences () const
virtual int minCorrespondenceDimension () const
virtual int maxCorrespondenceDimension () const
bool denormalize (fvector &srcdest, const vector< fpoint > &scale, const vector< fpoint > &shift) const
bool denormalize (dvector &srcdest, const vector< dpoint > &scale, const vector< dpoint > &shift) const
bool convert (const fvector &src, fmatrix &dest) const
bool convert (const dvector &src, dmatrix &dest) const
fMatrixEstimatorcopy (const fMatrixEstimator &other)
fMatrixEstimatoroperator= (const fMatrixEstimator &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

A class for estimating the fundamental matrix with a least squares approach.


Constructor & Destructor Documentation

lti::fMatrixEstimator::fMatrixEstimator (  ) 

Default constructor.

lti::fMatrixEstimator::fMatrixEstimator ( const parameters par  ) 

Construct a functor using the given parameters.

lti::fMatrixEstimator::fMatrixEstimator ( const fMatrixEstimator other  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

virtual bool lti::fMatrixEstimator::apply ( const matrix< dpoint > &  src,
dvector dest,
dvector error,
const ivector indices,
int  numCorrespondences 
) const [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 apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< dpoint > &  src,
dvector dest,
const ivector indices,
int  numCorrespondences 
) const [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 ivector with the indices of the relevant points.
numCorrespondences the first numCorrespondences indices are considered.
Returns:
true if apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< dpoint > &  src,
dvector dest,
dvector error 
) const [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 apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< dpoint > &  src,
dvector dest 
) const [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 apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< fpoint > &  src,
fvector dest,
fvector error,
const ivector indices,
int  numCorrespondences 
) const [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.
indices ivector with the indices of the relevant points.
numCorrespondences the first numCorrespondences indices are considered.
Returns:
true if apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< fpoint > &  src,
fvector dest,
const ivector indices,
int  numCorrespondences 
) const [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<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.
indices ivector with the indices of the relevant points.
numCorrespondences the first numCorrespondences indices are considered.
Returns:
true if apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< fpoint > &  src,
fvector dest,
fvector error 
) const [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<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.
Returns:
true if apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< fpoint > &  src,
fvector dest 
) const [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 apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< ipoint > &  src,
fvector dest,
fvector error,
const ivector indices,
int  numCorrespondences 
) const [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.
indices ivector with the indices of the relevant points.
numCorrespondences the first numCorrespondences indices are considered.
Returns:
true if apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< ipoint > &  src,
fvector dest,
const ivector indices,
int  numCorrespondences 
) const [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 apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< ipoint > &  src,
fvector dest,
fvector error 
) const [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<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.
Returns:
true if apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::apply ( const matrix< ipoint > &  src,
fvector dest 
) const [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 apply successful or false otherwise.

Implements lti::fMatrixEstimatorBase.

virtual functor* lti::fMatrixEstimator::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::computeResidual ( const matrix< dpoint > &  src,
const dvector transform,
dvector dest 
) const [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.

Implements lti::fMatrixEstimatorBase.

virtual bool lti::fMatrixEstimator::computeResidual ( const matrix< fpoint > &  src,
const fvector transform,
fvector dest 
) const [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.

Implements lti::fMatrixEstimatorBase.

bool lti::fMatrixEstimator::convert ( const dvector src,
dmatrix dest 
) const

Converts the estimated vector into a 3x3 matrix.

Parameters:
src dvector the estimated transform.
dest dmatrix the estimated transform as a matrix.
Returns:
true if successful or false otherwise.
bool lti::fMatrixEstimator::convert ( const fvector src,
fmatrix dest 
) const

Converts the estimated vector into a 3x3 matrix.

Parameters:
src fvector the estimated transform.
dest fmatrix the estimated transform as a matrix.
Returns:
true if successful or false otherwise.
fMatrixEstimator& lti::fMatrixEstimator::copy ( const fMatrixEstimator other  ) 

Copy data of "other" functor.

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

Reimplemented from lti::fMatrixEstimatorBase.

bool lti::fMatrixEstimator::denormalize ( dvector srcdest,
const vector< dpoint > &  scale,
const vector< dpoint > &  shift 
) const [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.

Implements lti::fMatrixEstimatorBase.

bool lti::fMatrixEstimator::denormalize ( fvector srcdest,
const vector< fpoint > &  scale,
const vector< fpoint > &  shift 
) const [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.

Implements lti::fMatrixEstimatorBase.

const parameters& lti::fMatrixEstimator::getParameters (  )  const

Returns used parameters.

Reimplemented from lti::fMatrixEstimatorBase.

virtual const char* lti::fMatrixEstimator::getTypeName (  )  const [virtual]

Returns the name of this type ("fMatrixEstimator").

Reimplemented from lti::fMatrixEstimatorBase.

virtual int lti::fMatrixEstimator::maxCorrespondenceDimension (  )  const [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.

Implements lti::fMatrixEstimatorBase.

virtual int lti::fMatrixEstimator::minCorrespondenceDimension (  )  const [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.

Implements lti::fMatrixEstimatorBase.

virtual int lti::fMatrixEstimator::minNumberCorrespondences (  )  const [virtual]

Returns the minimum number of correspondences required to estimate the transform.

Implements lti::fMatrixEstimatorBase.

fMatrixEstimator& lti::fMatrixEstimator::operator= ( const fMatrixEstimator other  ) 

Alias for copy member.

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

Reimplemented from lti::fMatrixEstimatorBase.


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

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