Parametric activce contours represent contours as sets of discrete 2D points. Based on application specific energy functionals image segmentation is accomplished by minimizing the functionals with common methods from numerical mathmatics. This optimizer for snake-based image segmentation applies methods from variational calculus to solve the optimization problem, i.e. uses Euler-Lagrange equations and gradient descent techniques. It evolves a single snake in a given image.
Reference:
Michael Kass, Andrew Witkin and Demetri Terzopoulos,
"Snakes: Active contour models",
Int. Journal of Computer Vision, vol. 1, no. 4, pp. 321-331, 1988.
Input image:
Image to be processed, should be a one-layer gray-scale image.
Initial Snake(s):
Set of initial snakes to be optimized. This optimizer is able to handle one snake at a time, hence, if the list of polygons contains more than one object, all but the first one are ignored.
Initial snake contours can be loaded from different sources:
ROI Manager - import ImageJ selections as initial snake polygons
MTB XML - load polygons from a file in MiToBo XML format (see manual for details)
SERIAL XML - load polygons from a file in XStream serialized XML format
MANUAL - opens a window for manual input of polygon points
Selecting the option "ROI Manager" and pressing the "View" button allows to export loaded snake contours to the ImageJ ROI manager for visualization. The edit button allows for manually modifying loaded contours, e.g. adding or erasing points.
The icon on the right of the buttons indicates whether contours have already been loaded or not.
List of Energies:
Snake-based image segmentation relies on a set of energies encoding specific characteristics of the target object that guide the segmentation.
By clicking on the button "Configure Energies..." a window pops-up that allows to select a set of energies to be applied in the segmentation. Select an energy in the box on top and press "Add selected energy...". The selected energy will be added to the table at the bottom. Note that each energy can only be once added to the table, if it is selected and added a second time, nothing happens.
The overall snake functional results from the sum of all selected energies. In addition, each energy can be individually weighted by assigning a weight to it in the table. The higher an energy's weight, the more influence the energy will have.
Most energies offer configuration parameters. For setting these parameters select an energy from the table at the bottom and press the button "Configure". Another configuration window for the selected energy will pop-up which allows you to set its configuration parameters.
To remove an energy from the table, select the corresponding row in the table and press the button "Remove".
Image intensity normalization mode:
Image intensities are optionally normalized to a range of [0,1] or [-1,1] (if negative values are present in the image) prior to segmentation for simplifying parameter adjustment. The mode specifies how this normalization is done:
INTENSITY NORM NONE: no normalization is done
INTENSITY NORM THEORETIC RANGE: scale the image according to the theoretic range of possible values, i.e. for an image containing unsigned byte values the range of [0,255] is mapped to [0,1]
INTENSITY NORM TRUE RANGE: scale the image according to the true range of intensities, i.e. for an image with a minimal intensity of 25 and a maximum intensity of 221, the range of [25,221] is mapped to [0,1]
Energy normalization mode:
The values different energies yield usually vary significantly. To account for numerical issues arising from this fact the optimizer offers to balance different ranges of possible values by energy normalization.
NORM NONE: no normalization is done
NORM BALANCED DERIVATIVES: scales the pixel-wise derivatives of the energy terms to yield values in a range of [-1,1]
Do Resampling:
Turns on snake resampling. In each iteration the snake is then resampled to ensure approximately equally spaced sampling points along the contour. Turning on this option is highly recommended!
Resample Segment Length:
Desired spacing between two snake points along the polygon. During resampling points are removed and added as to yield segments of this length.
Termination Criterion:
Offers different possibilities to check for snake convergence during optimization:
MTBTermMaxIterations: stops optimization after a predefined number of iterations
MTBTermAreaDiff: stops optimization after a predefined number of iterations or if the change of the area enclosed by the snake falls below a threshold between two iterations
MTBMotionDiff: stops optimization if a certain ratio of snake points has stopped moving
Note that the different termination checkers may have individual configuration parameters. To set these parameters choose a criterion and pop-up its configuration window by pressing the "Configure..." button.
Initial Gammy Value:
In iterative optimization a step-size is used in each step. This gamma value controls the movements of the snake. The larger the value is, the larger movements the snake performs. Note that too large steps might result in uncontrollable behaviour.
Gamma Update Strategy:
The step-size can be updated over time. Different modes are possible:
MTBGammaNone: the initial gamma value is never changed
MTBGammaFixed: after each iteration the gamma value is decreased by a specified fraction
Verbose:
Prints additional information to the console.
Show Intermediate Results:
Pops-up additional windows during segmentation to show contour evolution.
Save Intermediate Results:
Saves intermediate segmentation results.
Save Intermediate Results To...:
Path where to save intermediate results.
Show Intermediate Snakes Stack:
Generates an additional stack as result which shows intermediate segmentation results.
Saving Interval for Stack:
Interval for saving intermediate results, e.g. every 3rd or 5th result can be saved. Note that saving all results might cause memory issues if many iterations are done.
Collect energy data:
Logs energy data during optimization and displays a table at the end.
The operator returns...
the final contour (as set with one element)
an image overlay showing the input image and the segmentation result
Note that the snake optimizer allows for interaction. At the bottom of the control window there are buttons to pause/resume the optimizer during segmentation or to run it step-wise.