Active or Flexible Contour Models
Автор: M. Kass
Many manufactured objects can be modelled by rigid primitives, either as contours, surfaces or volumetric primitives. However, such a representation may not be appropriate for more natural objects, for example bananas. Each banana has a similar, recognisable shape, but no two bananas are exactly the same. In medical imaging, a similar situation exists for parts of the body. Even in manufacturing industry, a printed circuit board may be loaded with resistors which do not have exactly the same volumetric or contoured appearance. As another example consider modelling an object whose shape changes over time, for example tracking the lips or eyes in a facial image. Although the lips retain a characteristic shape, they are not rigid, and do not describe the same shape in either 2D or 3D space.
Active or deformable models are used to represent either a class of objects of differing shape (such as bananas) or objects which change shape (such as lips). Deformable models may be 3D surfaces, like a balloon which we squeeze out of shape, 3D space curves, like a pipecleaner which we bend to form figures, or 2D contours, like a draughtsman's spline which he/she uses to draw profiles. Here, we consider just one such flexible representation, the Snake.
The Snake is a specific example of a general deformable model which can be matched to an image contour by energy minimisation. It is an energy minimising spline; from a given starting point it deforms itself to conform with the nearest salient contour. They do not ``find'' contours; the initial location must be provided either by other processing or by higher level knowledge. For example, a snake may track lips in an image sequence as they change shape provided the starting position is known.
The snake is a energy function, a weighted combination of internal and external forces. To obtain the best fit between the snake and the object, we minimise the energy. Specifically, a snake is defined as
- is the internal spline energy caused by stretching and bending.
- is a measure of the attraction of image features such as contours.
- is a measure of external constraints e.g. higher level understanding of the general shape or user-applied energy.
- is the parametric representation of the contour in 3D or 2D space.
Figure 1: External and image forces which determine the snake
The internal energy provides a smoothness constraint. This can be further defined as
- is a measure of the elasticity of the snake.
- is a measure of the stiffness of the snake.
The first order term makes the snake act like a membrane; the constant controls the tension along the spine (stretching a balloon or elastic band). The second order term makes the snake act like a thin plate; the constant controls the rigidity of the spine (bending a thin plate or wire). If then the function is discontinuous in its tangent, i.e. it may develop a corner at that point. If then this also allows a break in the contour, a positional discontinuity.
The image energy is derived from the image data. Considering a two dimensional image, the snake may be attracted to lines, edges or terminations. where is an appropriate weighting function.
Commonly, the line functional is defined simply by the image function,
so that if is large positive the spline is attracted to light lines (or areas) and if large negative then it is attracted to dark lines (or areas). The use of the terminology line is probably misleading.
The edge functional is defined by
Hence, the spline is attracted to large image gradients. i.e. parts of the image with strong edges.
Finally, the termination functional allows terminations (i.e. free ends of lines) or corners to attract the snake. (Consider the perception of illusory contours.)- is the gradient direction along the spline
- is a unit vector along the gradient direction
- is a unit vector perpendicular to the gradient direction