Project 5: [Auto]Stitching and Photo Mosaics

Aivant Goyal

Part 1

This part is about manually stitching together two images to form a mosaic.

Computing Homography

First, we must write an algorithm to compute a homography: a perspective warp matrix that turns one set of points to another. A Homography matrix has 8 degrees of freedom (with a 1 in the bottom right corner).

We can solve for an equation with 4 correspondence points, but it’s best to use more and use Least Squares to solve (in order to reduce noise).

I used the following formula (taken from http://www.cse.psu.edu/~rtc12/CSE486/lecture16.pdf)

Rectification

As a sort of sanity check for our homography, we test it out on an image taken of a book. With our homography, we can cast the picture of the book from it’s current position to a birds-eye view!

We do this by performing an inverse warp from the desired plane to the original image

Before:

After:

Mosaic

Coming soon…