Snake : Active Contour

Snake Segmentation (Kass et al), 2D/3D including GVF and balloon force (Easy to read code)
36.8K Downloads
Updated 8 Nov 2011

View License

These functions implements the basic snake segmentation contour, as introduced by Kass et al.

Algorithm:
A snake is an active (moving) contour, in which the points are attracted by edges and other image boundaries. To keep the contour smooth, a membrane and thin plate energy is used as contour regularization.

Implementation:
All code is well commented, and is probably easy readable. It includes,
- A balloon force, which is not in the original paper
- Binary image segmentation result,
- The "Gradient Vector Flow" (GVF) method.
- 3D implementation, including parameter to keep the mesh from self-intersecting

Try the example in the help of function Snake.m !

Literature:
- Michael Kass, Andrew Witkin and Demetri TerzoPoulos "Snakes Active Contour Models", 1987
- Jim Invins and John Porril, "Everything you always wanted to know about snakes (but were afraid to ask)
- Chenyang Xu and Jerry L. Prince, "Gradient Vector Flow: A New external force for Snakes
- Christoph Lurig, Leif Kobbelt, Thomas Ertl, "Hierachical solutions for the Deformable Surface Problem in Visualization"

Please report bugs, successes and other comments

Cite As

Dirk-Jan Kroon (2024). Snake : Active Contour (https://www.mathworks.com/matlabcentral/fileexchange/28149-snake-active-contour), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.7.0.0

3D snake now uses the inverse internal forces matrix

1.6.0.0

Small, Interpolate Bug Fix

1.5.0.0

Yuanming Suo reported bugs in scaling of 3D Gaussian and Mu*4. Which are corrected in this version.

1.4.0.0

Solved 3D GVF bug, and increased 3D speed.

1.3.0.0

Added parameter to keep the mesh from self-intersecting

1.2.0.0

Also added a 3D implementation. Change line image force, to Gaussian smoothed line image force.

1.1.0.0

Added GVF. Changed some minor comment

1.0.0.0