In this project, we calculate homographies using corresponding points between 2 photos to stitch them together. We also can use these homographies to rectify photos and place the viewer at a different angle.
To recover the homographies between two images, I created a simple ginput program that asks the user to manually click on 20 corresponding pairs of points between the two images. We then use these points to compute the values of the homography.
To rectify the images below, I found square like figures in the images, like the window in Morgan Hall and the menu on the wall in the coffee shop. I corresponded these points to a rectangle, which made the viewer have a straight forward view to the object rather than from a side.
To create the mosaic, I padded the left image with empty space where I could warp the right image to. After calculating the homographies, I warped the right image to this left image. To get rid of any sharp lines, I did linear blending, making each photo fade out as it got closer to the middle of the mosaic. There is still some ghosting you can see in the Northgate photo if you look at the column, which could probably be fixed by picking either 1. more corresponding points or 2. picking the points more precisely.
It's crazy we can change the viewer's perspective even after the photos have been taken. Homographies make it really easy to stitch panoramas together and the key to making them look nice is 1. Picking a lot of corresponding points and 2. Blending the photos well.