COS 429 - Computer Vision

Fall 2011

Course home Outline and lecture notes Assignments


Assignment 2

Due Tuesday, Oct. 25


I. Active Contours (80%)

Implement a system for evolving active contours. The system should be based on the "greedy" algorithm described by Williams and Shah. Compared to the original Kass, Witkin, and Terzopoulos paper, this method simply performs a local search on the position of each vertex, and greedily moves the vertex to the position that locally minimizes energy.

The system should do the following:

  1. Read an image from disk.
  2. Compute the smoothed gradient of the image, and find the magnitude of the gradient at each pixel.
  3. Obtain the initial position of a contour via user input. Use matlab's getline function for this (if your version of matlab doesn't have getline, you'll need getline.m and getcurpt.m). You'll also need to round the positions returned from getline to integers.
  4. If the distance between consecutive points in the curve is large, interpolate to add extra points. You should probably aim for about 5 pixels between points.
  5. While a fraction greater than f of points have moved in an iteration:
    1. Compute the average distance between consecutive points along the curve.
    2. For each point p:
      1. Define an n by n image neighborhood around p.
      2. Compute the energy functional E (see below) considering moving p to each point in the neighborhood.
      3. Move p to the point with the minimum energy.
      4. If p moved away from its original position, update the count of pixels that moved on this iteration.

The energy functional you use should be a combination of three terms:

E = alpha * Econt + beta * Ecurv + gamma * Eedge

where:

You should normalize the contributions of each term. That is, divide each of Econt, Ecurv, and Eedge by the largest value of that term within the neighborhood over which you are searching.


II. Evaluating your Implementation (20%)

The algorithm described above contains several different parameters:

Begin your experiments (with an image of your choosing) with the values:

Experiment with (and comment on) the effects of varying these parameters.


Moving Images

Grab the "pond" image sequence from here. Run the active contour on the first image of the sequence (with manual initialization), then run your code on each subsequent image, starting with the position of the curve from the previous image. You will have to extend your code to do something sensible when the contour runs into the edge of the image. In addition, run it on the book and hands image sequences. You might want to test your implementation on the simpler circle sequence first.

More image sequences will be provided shortly.


III. Extra Credit

  1. Gradually reduce the amount of blurring in the edge functional at later iterations. Comment on the effects.
  2. Implement the "termination functional" described in the Kass, Witkin, and Terzopoulos paper. Alternatively, implement some other energy term that looks for corners in the image. Show the results.
  3. Implement the logic in the Williams and Shah paper that looks for local maxima in the curvature and sets beta to zero at those points. This has the effect of allowing certain points along the curve to become sharp corners.


Submitting

This assignment is due Tuesday, Oct. 25, 2011 at 11:59 PM. Please see the general notes on submitting your assignments, as well as the late policy and the collaboration policy.

Please submit a single .zip file containing:

The Dropbox link to submit the assignment is here.


Last update 8-Oct-2011 14:07:55
smr at princeton edu