Active contour model, also called snakes, is a framework in computer vision introduced by Michael Kass, Andrew Witkin, and Demetri Terzopoulos for delineating an object outline from a possibly noisy 2D image. The snakes model is popular in computer vision, and snakes are widely used in applications like object tracking, shape recognition, segmentation, edge detection and stereo matching. A snake is an energy minimizing, deformable spline influenced by constraint and image forces that pull it towards object contours and internal forces that resist deformation. Snakes may be understood as a special case of the general technique of matching a deformable model to an image by means of energy minimization. In two dimensions, the active shape model represents a discrete version of this approach, taking advantage of the point distribution model to restrict the shape range to an explicit domain learnt from a training set.
Snakes do not solve the entire problem of finding contours in images, since the method requires knowledge of the desired contour shape beforehand. Rather, they depend on other mechanisms such as interaction with a user, interaction with some higher level image understanding process, or information from image data adjacent in time or space.
Motivation In computer vision, contour models describe the boundaries of shapes in an image. Snakes in particular are designed to solve problems where the approximate shape of the boundary is known. By being a deformable model, snakes can adapt to differences and noise in stereo matching and motion tracking. Additionally, the method can find Illusory contours in the image by ignoring missing boundary information. Compared to classical feature extraction techniques, snakes have multiple advantages:
They autonomously and adaptively search for the minimum state. External image forces act upon the snake in an intuitive manner. Incorporating Gaussian smoothing in the image energy function introduces scale sensitivity. They can be used to track dynamic objects. The key drawbacks of the traditional snakes are
They are sensitive to local minima states, which can be counteracted by simulated annealing techniques. Minute features are often ignored during energy minimization over the entire contour. Their accuracy depends on the convergence policy.
Energy formulation A simple elastic snake is defined by a set of n points 𝐯i for i=0,…,n−1, the internal elastic energy term Einternal, and the external edge-based energy term Eexternal. The purpose of the internal energy term is to control the deformations made to the snake, and the purpose of the external energy term is to control the fitting of the contour onto the image. The external energy is usually a combination of the forces due to the image itself Eimage and the constraint forces introduced by the user Econ The energy function of the snake is the sum of its external energy and internal energy, or
Esnake∗=∫01Esnake(𝐯(s))ds=∫01(Einternal(𝐯(s))+Eimage(𝐯(s))+Econ(𝐯(s)))ds
Internal energy The internal energy of the snake is composed of the continuity of the contour Econt and the smoothness of the contour Ecurv.
Einternal=Econt+Ecurv This can be expanded as
Einternal=12(α(s)|𝐯s(s)|2)+12(β(s)|𝐯ss(s)|2)=12(α(s)‖dv¯ds(s)‖2+β(s)‖d2v¯ds2(s)‖2) where α(s) and β(s) are user-defined weights; these control the internal energy function's sensitivity to the amount of stretch in the snake and the amount of curvature in the snake, respectively, and thereby control the number of constraints on the shape of the snake. In practice, a large weight α(s) for the continuity term penalizes changes in distances between points in the contour. A large weight β(s) for the smoothness term penalizes oscillations in the contour and will cause the contour to act as a thin plate.
Image energy Energy in the image is some function of the features of the image. This is one of the most common points of modification in derivative methods. Features in images and images themselves can be processed in many and various ways. For an image I(x,y), lines, edges, and terminations present in the image, the general formulation of energy due to the image is
Eimage=wlineEline+wedgeEedge+wtermEterm, where wline, wedge, wterm are weights of these salient features. Higher weights indicate that the salient feature will have a larger contribution to the image force.
Line functional The line functional is the intensity of the image, which can be represented as
Eline=I(x,y) The sign of wline will determine whether the line will be attracted to either dark lines or light lines. Some smoothing or noise reduction may be used on the image, which then the line functional appears as
Eline=filter(I(x,y))
Edge functional The edge functional is based on the image gradient. One implementation of this is
Eedge=−|∇I(x,y)|2. A snake originating far from the desired object contour may erroneously converge to some local minimum. Scale space continuation can be used in order to avoid these local minima. This is achieved by using a blur filter on the image and reducing the amount of blur as the calculation progresses to refine the fit of the snake. The energy functional using scale space continuation is
Eedge=−|Gσ⋅∇2I|2 where Gσ is a Gaussian with standard deviation σ. Minima of this function fall on the zero-crossings of Gσ∇2I which define edges as per Marr–Hildreth theory.
Termination functional Curvature of level lines in a slightly smoothed image can be used to detect corners and terminations in an image. Using this method, let C(x,y) be the image smoothed by
C(x,y)=Gσ⋅I(x,y) with gradient angle
θ=arctan(CyCx), unit vectors along the gradient direction
𝐧=(cosθ,sinθ), and unit vectors perpendicular to the gradient direction
𝐧⊥=(−sinθ,cosθ). The termination functional of energy can be represented as
Eterm=∂θ∂n⊥=∂2C/∂n⊥2∂C/∂n=CyyCx2−2CxyCxCy+CxxCy2(Cx2+Cy2)3/2
Constraint energy Some systems, including the original snakes implementation, allowed for user interaction to guide the snakes, not only in initial placement but also in their energy terms. Such constraint energy Econ can be used to interactively guide the snakes towards or away from particular features.
… excerpt ends here. Continue reading the full article.

