Spring 2010 - CS477/577 - An Introduction to Computer Vision

Assignment eight

Due: Late, May 05.

Credit (Grads): Approximately 8 points (Relative, and very rough absolute weighting)
Credit (Ugrads): Approximately 6 points (Relative, and very rough absolute weighting)

This assignment must be done individually


Big picture

This assignment will help you understand the mapping between two images of the same planar object under where all that is changed is the parameters of the projective camera. This mapping (a homography) is not generally valid, but when the objects are planar is one case were it is valid.

Grad students will further see how using this constraint is very helpful to prune bad matches of localized feature points like SIFT. Grad students will learn how to use the RANSAC method to find the homography. This will illustrate that RANSAC is a very powerful method for fitting models with a modest number of parameters.

Ugrads: If you can find the time to do the grad student portion of the assignment, doing so is highly recommended.


You can do this assignment in either Matlab or C/C++.

Information for those working in C/C++ who want to use my libraries.


Assignment specification

  1. Implement both methods for computing the homography between two planar images based on 4 point matches.

    Test both methods on the data used in Assignment Six. For each pair of images (slide and video frame), collect 8 point matches using manual mouse clicking. Now take a subset of 4 points from that 8 as nput to a test program that computes the homography. Use the computed homography to project all 8 source points (slides) to the video frame. In the video frame images, mark the 8 clicked points, and the 8 mapped locations differently (e.g. different color). Ideally they should be close with the 4 used to establish the homography being on top of each other. This is just a check, but hand in three pairs of images for each method showing the marked points in both, and the mapped points in the video frame.

  2. Required for grad students only (modest extra credit for ugrads).

    Now use RANSAC to improve the keypoint matching to search for a set of N keypoints that all agree about the homography. From your previous work on Assignment Six, you probably have some idea about what a good number for N is. Does RANSAC help?

    Comment on any difference in the two methods for solving for the homography. (Note: In general the DLT method is regarded to be more stable, but I have no idea if this will be the case here).

    Tip: Ensure that the 4 matches in each group are different. If you naively randomly sample, then you might draw the same match twice. This will lead to a degenerate equation that might produce an error when you try to solve it. (This may happen on occasion anyway, so if you are able to trap that error and ignore it, your code will be more robust.

    Tip: See http://en.wikipedia.org/wiki/RANSAC for more on RANSAC, including the standard formula that allows you to choose the number of iterations sensibly.


To hand in the above, use the turnin program available on lectura (turnin key is cs477_hw8).  Hand in any code, a README, and /or images, and/or a PDF reporting on what you did with images embedded.