latest version v1.9 - last update 10 Apr 2010 |
This class implements an alignment strategy for activeShapeModel (ASM). More...
#include <ltiGradientASM.h>
Classes | |
class | parameters |
the parameters for the class gradientASM More... | |
Public Member Functions | |
gradientASM () | |
gradientASM (const gradientASM &other) | |
virtual | ~gradientASM () |
virtual const char * | getTypeName () const |
gradientASM & | copy (const gradientASM &other) |
gradientASM & | operator= (const gradientASM &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
pointDistributionModel::shape & | apply (pointDistributionModel::shape &srcdest, const channel &gradientChannel) const |
Protected Member Functions | |
pointDistributionModel::shape & | adjustShape (pointDistributionModel::shape &srcdest, const channel &gradientChannel, fvector &pointReliability) const |
bool | createWeightingKernel (kernel1D< float > &theKernel) const |
void | getIntensityArray (const tpoint< float > &start, const tpoint< float > &normal, const channel &chnl, array< float > &values) const |
tpoint< int > | roundPoint (const tpoint< float > &floatPoint) const |
This class implements an alignment strategy for activeShapeModel (ASM).
See: Sonka's "Image Processing, Analysis, and Machine Vision", p380ff.
For this purpose, strong gradients perpendicular to the border of a given shape are searched, starting from each of the shapes's landmark points. The best candidate is selected by gradient strength AND distance to the border (see parameters::weightingKernel). The resulting shape's parameters are then adjusted to fit the underlying pointDistributionModel (PDM) in two steps:
The procedure is repeated, until a given number of iterations is reached.
lti::gradientASM::gradientASM | ( | ) |
default constructor
lti::gradientASM::gradientASM | ( | const gradientASM & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::gradientASM::~gradientASM | ( | ) | [virtual] |
destructor
pointDistributionModel::shape& lti::gradientASM::adjustShape | ( | pointDistributionModel::shape & | srcdest, | |
const channel & | gradientChannel, | |||
fvector & | pointReliability | |||
) | const [protected] |
align shape on the given gradient channel (no iterations!)
srcdest
. pointDistributionModel::shape& lti::gradientASM::apply | ( | pointDistributionModel::shape & | srcdest, | |
const channel & | gradientChannel | |||
) | const |
align shape on the given gradient channel.
iteratively, scan for closest border: iteration process: the channel's values along a control point's normal are saved and afterwards weighted with the weighting function specified in the parameters class. the control point is then moved to the point with the highest value. the shape is then trimmed to a valid shape.
srcdest | shape with the source data. The result will be left here too. | |
gradientChannel | gradient channel. the pdmShape is aligned along higher values in this channel. |
srcdest
. virtual functor* lti::gradientASM::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Reimplemented from lti::activeShapeModel.
Reimplemented in lti::skinASM.
gradientASM& lti::gradientASM::copy | ( | const gradientASM & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::activeShapeModel.
Reimplemented in lti::skinASM.
bool lti::gradientASM::createWeightingKernel | ( | kernel1D< float > & | theKernel | ) | const [protected] |
create weighting kernel according to parameters return false, if no kernel was built
const parameters& lti::gradientASM::getParameters | ( | ) | const |
virtual const char* lti::gradientASM::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("gradientASM")
Reimplemented from lti::activeShapeModel.
Reimplemented in lti::skinASM.
gradientASM& lti::gradientASM::operator= | ( | const gradientASM & | other | ) |
alias for copy member
other | the functor to be copied |
Reimplemented from lti::activeShapeModel.
Reimplemented in lti::skinASM.
round tpoint<float> and convert to tpoint<int>