CS 194-26: Computational Photography, Fall 2020

Project 5

Derek Phan

Report

Part 1: Image Rectification

This part involves using a homography matrix as well as image warping in order to rectify, or unwarp an image. The idea is to take some perspective shape in the input and to morph it into a square in the resulting image. We compute the homography matrix to find this transform using least squares, and apply this transformation to the entire image. The results are shown below:

Sather Lane Original
Sather Lane Warped
Sather Lane Cropped
Sproul Original
Sproul Warped
Sproul Cropped

Part 2: (Auto)stitching Mosaic

This part involves using harris corner detection, ANMS, feature detection, feature matching, and ransac in order to autoselect correspondence points for computing a homography.

Harris Corner Detection

Using the given harris code, we are able to find a set of corner points in the images. Displayed below is the harris points overlayed on one set of images.

caesar-harris1
Caesar Chavez 1 Harris
caesar-harris2
Caesar Chavez 2 Harris

ANMS Corner Detection

By using ANMS, we are able to surpress the number of points we have down to a certain number. Below shows ANMS run with 500 points.

caesar-anms1
Caesar Chavez 1 ANMS
caesar-anms2
Caesar Chavez 2 ANMS

RANSAC

Using ransac, we eliminate the outliers and keep the best set of inliers to compute our homography.

caesar-ransac1
Caesar Chavez 1 RANSAC
caesar-ransac2
Caesar Chavez 2 RANSAC

Results

After finding our best set of points we can compute best correspondences for all of our image sets. From here, we just use our warping implementation and stitch the images together to create a mosaic.

Caesar Chavez

caesar1
Caesar Chavez 1
caesar2
Caesar Chavez 2
caesar-mosaic-cropped
Caesar Chavez Manually Selected
auto-caesar-mosaic1
Caesar Chavez Auto-Selected

Doe Library

doe1
Doe Library 1
doe2
Doe Library 2
doe-mosaic
Doe Library Manually Selected
auto-doe-mosaic1
Doe Library Auto-Selected

Memorial Glade

glade1
Memorial Glade 1
glade2
Memorial Glade 2
glade-mosaic
Memorial Glade Manually Selected
auto-glade-mosaic
Memorial Glade Auto-Selected