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::TextureTransformSimilar Class Reference

#include <Image/TextureTransformSimilar.hh>

+ Inheritance diagram for BIAS::TextureTransformSimilar:

Public Member Functions

virtual TextureTransformSimilarClone () const
 virtual covariant copy constructor, caller must eventually destroy the created object More...
 
void ComposeWithInverseDeltaP (const Vector< double > &deltaP)
 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...
 
const Vector2< double > & GetOrigin () const
 origin relative to which rotation and scale is performed More...
 
void GetParameters (Vector< double > &p) const
 get the current parameter vector More...
 
int MapBackward (const HomgPoint2D &sink, HomgPoint2D &src) const
 map a point in image "source" to a point in image "sink" More...
 
int MapForward (const HomgPoint2D &src, HomgPoint2D &sink) const
 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...
 
int ParameterJacobianBackward (Matrix< double > &Jac, const HomgPoint2D &src)
 transformed position change when parameters change More...
 
int ParameterJacobianForward (Matrix< double > &Jac, const HomgPoint2D &src)
 transformed position change when parameters change More...
 
bool ParameterJacobianIsConstant () const
 the jacobian depends on x More...
 
void SetOrigin (const Vector2< double > &origin)
 origin relative to which rotation and scale is performed More...
 
void SetParameters (const Vector< double > &p)
 rotation(rad), scale-1, dx,dy. More...
 
int TextureJacobianBackward (const HomgPoint2D &sink, Matrix2x2< double > &Jac) const
 shape change of the local region when mapping backward More...
 
int TextureJacobianForward (const HomgPoint2D &src, Matrix2x2< double > &Jac) const
 shape change of the local region when mapping forward More...
 
virtual bool TextureJacobianIsConstant () const
 local warp is the same at any image position More...
 
 TextureTransformSimilar ()
 
virtual ~TextureTransformSimilar ()
 

Protected Attributes

Matrix2x2< double > A_
 cached local warp and inverse More...
 
Matrix2x2< double > Ainv_
 
Vector2< double > origin_
 origin relative to which rotation and scale is performed More...
 
Vector< double > P_
 current set of parameters, see SetParameters for meaning More...
 
double tx_
 cached displacement and inverse More...
 
double txinv_
 
double ty_
 
double tyinv_
 

Detailed Description

Examples:
ExampleAlignment.cpp.

Definition at line 40 of file TextureTransformSimilar.hh.

Constructor & Destructor Documentation

BIAS::TextureTransformSimilar::TextureTransformSimilar ( )
inline

Definition at line 42 of file TextureTransformSimilar.hh.

References TNT::Vector< T >::newsize(), and BIAS::TextureTransform::P_.

Referenced by Clone().

virtual BIAS::TextureTransformSimilar::~TextureTransformSimilar ( )
inlinevirtual

Definition at line 50 of file TextureTransformSimilar.hh.

Member Function Documentation

virtual TextureTransformSimilar* BIAS::TextureTransformSimilar::Clone ( ) const
inlinevirtual

virtual covariant copy constructor, caller must eventually destroy the created object

Implements BIAS::TextureTransform.

Definition at line 200 of file TextureTransformSimilar.hh.

References TextureTransformSimilar().

void BIAS::TextureTransformSimilar::ComposeWithInverseDeltaP ( const Vector< double > &  deltaP)
inlinevirtual

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)

Implements BIAS::TextureTransform.

Definition at line 167 of file TextureTransformSimilar.hh.

References A_, BIAS::Matrix3x3< T >::GetInverse(), BIAS::MatrixIdentity, origin_, SetParameters(), tx_, and ty_.

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

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().

const Vector2<double>& BIAS::TextureTransformSimilar::GetOrigin ( ) const
inline

origin relative to which rotation and scale is performed

Definition at line 211 of file TextureTransformSimilar.hh.

References origin_.

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

get the current parameter vector

Definition at line 83 of file TextureTransform.hh.

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

int BIAS::TextureTransformSimilar::MapBackward ( const HomgPoint2D sink,
HomgPoint2D source 
) const
inlinevirtual

map a point in image "source" to a point in image "sink"

Implements BIAS::TextureTransform.

Definition at line 61 of file TextureTransformSimilar.hh.

References Ainv_, BIAS::Equal(), MapForward(), txinv_, and tyinv_.

int BIAS::TextureTransformSimilar::MapForward ( const HomgPoint2D src,
HomgPoint2D sink 
) const
inlinevirtual

map a point in image "source" to a point in image "sink"

Implements BIAS::TextureTransform.

Definition at line 52 of file TextureTransformSimilar.hh.

References A_, tx_, and ty_.

Referenced by MapBackward().

virtual int BIAS::TextureTransform::ParameterInversionJacobian ( Matrix< double > &  Jac) const
inlinevirtualinherited

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::TextureTransformSimilar::ParameterJacobianBackward ( Matrix< double > &  Jac,
const HomgPoint2D sink 
)
inlinevirtual

transformed position change when parameters change

Reimplemented from BIAS::TextureTransform.

Definition at line 115 of file TextureTransformSimilar.hh.

References TNT::Matrix< T >::newsize(), origin_, and BIAS::TextureTransform::P_.

