CVR-Lib last update 20 Sep 2009

cvr::matrixTransform< I >::matrixTransform::helper4x4 Class Reference

Helper for 4x4 matrix transformations. More...

#include <cvrMatrixTransform.h>

Inheritance diagram for cvr::matrixTransform< I >::matrixTransform::helper4x4:

Inheritance graph
[legend]
Collaboration diagram for cvr::matrixTransform< I >::matrixTransform::helper4x4:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 helper4x4 (interpolator_type &interp, const parameters &par)
virtual ~helper4x4 ()
virtual bool analyzeMatrix ()
virtual bool apply (const matrix< value_type > &src, matrix< value_type > &dest, fpoint &offset) const
virtual bool evalDims (const ipoint &orig, ipoint &res, fpoint &offset) const
bool getMatrix (fmatrix &m) const
bool trans (const fmatrix &m, const ipoint &p, fpoint &res) const
virtual void forwards (const fpoint &orig, fpoint &dest, const fpoint &offset) const
virtual void backwards (const fpoint &dest, fpoint &orig, const fpoint &offset) const

Protected Member Functions

bool inverse (const double &m00, const double &m01, const double &m02, const double &m03, const double &m10, const double &m11, const double &m12, const double &m13, const double &m20, const double &m21, const double &m22, const double &m23, const double &m30, const double &m31, const double &m32, const double &m33)

Protected Attributes

Matrix entries of the inverse
float m00_
float m01_
float m02_
float m03_
float m10_
float m11_
float m12_
float m13_
float m20_
float m21_
float m22_
float m23_
float m30_
float m31_
float m32_
float m33_


Detailed Description

template<class I>
class cvr::matrixTransform< I >::helper4x4

Helper for 4x4 matrix transformations.

Constructor & Destructor Documentation

template<class I>
cvr::matrixTransform< I >::matrixTransform::helper4x4::helper4x4 ( interpolator_type &  interp,
const parameters par 
)

The only available constructor.

template<class I>
virtual cvr::matrixTransform< I >::matrixTransform::helper4x4::~helper4x4 (  )  [virtual]

Virtual destructor.


Member Function Documentation

template<class I>
virtual bool cvr::matrixTransform< I >::matrixTransform::helper4x4::analyzeMatrix (  )  [virtual]

Analyze the matrix in the parameters and compute its inverse.

If the matrix is not invertible, then return false.

Implements cvr::matrixTransform< I >::matrixTransform::helperBase.

Reimplemented in cvr::matrixTransform< I >::matrixTransform::helper4x3.

template<class I>
virtual bool cvr::matrixTransform< I >::matrixTransform::helper4x4::apply ( const matrix< value_type > &  src,
matrix< value_type > &  dest,
fpoint offset 
) const [virtual]

Transform an image according to the matrix provided in the parameters.

Implements cvr::matrixTransform< I >::matrixTransform::helperBase.

template<class I>
virtual void cvr::matrixTransform< I >::matrixTransform::helper4x4::backwards ( const fpoint dest,
fpoint orig,
const fpoint offset 
) const [virtual]

Inverse transform the given point coordinates.

Warning:
Do not forget to provide first the size of the matrix from which the points are going to be taken, using use(const ipoint&).
This method is the inverse of forwards(const fpoint&,fpoint&). Given a position dest in the transformed system, it computes the coordinates of that point in the original coordinate system.

Parameters:
dest Position of a point in the transformed space.
orig Position of the point in the original space.
offset Position of the origin of the result with respect to the coordinate system of the original image.

Implements cvr::matrixTransform< I >::matrixTransform::helperBase.

template<class I>
virtual bool cvr::matrixTransform< I >::matrixTransform::helper4x4::evalDims ( const ipoint orig,
ipoint res,
fpoint offset 
) const [virtual]

After the matrix has been analyzed, this method can be used to compute the dimensions of the resulting image and the offset.

Implements cvr::matrixTransform< I >::matrixTransform::helperBase.

Reimplemented in cvr::matrixTransform< I >::matrixTransform::helper4x3.

template<class I>
virtual void cvr::matrixTransform< I >::matrixTransform::helper4x4::forwards ( const fpoint orig,
fpoint dest,
const fpoint offset 
) const [virtual]

Transform the given point coordinates.

Warning:
Do not forget to provide first the size of the matrix from which the points are going to be taken, using use(const ipoint&).
This method takes the orig position, assumed to be in a reference system of a matrix/image of the size given by the use(const ipoint&) method, and transforms this position according to the set parameters.

Implements cvr::matrixTransform< I >::matrixTransform::helperBase.

template<class I>
bool cvr::matrixTransform< I >::matrixTransform::helper4x4::getMatrix ( fmatrix m  )  const

Get inverse matrix as matrix.

template<class I>
bool cvr::matrixTransform< I >::matrixTransform::helper4x4::inverse ( const double &  m00,
const double &  m01,
const double &  m02,
const double &  m03,
const double &  m10,
const double &  m11,
const double &  m12,
const double &  m13,
const double &  m20,
const double &  m21,
const double &  m22,
const double &  m23,
const double &  m30,
const double &  m31,
const double &  m32,
const double &  m33 
) [protected]

Compute the inverse.

Return false if matrix is singular.

template<class I>
bool cvr::matrixTransform< I >::matrixTransform::helper4x4::trans ( const fmatrix m,
const ipoint p,
fpoint res 
) const

Get the transformation of the given point (x,y) extending it to homogeneous coordinates (x,y,0,1), and normalizing the result.

Reimplemented in cvr::matrixTransform< I >::matrixTransform::helper4x3.


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

Generated on Sun Sep 20 22:08:50 2009 for CVR-Lib by Doxygen 1.5.8