Assignment 6: Panoramic part 1

Harry Ho, `CS194-26-agg`

Overview

This project was a general level-up from all the projects we've done so far. We're resizing images to stitch them together to construct a panorama!

Step 1: shooting and digitizing pictures

This part of the project was actually pretty difficult. I ended up scrapping a photo because I couldn't hand-pick any good correspondances

Step 2: Recovering Homographies

A homography matrix is a matrix that can calculate changes in projection. With this, we are able to reshape and warp images with multiple degrees of freedom. However, we need a minimum of 4 reference points per image.

To compute this, we have a large matrix with n rows and 9 columns, n being twice the total number of corresponding points. We then append a row of 8 zeros and 1 one to prevent our matrix from just being zero. We multiply that to get the zero vector, with one 1. This ensures that our ninth value in the matrix will always be 1, and we won't just multiply our matrix with the zero vector.

Step 3: The Good Warp

Wit this, we can warp our images to get rectilinear transformations. I used the exit sign and a photo from BAMPFA to straighten into a square. This was done by extrapolating the coordinates of our new image using the homography, and then, for every point, interpolating the new coordinates from our older image

 original photo warped exit sign original picture warped blue photo