BIG > Algorithms > Open Hermite Snake |
CONTENTS |
Figure 1. Open Hermite Snake before convergence. |
Figure 2. Open Hermite Snake after convergence. |
Outline
This software implements an open-ended active contour (a.k.a. snake) built using two complementary Hermite-spline basis functions that jointly interpolate the contour points and their tangents. Our model is driven by an energy term relying on steerable filters and can hence be tuned to be attracted either to edges or to ridges. The approach benefits from an intuitive user-interface that facilitates interaction with the contour, a useful tool in complex images where the algorithm might need external feedback.
References
Technical Explanations
Most parametric snakes are defined as closed curves. Comparatively, there are much fewer solutions that can handle open ones. Here, we introduce an active contour that is open ended and fully defined by the values of few anchor points and their tangents. Our snake uses two complementary interpolation functions that provide both point-wise and tangential control. This is achieved by a mechanism commonly known as Hermite interpolation. The proposed model gives direct control over tangents of the curve, which allows us to impose natural conditions on the extremities of the snake.
The evolution of the curve is formulated as a minimization problem. The associated cost function is called the energy. The definition of the energy functional depends on the image-analysis problem. Therefore, the quality of the segmentation strongly relies on the appropriate design of this term. Often, traditional snakes use edge-based detectors to guide them and are thus inefficient to detect ridge-like structures. We address this limitation and propose an energy term using steerable filters that can be easily tuned to be attracted either to edges or to ridges.
Software
ImageJ prerequirement
The software provided here is a plugin for ImageJ, a general purpose image-processing and image-analysis package. ImageJ has a public domain licence; it runs on several plateforms: Unix, Linux, Windows, Mac OS 9 and Mac OS X. It doesn't take more than a couple of minutes to install.
Download and install
To install the plugin download the OpenHSnake.jar file and put it in the plugins folder of ImageJ (ImageJ/plugins/). The Open Hermite Snake plugin also requires some external libraries that have been regrouped in the following archive file. The archive should be uncompressed, and the elements it contains should be placed into the jars folder of the plugins folder of ImageJ (ImageJ/plugins/jars/).
User manual
Figure 3. OpenHSnake settings window and open image. |
The plug-in requires at least one open image at launch. All image types are accepted, but the processing will be performed on the luminance channel in the case of RGB Color images. In the case of a RGB Stack or a HSB Stack, the processing will be performed on the current channel instead. In the case of 8-bit Color images, the underlying color indices will be treated as intensity value.
At launch, the settings window will appear (see Figure 3). This windows allows one to determine the maximum number of iterations of the snake optimizer, the number of anchor points M, and the standard deviation of the Gaussian blur. Two drop-down menus determine the feature to segment (ridges or edges), and the steerable filter type (rough or refined). Two checkboxes determine if the snake is iterated upon convergence, and if the resulting outline is saved in ImageJ's ROI Manager. A quick summary of the input parameters is as follows:
If a ROI is present in the image, the Open Hermite Snake will try to use it as a initialization. Otherwise, the snake is initialized in a vertically straight manner with evenly-spaced anchor points in the center of the image.
The Open Hermite Snake can then be manipulated thanks to a revised set of tools from ImageJ's toolbar, which we discuss below. ImageJ's toolbar is restored as soon as the Open Hermite Snake Snake dies or is killed.
Figure 4. Zooming tool. |
To magnify an image, select the magnification tool and click in the image. To minify an image, use the same tool with the <CNTL> or <ALT> keyboard modifier.
Figure 5. Tool to move points. |
To select a point, click anywhere in the image. The point closest to where you clicked will be highlighted. To move points, drag within the image. The point closest to where you clicked will be moved to the position where you release the mouse. Alternatively, you can use the keyboard arrow keys to get a finer control over the position of the points; for this to work, the image window must be frontmost. The latter manipulations are possible with anchor points on the curve as well as with tangential controls. Note that after the first round of optimization, the two end points of the Open Hermite snake are frozen. Their position can hence not be modified anymore. Note: in any case, it is not possible to interactively move a point outside of the image frame.
To translate the snake all at once, you can also depress the <SHIFT> key before dragging the mouse. Still, a combination of shift and arrow keys will move just one point.
Figure 6. Tool to rescale the curve. |
When this tool is selected, a bounding box appears on the image enclosing the anchor points of the snake. To move the edges of the bounding box, drag them. The curve will be rescaled accordingly to the new bounding box.
To resize the snake all at once, you can also depress the <SHIFT> key before dragging the mouse.
Figure 7. Tool to rotate the curve. |
When this tool is selected, a bounding box appears on the image enclosing the anchor points of the snake. To rotate the bounding box, drag it. The curve will be rotated accordingly to the rotated bounding box.
The Open Hermite Snake is optimized in two steps. The first "initial" optimization step automatically optimizes the snake based on the initial user-provided position of the anchor points and tangent controls. As the automated optimization might not always give the expected results, the contour can be edited after this "initial" step and re-optimized in another "feedback" optimization step. This procedure can then be repeated any number of times. The method is hence interactive and allows combining steps of snake initialization, optimization, and correction.
Note that it is crucial to place the Open Hermite snake extremities at the proper location (i.e. the extremities of the structure of interest) before the initial optimization step, as the latter are not manually editable anymore after this point. Their tangents controls however remain modifiable.
Figure 8. Tool to launch the initial optimization. |
Once the initial optimization step has been performed, the output of the steerable filter appears in a new image window. This output can be used to assess the suitability of the Blurring parameter chosen. As the Open Hermite snake is attracted to locations where the filter's response magnitude is high, the Blurring parameter should be tuned such that the steerable filter's response image is bright along the edges or ridges to be detected. In the case of ridges, a good initial approximation of an appropriate value for the latter parameter is half the width of the structure of interest.
Figure 9. Steerable filter's response. |
Figure 10. Tool to launch the feedback optimization. |
After the initial optimization, a 'play' button (a right-pointing black triangle) appears in the toolbar. It is used to re-optimize the snake after manual correction. The <SHIFT> and <ENTER> keys provide convenient shortcuts for this operation; for this to work, the image window must be frontmost.
In both cases, if the optimization process is too long, a 'stop' button (a black square) will appear on the toolbar. It can be used to manually abort the optimization. If hit, the resulting snake will be returned in the state where it achieved the most favorable configuration so far during the course of optimization. If left to its own devices, the snake will converge to some (possibly local) optimum.
There are two possible ways of leaving the OpenHSnake plug-in and returning to ImageJ:
Figure 11. Tool to leave the OpenHSnake plug-in and adding the ROI to the ROI Manager. |
This tool is used to gracefully return to ImageJ adding the ROI to the ROI Manager if selected in the settings windows. Note that it is only available after the initial optimization has been performed.
Figure 12. Tool to leave the OpenHSnake plug-in without adding the ROI to the ROI Manager. |
Like the previous one, this tool is used to return to ImageJ, but without adding the ROI to the ROI Manager. This exit tool is available during interaction and optimization as well as before the initial optimization.
Conditions of use
You'll be free to use this software for research purposes, but you must not transmit and distribute it without our consent. In addition, you undertake to include a citation to the associated papers whenever you present or publish results that are based on it. EPFL makes no warranties of any kind on this software and shall in no event be liable for damages of any kind in connection with the use and exploitation of this technology.
Related Works
© 2014 EPFL • webmaster.big@epfl.ch • 30.10.2014