25 #ifndef __TextureTransformDisplacement__hh__
26 #define __TextureTransformDisplacement__hh__
28 #include <Base/Common/BIASpragmaStart.hh>
29 #include <Image/TextureTransform.hh>
51 sink[0] = src[0] +
P_[0];
52 sink[1] = src[1] + P_[1];
58 src[0] = sink[0] -
P_[0];
59 src[1] = sink[1] - P_[1];
80 Jac[0][0] = 1; Jac[0][1] = 0;
81 Jac[1][0] = 0; Jac[1][1] = 1;
87 Jac[0][0] = -1; Jac[0][1] = 0;
88 Jac[1][0] = 0; Jac[1][1] = -1;
96 BIASASSERT(p.
Size()==2);
108 Jac[0][1] = Jac[1][0] =0;
109 Jac[0][0] = Jac[1][1] = -1;
int ParameterInversionJacobian(Matrix< double > &Jac) const
compute parameters for inverse operation and obtain the jacobian of the inverse parameters with respe...
int TextureJacobianBackward(const HomgPoint2D &sink, Matrix2x2< double > &Jac) const
shape change of the local region when mapping backward
void SetIdentity()
set the elements of this matrix to the identity matrix
void ComposeWithInverseDeltaP(const Vector< double > &deltaP)
concatenate *this and an inverse transform with param deltaP and save new parameter vector to *this...
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
virtual ~TextureTransformDisplacement()
Vector< double > P_
current set of parameters, see SetParameters for meaning
analytic properties of 2D image displacement
Matrix< T > & newsize(Subscript M, Subscript N)
class for representing parameterized image warps, such as homography, displacement, ...
unsigned int Size() const
length of the vector
int MapForward(const HomgPoint2D &src, HomgPoint2D &sink) const
map a point in image "source" to a point in image "sink"
int ParameterJacobianForward(Matrix< double > &Jac, const HomgPoint2D &src)
transformed position change when parameters change
Vector< T > & newsize(Subscript N)
virtual bool TextureJacobianIsConstant() const
return true if the texture jacobian does not depend on the image position
bool ParameterJacobianIsConstant() const
return true, if the parameter jacobian does not depend on the image position
int MapBackward(const HomgPoint2D &sink, HomgPoint2D &src) const
map a point in image "source" to a point in image "sink"
TextureTransformDisplacement()
int TextureJacobianForward(const HomgPoint2D &src, Matrix2x2< double > &Jac) const
shape change of the local region when mapping forward
virtual TextureTransformDisplacement * Clone() const
virtual covariant copy constructor, caller must eventually destroy the created object ...
void SetParameters(const Vector< double > &p)
dx,dy
int ParameterJacobianBackward(Matrix< double > &Jac, const HomgPoint2D &src)
transformed position change when parameters change