Final Project


The motivation for this project comes from a series of HP commercials:

Step 1: Control Point Selection

To warp the image onto the picture frames correctly as the pictures moved, I selected control points on each frame of the animation. This was a very tedious task that I tried to facilitate by drawing actual points on the frames. I then selected the initial four control points, and for each frame, looked at the nearest corner points in the current frame to the points selected from the previous frame. The corner detection was done using the Harris corner detector provided for project 4. Unfortunately, this method was not very robust; very often the corner points would be obscured by a hand, blurred out because of motion, or undetected because they fell in shadow. Below is an example of selected control points.

Step 2: Homography Warp

First, I selected a frame with a clear view of the image I wanted to warp onto the picture frame:

I then cleared the areas outside of the picture frame using an alpha channel (without cropping, so that I could paste it into the correct position):

Finally, I warped both the image and its alpha channel into the correct position and overlayed it onto the original picture:


I ran into several difficulties, the major one being the automated detection of corner points. I combined a manual and automated approach by displaying a cpselect window after each automated selection where I could correct the point selections if necessary.


Download video (wmv)