inline const CAAMModel& Model( const int i ) const
- Get the model at level i
inline const int NLevels() const
- Get the number of levels
CAAMModelMS()
-
Default multi-scale constructor.
- Returns:
- Nothing.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002
~CAAMModelMS()
-
multi-scale destructor.
- Returns:
- Nothing.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002
void BuildAllLevels( const int nLevels, const CString &inDir, const CString &acf, const int modelReduction, const int excludeShape )
-
This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.
- Parameters:
- nLevels - The number of levels the multi-scale AAM should be in.
Default 3.
inDir - Input directory where annotations (.asf) resides.
acf - Filename of an AAM configuration file.
If omitted defaults are used.
modelReduction - Model reduction multiplier. Default off == 1.
This sets the size of the lowest level in the
model pyramid, i.e. level 0.
excludeShape - Excludes one shape number 'excludeShape'
from the input directory. Default -1, i.e.
no shapes are removed.
Used to perform leave-one-out testing.
- Returns:
- Nothing.
- Author:
- Mikkel B. Stegmann
- Version:
- 4-14-2000
void BuildAllLevels( const int nLevels, const std::vector<CString> &asfFiles, const CString &acf, const int modelReduction, const int excludeShape )
-
This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.
- Parameters:
- nLevels - The number of levels the multi-scale AAM should be in.
Default 3.
asfFiles - Vector of asf filenames.
acf - Filename of an AAM configuration file.
If omitted defaults are used.
modelReduction - Model reduction multiplier. Default off == 1.
This sets the size of the lowest level in the
model pyramid, i.e. level 0.
excludeShape - Excludes one shape number 'excludeShape'
from the input directory. Default -1, i.e.
no shapes are removed.
Used to perform leave-one-out testing.
- Returns:
- Nothing.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002
bool WriteModel( const CString &filename, const bool txt_only ) const
-
Writes the complete multi-scale AAMModel to disk as a set of .txt and an .amf files.
- Parameters:
- filename - Output filename without any extension. Multi-scale prefixes will be added.
txt_only - If true binary model data is not written.
- Returns:
- true on success, false on file errors.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002
- See Also:
- ReadModel
bool ReadModel( const CString &basename )
-
Reads the complete AAMModel from disk.
- Parameters:
- filename - Input filename without any extension and scale prefixes.
E.g. if the files on disk are
'model_msl<level>.txt' & 'model_msl<level>.amf'
-> filename = 'model'
- Returns:
- true on success, false on file errors.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002
- See Also:
- WriteModel
CAAMModel::CAAMOptRes OptimizeModel( const CDMultiBand<TAAMPixel> &image, CAAMShape &s, CDVector &c, const int maxIterations, std::vector<CAAMOptState>* pOptStates, bool disableDamping ) const
-
Performs AAM optimization of a shape containing initial
pose using a model pyramid.
- Parameters:
- image - The image to search in (in size corresponding to level zero).
s - The initial shape (also containing the inital pose, thus;
not a normalized shape). Actually only the pose of 's' is
used (to align the reference shape as the initial shape).
NOTE: The optimal shape is returned in 's' after execution.
NOTE: 's' is defined at level 0, i.e. shapes should have the
same size as when calling CAAMModel::OptimizeModel()
directly.
c - The optimal model parameters at level zero. Unlike
CAAMModel::OptimizeModel() the content of this vector is not
used, since the optimisation is started the smallest (i.e. top)
level of the pyramid.
NOTE: The optimal model parameters are returned in 'c' after
execution.
maxIterations - The maximum iterations allowed at each level.
pOptStates - Optional parameter convergence info (at level zero)
can be returned in. See CAAMOptState.
disableDamping - Disables the damping steps (default false).
- Returns:
- The results of the optimization in the form of a 'CAAMOptRes'
instance.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002
void BuildPyr( const CDMultiBand<TAAMPixel> &image ) const
-
Builds an image pyramid (if its not cached beforehand).
The pyramid is stored in m_VImagePyr.
- Parameters:
- image - Input image that should be convertet to a pyramid.
This image is assumed to live to the *complete*
usage of the pyramid, since level 0 is a pointer
to this image.
- Returns:
- Nothing.
- Author:
- Mikkel B. Stegmann
- Version:
- 12-6-2002