Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
BIAS::TextureTransform Class Referenceabstract

class for representing parameterized image warps, such as homography, displacement, ... More...

#include <Image/TextureTransform.hh>

+ Inheritance diagram for BIAS::TextureTransform:
+ Collaboration diagram for BIAS::TextureTransform:

Public Member Functions

virtual TextureTransformClone () const =0
 virtual covariant copy constructor, caller must eventually destroy the created object More...
 
virtual void ComposeWithInverseDeltaP (const Vector< double > &deltaP)=0
 concatenate *this and an inverse transform with param deltaP and save new parameter vector to *this. More...
 
virtual Vector< double > GetInverseParameters () const
 returns parameter vector which undoes the current warp More...
 
void GetParameters (Vector< double > &p) const
 get the current parameter vector More...
 
virtual int MapBackward (const HomgPoint2D &sink, HomgPoint2D &source) const =0
 map a point in image "source" to a point in image "sink" More...
 
virtual int MapForward (const HomgPoint2D &src, HomgPoint2D &sink) const =0
 map a point in image "source" to a point in image "sink" More...
 
virtual int ParameterInversionJacobian (Matrix< double > &Jac) const
 compute parameters for inverse operation and obtain the jacobian of the inverse parameters with respect to the original parameters for error propagation More...
 
virtual int ParameterJacobianBackward (Matrix< double > &Jac, const HomgPoint2D &sink)
 transformed position change when parameters change More...
 
virtual int ParameterJacobianForward (Matrix< double > &Jac, const HomgPoint2D &src)
 transformed position change when parameters change More...
 
virtual bool ParameterJacobianIsConstant () const =0
 return true, if the parameter jacobian does not depend on the image position More...
 
virtual void SetParameters (const Vector< double > &p)=0
 override the current state with the new parameters, the meaning of the parameters is defined in the derived class'es SetParameters(). More...
 
virtual int TextureJacobianBackward (const HomgPoint2D &sink, Matrix2x2< double > &Jac) const
 shape change of the local region when mapping backward More...
 
virtual int TextureJacobianForward (const HomgPoint2D &src, Matrix2x2< double > &Jac) const
 shape change of the local region when mapping forward More...
 
virtual bool TextureJacobianIsConstant () const =0
 return true if the texture jacobian does not depend on the image position More...
 
virtual ~TextureTransform ()
 

Protected Attributes

Vector< double > P_
 current set of parameters, see SetParameters for meaning More...
 

Detailed Description

class for representing parameterized image warps, such as homography, displacement, ...

These classes can be exploited for mapping of images ("stitching") or for registration (gradient based estimation of the warp parameters ("KLT"), see BIAS::ImageAlignment, BIAS::BackwardMapping).

This base class only defines the interface for all derived transforms. The transformations must form a group, i.e. each concatenation of transformations of the same class must also be a transformation of that class: For instance, two displacements concatenated are expressable as one "big" displacement. You must specify how to fuse the parameters into the parameter for the concatenated transform (e.g. addition).

The transformations must depend on a minimal number of parameters, e.g. 6 parameters for the affine transformation. The parameter vector 0 must represent the identity warp.

You must at least provide the MapBackward and MapForward function. You can also provide the TextureJacobian functions, which - given two neighboring pixels in one image - measure their distance in the other image (imagine "local magnification"). These functions are needed for anti-aliased BackwardMapping and they can be approximated numerically very stable and well (but due to sampling not very fast). If you are interested in gradient based image registration, you should also provide the parameter jacobians, which tell how the mapping changes, when the parameters change. The approximation of these Jacobians is heuristic and presumably not very good. See TextureTransformHomography for an example.

Author
koeser 01/2008
Examples:
ExampleAlignment.cpp.

Definition at line 73 of file TextureTransform.hh.

Constructor & Destructor Documentation

virtual BIAS::TextureTransform::~TextureTransform ( )
inlinevirtual

Definition at line 76 of file TextureTransform.hh.

Member Function Documentation

virtual TextureTransform* BIAS::TextureTransform::Clone ( ) const
pure virtual
virtual void BIAS::TextureTransform::ComposeWithInverseDeltaP ( const Vector< double > &  deltaP)
pure virtual

concatenate *this and an inverse transform with param deltaP and save new parameter vector to *this.

Apart from very simple transformations like displacement THIS IS NOT A SIMPLE ADDITION but rather a multiplication-like operation!

This function is particularly important for inverse compositional image alignment (KLT)

Implemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformAffine, and BIAS::TextureTransformHomography.

Referenced by BIAS::ImageAlignment::Align().

virtual Vector<double> BIAS::TextureTransform::GetInverseParameters ( ) const
inlinevirtual

returns parameter vector which undoes the current warp

Reimplemented in BIAS::TextureTransformAffine.

Examples:
ExampleAlignment.cpp.

Definition at line 130 of file TextureTransform.hh.

Referenced by BIAS::ImageAlignment::Align().

void BIAS::TextureTransform::GetParameters ( Vector< double > &  p) const
inline

get the current parameter vector

Definition at line 83 of file TextureTransform.hh.

Referenced by BIAS::ImageAlignment::Align().

virtual int BIAS::TextureTransform::MapBackward ( const HomgPoint2D sink,
HomgPoint2D source 
) const
pure virtual
virtual int BIAS::TextureTransform::MapForward ( const HomgPoint2D src,
HomgPoint2D sink 
) const
pure virtual
virtual int BIAS::TextureTransform::ParameterInversionJacobian ( Matrix< double > &  Jac) const
inlinevirtual

compute parameters for inverse operation and obtain the jacobian of the inverse parameters with respect to the original parameters for error propagation

Reimplemented in BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformAffine, and BIAS::TextureTransformHomography.

Definition at line 124 of file TextureTransform.hh.

Referenced by BIAS::ImageAlignment::Align().

int BIAS::TextureTransform::ParameterJacobianBackward ( Matrix< double > &  Jac,
const HomgPoint2D sink 
)
virtual
int BIAS::TextureTransform::ParameterJacobianForward ( Matrix< double > &  Jac,
const HomgPoint2D src 
)
virtual
virtual bool BIAS::TextureTransform::ParameterJacobianIsConstant ( ) const
pure virtual
virtual void BIAS::TextureTransform::SetParameters ( const Vector< double > &  p)
pure virtual
int BIAS::TextureTransform::TextureJacobianBackward ( const HomgPoint2D sink,
Matrix2x2< double > &  Jac 
) const
virtual
int BIAS::TextureTransform::TextureJacobianForward ( const HomgPoint2D src,
Matrix2x2< double > &  Jac 
) const
virtual
virtual bool BIAS::TextureTransform::TextureJacobianIsConstant ( ) const
pure virtual

Member Data Documentation

Vector<double> BIAS::TextureTransform::P_
protected

current set of parameters, see SetParameters for meaning

Definition at line 145 of file TextureTransform.hh.

Referenced by BIAS::TextureTransformDisparity::ComposeWithInverseDeltaP(), BIAS::TextureTransformDisplacement::ComposeWithInverseDeltaP(), BIAS::TextureTransformRotation::ComposeWithInverseDeltaP(), BIAS::TextureTransformEuclidian::ComposeWithInverseDeltaP(), BIAS::TextureTransformDisparity::MapBackward(), BIAS::TextureTransformDisplacement::MapBackward(), BIAS::TextureTransformEuclidian::MapBackward(), BIAS::TextureTransformDisparity::MapForward(), BIAS::TextureTransformDisplacement::MapForward(), BIAS::TextureTransformEuclidian::ParameterInversionJacobian(), BIAS::TextureTransformRotation::ParameterJacobianBackward(), BIAS::TextureTransformEuclidian::ParameterJacobianBackward(), BIAS::TextureTransformSimilar::ParameterJacobianBackward(), BIAS::TextureTransformRotation::ParameterJacobianForward(), BIAS::TextureTransformSimilar::ParameterJacobianForward(), BIAS::TextureTransformEuclidian::ParameterJacobianForward(), BIAS::TextureTransformRotation::SetOrigin(), BIAS::TextureTransformSimilar::SetOrigin(), BIAS::TextureTransformEuclidian::SetOrigin(), BIAS::TextureTransformDisparity::SetParameters(), BIAS::TextureTransformDisplacement::SetParameters(), BIAS::TextureTransformRotation::SetParameters(), BIAS::TextureTransformEuclidian::SetParameters(), BIAS::TextureTransformSimilar::SetParameters(), BIAS::TextureTransformDisparity::TextureTransformDisparity(), BIAS::TextureTransformDisplacement::TextureTransformDisplacement(), BIAS::TextureTransformEuclidian::TextureTransformEuclidian(), BIAS::TextureTransformRotation::TextureTransformRotation(), and BIAS::TextureTransformSimilar::TextureTransformSimilar().


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