Bernhard Petersch | Semester project |
Section Physique, EPFL | June 2007 |
The goal of the project was to implement an algorithm for contour detection called "Snakes" to detect closed contours (above all) in biomedical images. The algorithm itself has been written in C and IDL (Interactive Data Language by Research Systems) has been used as an input/output interface.
Snakes optimise an energy function by adjusting various parameters in order to find the optimum approximation of a contour. A set of starting parameters has to be provided (initialise contour). In the present case an interface has been created which lets the user choose points near the contour which needs to be detected. Various other possibilities exist to initialise the contour which are specific for a given problem (prototype, analytical form of curve, etc.). The approach used here is designed to process single images and the fact that the user initialises the contour manually allows to extract contours of completely arbitrary shape which can be important for biomedical images. Given the input points chosen, the contour is generated by an interpolation procedure which uses B-Splines (order 3) as interpolating basis functions.
Figure 1 shows an example of a closed contour which has been chosen randomly from a cut of a mouse embryo (microscopic image). The red crosses represent the original input points and the white line is the contour as finally detected by the snake algorithm.