Project 6A: Image Warping and Mosaicing

Project 6A: Image Warping and Mosaicing

Jiana Huang

Overview

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.


Recovering Homographies

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.

Homography Matrix

Form of Homograpy Matrix

Example Homography Matrix

Example Homography Matrix for the Oxford Building Pictures


Rectifying Images

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.

Average Image

Original Morgan Hall

Average Image

Rectified Morgan Hall

Average Image

Original Coffee Shop

Average Image

Rectified to view the Menu on the Left Wall


Mosaics

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.

Building on Shattuck

Average Image

Left Side

Average Image

Right Side

Average Image

Warped Right Image

Average Image

Blended Mosaic

Northgate

Average Image

Left Side

Average Image

Right Side

Average Image

Blended Mosaic

Memorial Glade

Average Image

Left Side

Average Image

Right Side

Average Image

Blended Mosaic

Summary

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.