asmlib-opencv
an ASM(Active Shape Model) implementation by C++ & OpenCV
StatModel::SimilarityTrans Class Reference

A similarity transformation. More...

#include <similaritytrans.h>

List of all members.

Public Member Functions

void invTransform (const ShapeVec &src, ShapeVec &dst) const
 Inverted transformation.
void transform (const ShapeVec &src, ShapeVec &dst) const
 Transform a shape.
void setTransformByAlign (const ShapeVec &x, const ShapeVec &xp)
 find the transformation that best align x to xp
void warpImage (const Mat &imgSrc, Mat &imgDst) const
 Warp an image by this similarity transform.
void warpImgBack (const Mat &imgSrc, Mat &imgDst, bool useDstSize=false) const
 Warp an image by the inverted similarity transform.
double getS () const
 Get the scale factor.
 SimilarityTrans ()
SimilarityTrans operator* (const SimilarityTrans &s2) const
 The multiplication of two transformations.

Public Attributes

double Xt
 X translate.
double Yt
 Y translate.
double a
 a in similarity transformation matrix
double b
 b in similarity transformation matrix

Detailed Description

A similarity transformation.


Constructor & Destructor Documentation


Member Function Documentation

double StatModel::SimilarityTrans::getS ( ) const [inline]

Get the scale factor.

void StatModel::SimilarityTrans::invTransform ( const ShapeVec src,
ShapeVec dst 
) const

Inverted transformation.

Note:
src and dst can be the same vector
SimilarityTrans StatModel::SimilarityTrans::operator* ( const SimilarityTrans s2) const [inline]

The multiplication of two transformations.

find the transformation that best align x to xp

void StatModel::SimilarityTrans::transform ( const ShapeVec src,
ShapeVec dst 
) const

Transform a shape.

Note:
src and dst can be the same vector
void StatModel::SimilarityTrans::warpImage ( const Mat &  imgSrc,
Mat &  imgDst 
) const

Warp an image by this similarity transform.

void StatModel::SimilarityTrans::warpImgBack ( const Mat &  imgSrc,
Mat &  imgDst,
bool  useDstSize = false 
) const

Warp an image by the inverted similarity transform.


Member Data Documentation

a in similarity transformation matrix

b in similarity transformation matrix

X translate.

Y translate.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Defines