|
asmlib-opencv
an ASM(Active Shape Model) implementation by C++ & OpenCV
|
Image and image related operations. More...
#include <modelimage.h>
Public Member Functions | |
| bool | loadTrainImage () |
| Load training image from saved host image. | |
| bool | loadTrainImage (const Mat &img) |
| Load training image. | |
| void | setShapeInfo (ShapeInfo *si) |
| bool | releaseTrainImage () |
| Release Training Image. | |
| Mat_< double > | getLocalStruct (int pId, int k, int level, double step) |
| Get local structure. | |
| void | getPointsOnNorm (int pId, int k, int level, vector< Point_< int > > &V, double step, int pOffset=0) |
| Get the coordinates of points at normal direction of a landmark point. | |
| Mat & | getTrainImage (int level=0, bool gray=false) |
| Get the image saved at specified level. | |
| Mat & | getDerivImage (int level) |
| Return the derivative image at specified level;. | |
| const string & | HostImage () const |
| Host image (if any). | |
| void | buildFromShapeVec (SimilarityTrans &trans) |
| void | setHostImage (const char *hostImageFilename) |
| Set the host image. | |
| int | NPoints () const |
| The number of shape points. | |
| bool | readPTS (const char *filename) |
| Read mark points information from a PTS file. | |
| void | initPointsByVector (const vector< cv::Point2i > &V) |
| Set mark points information from a vector of points. | |
| Mat | show (int level=0, int pId=-1, bool showInWin=true, int highLight=0) |
| Show the image interactively. | |
| ModelImage () | |
Public Attributes | |
| vector< Point_< int > > | points |
| Landmark points. | |
| ShapeVec | shapeVec |
| Shape vectors. | |
Protected Attributes | |
| int | nMarkPoints |
| The number of landmark points. | |
| string | hostImageName |
| Optional 'host image' filename including full path. | |
| Mat | imgdata |
| the training image | |
| vector< Mat > | imgPyramid |
| Image pyramid. | |
| vector< Mat_< double > > | imgPyrGrayDeriv |
| vector< Mat_< uchar > > | imgPyrGray |
| bool | imgLoaded |
| Is the image loaded? | |
| ShapeInfo * | shapeInfo |
| Information about shapes and paths. | |
Image and image related operations.
| void StatModel::ModelImage::buildFromShapeVec | ( | SimilarityTrans & | trans | ) |
| Mat& StatModel::ModelImage::getDerivImage | ( | int | level | ) | [inline] |
Return the derivative image at specified level;.
| Mat_< double > StatModel::ModelImage::getLocalStruct | ( | int | pId, |
| int | k, | ||
| int | level, | ||
| double | step | ||
| ) |
Get local structure.
| pId | id of the point |
| k | how many points to get on either direction |
| level | position in the pyramid level |
| step | VERY IMPORTANT, for a image with area of 10000, 1.0 may be a good choice |
| void StatModel::ModelImage::getPointsOnNorm | ( | int | pId, |
| int | k, | ||
| int | level, | ||
| vector< Point_< int > > & | V, | ||
| double | step, | ||
| int | pOffset = 0 |
||
| ) |
Get the coordinates of points at normal direction of a landmark point.
| pId | id of the point |
| k | how many points to get on either direction |
| level | position in the pyramid level |
| V | the vector that save results. |
| step | VERY IMPORTANT, for a image with area of 10000, 1.0 may be a good choice |
| pOffset | when searching for best points, use the p'th point along the profile as the center |
| Mat & StatModel::ModelImage::getTrainImage | ( | int | level = 0, |
| bool | gray = false |
||
| ) |
Get the image saved at specified level.
| const string& StatModel::ModelImage::HostImage | ( | ) | const [inline] |
Host image (if any).
| void StatModel::ModelImage::initPointsByVector | ( | const vector< cv::Point2i > & | V | ) |
Set mark points information from a vector of points.
Load training image from saved host image.
| bool StatModel::ModelImage::loadTrainImage | ( | const Mat & | img | ) |
Load training image.
| int StatModel::ModelImage::NPoints | ( | ) | const [inline] |
The number of shape points.
| bool StatModel::ModelImage::readPTS | ( | const char * | filename | ) |
Read mark points information from a PTS file.
Release Training Image.
| void StatModel::ModelImage::setHostImage | ( | const char * | hostImageFilename | ) | [inline] |
Set the host image.
| void StatModel::ModelImage::setShapeInfo | ( | ShapeInfo * | si | ) | [inline] |
| Mat StatModel::ModelImage::show | ( | int | level = 0, |
| int | pId = -1, |
||
| bool | showInWin = true, |
||
| int | highLight = 0 |
||
| ) |
Show the image interactively.
string StatModel::ModelImage::hostImageName [protected] |
Optional 'host image' filename including full path.
Mat StatModel::ModelImage::imgdata [protected] |
the training image
bool StatModel::ModelImage::imgLoaded [protected] |
Is the image loaded?
vector< Mat > StatModel::ModelImage::imgPyramid [protected] |
Image pyramid.
vector< Mat_<uchar> > StatModel::ModelImage::imgPyrGray [protected] |
vector< Mat_<double> > StatModel::ModelImage::imgPyrGrayDeriv [protected] |
int StatModel::ModelImage::nMarkPoints [protected] |
The number of landmark points.
| vector< Point_< int > > StatModel::ModelImage::points |
Landmark points.
ShapeInfo* StatModel::ModelImage::shapeInfo [protected] |
Information about shapes and paths.
Shape vectors.