Project 5: (Auto)stitching and Photo Mosaics

Candace Chiang, 3032706562

Pictures and Points

Below are the images I plan to use for the mosaics, and the images I plan to rectify. They were taken with an iPhone 6s. I selected points manually for each picture.

Computing Homography

I wrote out and defined a function to calculate the homography matrix, which we use as so: p' = Hp.

Warping

I use the homography matrices computed in the last step to warp the images. I use cv2.remap() to perform the interpolation.

Rectification

For rectification, I selected 4 corners of a distorted rectangle in my pictures, and used that alongside a square to compute the homography matrix. I then simply warp it to get the following results.

Mosaics

I printed out the warp of the image to be overlayed on the second image for each mosaic, as well as the final mosaic. I used my Laplacian pyramid function from project 2 to help blend the images a bit.

Harris Interest Point Detector

I used the provided functions but changed the method to corner_peaks. Here is an example of the points found in one of my images (and its shape):

ANMS

I implemented the ANMS algorithm written in the paper to help minimize the number of points we process: you can most clearly see the effects of this function in the first image. I'm missing the ANMS points in one of my images — the second part of my waterfalls — as I didn't have enough time to run it through (it takes over 20 minutes).

Feature Descriptor

I implemented the function as written in the paper and applied the Gaussian blur I wrote in project 2 to the patches alongside rescaling them from 40x40 to 8x8. I ran it on two of my images here.

Ransac and Warping

I warped one of my mosaics, but had problems at this stage with my other images. I'm pretty confident in the functions themselves though. The manual mosaic is above (didn't have time to rerun oofs).