next up previous contents
Next: Visualization of the Pectoral Motions Up: Artificial Animals For Computer Animation Previous: Artificial Life

Deformable Contour Models


A ``snake'' [Kass, Witkin and Terzopoulos1987] is a dynamic deformable contour in the x-y image plane. We define a discrete deformable contour as n equally-spaced nodes indexed by i=1, ..., n, with time varying positions tex2html_wrap_inline3956 . The deformable contour's dynamic behavior can be influenced interactively by incorporating user-specified forces (e.g. mouse forces) into its equations of motion. Such behavior is governed by the system of first-order ordinary differential equations:


where tex2html_wrap_inline3054 is a velocity-dependent damping constant, tex2html_wrap_inline3960 are ``tension'' forces which make the deformable contour act like a series of springs that resist deformation, tex2html_wrap_inline3962 are ``rigidity'' forces which make the contour act like thin wire that resists bending, and tex2html_wrap_inline3964 are forces in the image plane tex2html_wrap_inline3966 plus the simulated mouse forces applied to the contour.

A tex2html_wrap_inline3968 deformable mesh consists of m+n contours, n of which run vertically, each with m nodes, and m of which run horizontally each with n nodes. The crossing points on the deformable mesh are nodes shared by the intersecting contours.

We express tex2html_wrap_inline3980 , the tension forces, in terms of the deformation of the springs connecting node i to its two neighboring nodes and tex2html_wrap_inline3984 , the rigidity forces, in terms of the second order forward finite differences as follows:



where a and b are parameters, tex2html_wrap_inline3990 is the deformation of the spring connecting node i to node i+1 (i.e. its current length minus its rest length), and tex2html_wrap_inline3996 is the unit vector from tex2html_wrap_inline3998 to tex2html_wrap_inline4000 . Note that tex2html_wrap_inline3980 and tex2html_wrap_inline3984 vanish in the absence of deformation and bending.

To make the outline of the fish in the image stand out, we convert the original RGB color image into a gray-scale image I(x,y). The gradient of I, call it tex2html_wrap_inline4010 , forms a potential field whose ``ravines'' coincide with the dark outline of the profile of the fish. The image force field can then be expressed as the gradient of tex2html_wrap_inline4010 , i.e. tex2html_wrap_inline4014 ) such that the ravines act as attractors to deformable contours. The contours descend and stabilize at the bottoms of the nearest ravines. In order to let the ravines attract the deformable contours from some distance away, the potential function tex2html_wrap_inline4010 is computed as follows:


where tex2html_wrap_inline4018 denotes convolution with a 2D Gaussian smoothing filter of width tex2html_wrap_inline3636 which broadens the ravines of tex2html_wrap_inline4022 .

Often the user may initialize the border of the deformable mesh too far from the edges of the fish body and hence the deformable contours may become attracted by nearby dark features and fail to localize the correct outline. Should this be the case, the user can apply simulated spring forces tex2html_wrap_inline4024 by using the mouse to guide a deformable contour towards the ravine of interest [Kass, Witkin and Terzopoulos1987].

Another case frequently encountered is where the profile of the fish is not composed of edges that are consistently dark or consistently white. For example, in the fish image shown in Fig. gif(a), part of the profile that bounds the tail and the upper body is made of white edges while the lower body is demarcated from the background by dark lines. In this case if tex2html_wrap_inline4026 is generated such that the deformable contours are attracted to dark edges then most of the profile in Fig. gif(a) can not be captured properly. It is hence useful to constrain certain nodes of the border contours to selected anchor points tex2html_wrap_inline4028 in the image (the interface allows the user to interactively place anchor points using the mouse). The constraints prevent the deformable contours from straying far from the anchor points, regardless of the image forces and other mouse forces. This can be achieved by attaching the deformable contour nodes with springs to their corresponding anchor points:


where tex2html_wrap_inline4030 is the spring constant. Using this mechanism we can also effectively deal with images where the profile of the fish is obscure.

The total external force tex2html_wrap_inline3770 is therefore obtained by combining the image force tex2html_wrap_inline4026 , the mouse force tex2html_wrap_inline4036 and the constraint force tex2html_wrap_inline4038 . The deformable contour can then be simulated by integrating the system of ordinary differential equations (gif) forward through time using an Euler integration method [Press et al.1986].

next up previous contents
Next: Visualization of the Pectoral Motions Up: Artificial Animals For Computer Animation Previous: Artificial Life
Xiaoyuan TuJanuary 1996