For this project I built upon the source code for the active contour Java demo written by Mark Schulze . His demo is a straightforward implementation of A Fast Algorithm for Active Contours by Williams and Shah. Mark was kind enough to email me his source code and give me permission to use it for this project. His program allows the user to draw an oval on an image. Points are distributed uniformly on the oval, making the oval the active contour.
Any key press causes one iteration of the energy minimizing algorithm to occur.
For each point on the snake, the lowest energy is found by searching a 3x3 region of pixels surrounding the point. The energy equation is evaluated for each pixel in the region. The point on the snake is moved the pixel that results in the lowest energy. The interface allows the user to specify several different weights for each of these terms. Top Approach My goal was to add to this code the ability to track moving objects.