int BIAS::TextureTransformSimilar::ParameterJacobianForward ( Matrix< double > &  Jac,
const HomgPoint2D src 
)
inlinevirtual

transformed position change when parameters change

Reimplemented from BIAS::TextureTransform.

Definition at line 92 of file TextureTransformSimilar.hh.

References TNT::Matrix< T >::newsize(), origin_, and BIAS::TextureTransform::P_.

bool BIAS::TextureTransformSimilar::ParameterJacobianIsConstant ( ) const
inlinevirtual

the jacobian depends on x

Implements BIAS::TextureTransform.

Definition at line 143 of file TextureTransformSimilar.hh.

void BIAS::TextureTransformSimilar::SetOrigin ( const Vector2< double > &  origin)
inline

origin relative to which rotation and scale is performed

Examples:
ExampleAlignment.cpp.

Definition at line 205 of file TextureTransformSimilar.hh.

References origin_, BIAS::TextureTransform::P_, and SetParameters().

void BIAS::TextureTransformSimilar::SetParameters ( const Vector< double > &  p)
inlinevirtual

rotation(rad), scale-1, dx,dy.

All parameters with respect to origin_! x' = A*(x-origin)+d+origin where A==(s+1)[cos -sin; sin cos]

Implements BIAS::TextureTransform.

Definition at line 150 of file TextureTransformSimilar.hh.

References A_, Ainv_, BIAS::Matrix2x2< T >::Invert(), origin_, BIAS::TextureTransform::P_, BIAS::Vector< T >::Size(), tx_, txinv_, ty_, and tyinv_.

Referenced by ComposeWithInverseDeltaP(), and SetOrigin().

int BIAS::TextureTransformSimilar::TextureJacobianBackward ( const HomgPoint2D sink,
Matrix2x2< double > &  Jac 
) const
inlinevirtual

shape change of the local region when mapping backward

Reimplemented from BIAS::TextureTransform.

Definition at line 83 of file TextureTransformSimilar.hh.

References Ainv_.

int BIAS::TextureTransformSimilar::TextureJacobianForward ( const HomgPoint2D src,
Matrix2x2< double > &  Jac 
) const
inlinevirtual

shape change of the local region when mapping forward

Reimplemented from BIAS::TextureTransform.

Definition at line 77 of file TextureTransformSimilar.hh.

References A_.

virtual bool BIAS::TextureTransformSimilar::TextureJacobianIsConstant ( ) const
inlinevirtual

local warp is the same at any image position

Implements BIAS::TextureTransform.

Definition at line 90 of file TextureTransformSimilar.hh.

Member Data Documentation

Matrix2x2<double> BIAS::TextureTransformSimilar::A_
protected

cached local warp and inverse

Definition at line 217 of file TextureTransformSimilar.hh.

Referenced by ComposeWithInverseDeltaP(), MapForward(), SetParameters(), and TextureJacobianForward().

Matrix2x2<double> BIAS::TextureTransformSimilar::Ainv_
protected

Definition at line 217 of file TextureTransformSimilar.hh.

Referenced by MapBackward(), SetParameters(), and TextureJacobianBackward().

Vector2<double> BIAS::TextureTransformSimilar::origin_
protected

origin relative to which rotation and scale is performed

Definition at line 221 of file TextureTransformSimilar.hh.

Referenced by ComposeWithInverseDeltaP(), GetOrigin(), ParameterJacobianBackward(), ParameterJacobianForward(), SetOrigin(), and SetParameters().

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

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(), ParameterJacobianBackward(), BIAS::TextureTransformRotation::ParameterJacobianForward(), BIAS::TextureTransformEuclidian::ParameterJacobianForward(), ParameterJacobianForward(), BIAS::TextureTransformRotation::SetOrigin(), SetOrigin(), BIAS::TextureTransformEuclidian::SetOrigin(), BIAS::TextureTransformDisparity::SetParameters(), BIAS::TextureTransformDisplacement::SetParameters(), BIAS::TextureTransformRotation::SetParameters(), BIAS::TextureTransformEuclidian::SetParameters(), SetParameters(), BIAS::TextureTransformDisparity::TextureTransformDisparity(), BIAS::TextureTransformDisplacement::TextureTransformDisplacement(), BIAS::TextureTransformEuclidian::TextureTransformEuclidian(), BIAS::TextureTransformRotation::TextureTransformRotation(), and TextureTransformSimilar().

double BIAS::TextureTransformSimilar::tx_
protected

cached displacement and inverse

Definition at line 219 of file TextureTransformSimilar.hh.

Referenced by ComposeWithInverseDeltaP(), MapForward(), and SetParameters().

double BIAS::TextureTransformSimilar::txinv_
protected

Definition at line 219 of file TextureTransformSimilar.hh.

Referenced by MapBackward(), and SetParameters().

double BIAS::TextureTransformSimilar::ty_
protected

Definition at line 219 of file TextureTransformSimilar.hh.

Referenced by ComposeWithInverseDeltaP(), MapForward(), and SetParameters().

double BIAS::TextureTransformSimilar::tyinv_
protected

Definition at line 219 of file TextureTransformSimilar.hh.

Referenced by MapBackward(), and SetParameters().


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