Basic Image AlgorithmS Library
2.8.0
|
class for representing parameterized image warps, such as homography, displacement, ... More...
#include <Image/TextureTransform.hh>
Public Member Functions | |
virtual TextureTransform * | Clone () 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... | |
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.
Definition at line 73 of file TextureTransform.hh.
|
inlinevirtual |
Definition at line 76 of file TextureTransform.hh.
|
pure virtual |
virtual covariant copy constructor, caller must eventually destroy the created object
Implemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformAffine, BIAS::TextureTransformDisparity, and BIAS::TextureTransformHomography.
Referenced by BIAS::ImageAlignment::Align(), BIAS::TextureMapping< InputStorageType, OutputStorageType >::operator=(), BIAS::TextureMapping< InputStorageType, OutputStorageType >::SetTextureTransform(), and BIAS::ImageAlignment::SetTextureTransform().
|
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().
|
inlinevirtual |
returns parameter vector which undoes the current warp
Reimplemented in BIAS::TextureTransformAffine.
Definition at line 130 of file TextureTransform.hh.
Referenced by BIAS::ImageAlignment::Align().
|
inline |
get the current parameter vector
Definition at line 83 of file TextureTransform.hh.
Referenced by BIAS::ImageAlignment::Align().
|
pure virtual |
map a point in image "source" to a point in image "sink"
Implemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformHomography, and BIAS::TextureTransformAffine.
Referenced by BIAS::ImageAlignment::Align().
|
pure virtual |
map a point in image "source" to a point in image "sink"
Implemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformHomography, BIAS::TextureTransformDisplacement, BIAS::TextureTransformAffine, BIAS::TextureTransformRotation, and BIAS::TextureTransformDisparity.
Referenced by TextureJacobianForward().
|
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().
|
virtual |
transformed position change when parameters change
Reimplemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformAffine, and BIAS::TextureTransformHomography.
Definition at line 118 of file TextureTransform.cpp.
References TNT::Matrix< T >::newsize(), and BIAS::Vector< T >::Size().
Referenced by BIAS::ImageAlignment::Align().
|
virtual |
transformed position change when parameters change
Reimplemented in BIAS::TextureTransformEuclidian, BIAS::TextureTransformSimilar, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformHomography, and BIAS::TextureTransformAffine.
Definition at line 87 of file TextureTransform.cpp.
References TNT::Matrix< T >::newsize(), and BIAS::Vector< T >::Size().
|
pure virtual |
return true, if the parameter jacobian does not depend on the image position
Implemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformAffine, and BIAS::TextureTransformHomography.
|
pure virtual |
override the current state with the new parameters, the meaning of the parameters is defined in the derived class'es SetParameters().
Implemented in BIAS::TextureTransformSimilar, BIAS::TextureTransformEuclidian, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformAffine, and BIAS::TextureTransformHomography.
Referenced by BIAS::ImageAlignment::Align().
|
virtual |
shape change of the local region when mapping backward
Reimplemented in BIAS::TextureTransformEuclidian, BIAS::TextureTransformSimilar, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformHomography, and BIAS::TextureTransformAffine.
Definition at line 58 of file TextureTransform.cpp.
|
virtual |
shape change of the local region when mapping forward
Reimplemented in BIAS::TextureTransformEuclidian, BIAS::TextureTransformSimilar, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformHomography, and BIAS::TextureTransformAffine.
Definition at line 29 of file TextureTransform.cpp.
References MapForward().
|
pure virtual |
return true if the texture jacobian does not depend on the image position
Implemented in BIAS::TextureTransformEuclidian, BIAS::TextureTransformSimilar, BIAS::TextureTransformRotation, BIAS::TextureTransformDisplacement, BIAS::TextureTransformDisparity, BIAS::TextureTransformHomography, and BIAS::TextureTransformAffine.
|
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().