asmlib-opencv
an ASM(Active Shape Model) implementation by C++ & OpenCV
|
A similarity transformation. More...
#include <similaritytrans.h>
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 |
A similarity transformation.
StatModel::SimilarityTrans::SimilarityTrans | ( | ) | [inline] |
double StatModel::SimilarityTrans::getS | ( | ) | const [inline] |
Get the scale factor.
void StatModel::SimilarityTrans::invTransform | ( | const ShapeVec & | src, |
ShapeVec & | dst | ||
) | const |
Inverted transformation.
SimilarityTrans StatModel::SimilarityTrans::operator* | ( | const SimilarityTrans & | s2 | ) | const [inline] |
The multiplication of two transformations.
void StatModel::SimilarityTrans::setTransformByAlign | ( | const ShapeVec & | x, |
const ShapeVec & | xp | ||
) |
find the transformation that best align x to xp
void StatModel::SimilarityTrans::transform | ( | const ShapeVec & | src, |
ShapeVec & | dst | ||
) | const |
Transform a shape.
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.
a in similarity transformation matrix
b in similarity transformation matrix
X translate.
Y translate.