CS 194-26 Project 5: Image Warping and Mosaicing

Eric Li

Overview

The goal of this project is to use homographies in order to create rectified images. The idea here is to use linear transformations to generate warps that tkae an image from an unalighned state to an aligned state.

Shooting the Pictures

Here are the images that I plan on warping.

Image Rectification

After coding up the warp calculator using a set of points and least squares to determine the most suitable homography, I was able to use the math to straighten images.

Panorama Generation

For this part I warp both images to the same plane and use a Laplacian pyramid to blend the images.

The individual warped images and their combination aligned with SSD are as follows.

Stitching the two parts of the parts of the image also using SSD values yields the following.

Running the same procedure on another set of images.

Project Part 2

For automatic panorama generation, I started out finding the corners in the image. This was in the order of tens of thousands, so I used supression to get the corners for the images as follows. These images are generated by implementing a feature descriptor for each feature point and matching the feature discriptors between the two points by using an SSD metric to compare them. The features I used are normalized and demeaned for best comparison accuracy.

I then pick the points with a ratio between second best match and best match of less than 0.2, which yields the following points. I run a RANSAC to compute a homography and use the procedure I wrote in the first part of the project to compute a homography.

Here are the results of my homography.

The following is the mask I use in the Laplacian blend of the two images.

What I Learned

In this project I learned that linear transformations are able to transform pictures taken from different angles from the same location into all sorts of different angles and scalings to make them fit on a certain surface. Linear algebra yields important tools that allows us to cast objects to affine shapes while preserving the relative position of the object with the environment around them.

In the second part of the project I learned that we can use SSD to match features. Using these features and a neat way of computing match ratios, we can give our RANSAC the best possible candidates for a homography computation. This set of points and the homography computed can then be subject to linear algebra methods that allow us to project one image to the other completely automatically.