last update 20 Sep 2009 |
#include <cvrMatrixTransform.h>
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_ |
cvr::matrixTransform< I >::matrixTransform::helper4x4::helper4x4 | ( | interpolator_type & | interp, | |
const parameters & | par | |||
) |
The only available constructor.
virtual cvr::matrixTransform< I >::matrixTransform::helper4x4::~helper4x4 | ( | ) | [virtual] |
Virtual destructor.
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.
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.
virtual void cvr::matrixTransform< I >::matrixTransform::helper4x4::backwards | ( | const fpoint & | dest, | |
fpoint & | orig, | |||
const fpoint & | offset | |||
) | const [virtual] |
Inverse transform the given point coordinates.
dest
in the transformed system, it computes the coordinates of that point in the original coordinate system.
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.
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.
virtual void cvr::matrixTransform< I >::matrixTransform::helper4x4::forwards | ( | const fpoint & | orig, | |
fpoint & | dest, | |||
const fpoint & | offset | |||
) | const [virtual] |
Transform the given point coordinates.
Implements cvr::matrixTransform< I >::matrixTransform::helperBase.
bool cvr::matrixTransform< I >::matrixTransform::helper4x4::getMatrix | ( | fmatrix & | m | ) | const |
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.
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.