msm : Manchester Shape Model library

Classes to model 2D shape and shape variation.

A shape is represented as a set of points, stored in a msm_points object, which encodes the co-ordinates in a vector (x0,y0,x1,y1,...).

Shape is defined as that variation in geometry which is invariant to some class of transformations. Usually one considers similarity transformations (scale, rotation and translation), though others are also used. To build a model from sets of shapes, one first aligns the shapes to remove the effects of the global transform.

The alignment and representation of transformations is encoded using the msm_aligner objects.

Available msm_aligner classes include:

The shape model itself is a linear model of the form

This information is stored in the msm_ref_shape_model class. The derived msm_shape_model class also stores information about the msm_aligner and default pose associated with the model.

The shape model can be built from a set of msm_points objects using the msm_shape_model_builder.

An instance of a shape in the reference frame is defined by the shape parameters, b. This is encoded in the msm_ref_shape_instance class.

An instance of a shape in a target frame is defined by

Other useful classes:


The utils subdirectory contains a range of useful classes and functions to manipulate the models, for instance to draw shapes to an eps file, or to generate a set of shapes illustrating a mode of variation.


The tools subdirectory contains programmes to build or use shape models.