File Exchange Pick of the Week

Our best user submissions

Snake Algorithm

Will's pick this week is Snake Algorithm by Iman.

How often do you find a File Exchange contribution with a YouTube video? A video can be a wonderfully effective way to explain a concept. In less than 3 minutes, it enabled Iman to teach me everything I needed to know about his toolbox. It's a UI that implements an active contour model. The user supplies an image file and a series of initial points. The algorithm then moves the points in an attempt to outline the perimeter of an object. I examined the results on an icon of an iron.

Snake Algorithm 1

As much as I'd love to explain to you how the algorithm works, there's really no need to. Included in the download is a 3 page overview document that does a far better job than I could. The algorithm is not without its limitations, which you begin to get a sense of as you try different images, initial points, and UI settings.

Snake Algorithm 2
Snake Algorithm 3
Snake Algorithm 1

As you can see, the solutions aren't always the best. So once you're done trying to solve such challenges interactively with Iman's UI, be sure to check out the activecontour function in the Image Processing Toolbox. It provides a more robust, albeit less exciting, segmentation solution.

Let us know what you think here or leave a comment for Iman.

  • print
  • send email


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.