TD Active
TD Active
TD Active
We want to approximate the contour of an object in an image by an active contour. We know that
the shape of the object to detect is close to a triangle. Hence we propose to detect the contour of
this object by an active contour, or a "snake" defined by three points x1, x2 and x3. The best
position of the active contour is the one that minimizes an energy function E which is the sum of
an internal energy Eint and an external energy Eext defined by :
E = Eint + Eext
For the sake of simplicity, we assume that the image we want to analyze with the active contour
has already been pre-processed and is now binary. By convention, the pixels belonging to the
object to be detected are at 0 and the pixels belonging to the background are set to 255. Figure 1-a
gives an example of such an image and figure 1-b the approximation obtained with the snake on
this image.
Fig 1-a: Binary image to be segmented Fig 1-b: Segmentation result with a triangle active contour
1) Propose an external energy function that will allow the detection of the object contours by
such a method, ie that will return small values on edges and high values on flat region.
The values of the external energy calculated on a 10x10 binary image is now to defined in the
matrix below:
1
We apply the following algorithm:
2) Give the positions of the successive active contour points until convergence with the
following initialization: x1 = (6,4), x2 = (5,5), x3 = (6,6).
In addition, draw the points on the figure above.
NB: the coordinates of a point correspond to the indices as follows: (6,4) => i=6, j=4
NB2: the internal energy is supposed to be constant.
5) Propose an arithmetic expression for the calculation of the internal energy as a function of
the points x1, x2 and x3 so that this energy is no longer a constant but a function
expressing the fact that:
a) the length of the resulting contour is as short as possible;
b) the final contour is a triangle (two points of the active contour cannot converge to the
same point).