CS 194-26 Project 6

Image Warping and Mosaicing

Franky Guerrero 25475670

Project Overview

The goal of this project is to produce a mosaic of images by stitching them together using image warping and blending.

Shoot The Pictures

I shot my images by standing at the same spot but taking different perspectives of a scene. I made sure that at least 50% of an image overlapped its adjacent image in the mosaic. Here is an example:

Recovering Homographies

I selected point correspondeces in both images. To compute a homography H, I constructed my matrix equation as follows to solve for the 8 unknowns in the matrix. To make my 3x3 matrix, I set the last value to 1.

Image Rectification

To verify my homographies were computed correctly, I tried tried to rectify an image by applying the homography. Here, I tried to warp images of rectangular planar objects such that they were frontal parallel. I manually selected the four corners of the rectangular object as the p coordinates, and I eyeballed the p' coordinates using my knowledge of the shape and aspect ratio of the subject. I warped the image with the inverse of H to produce the following rectified images:

Warping The Images

Knowing that my homographies were computed correctly, I chose to apply the homography to project the left image onto the plane of the right image.

Apt 2

Anshul's

Parker

Blending The Images

I blended the images by creating a mask for each of the original images where both images intersected then warping those masks. I apply alpha blending by setting different weights on the mask and element-wise multiplying the mask and the image. I create a larger canvas that is the size of both images minus the size of the mask and compute an average of each of the pixels to fill out the output image.

Apt 2

Anshul's

Parker

Summary

I think the coolest part of this project was the image rectifying part where I could take an image with a subject that is angled very dramatically but be able to warp it to be frontal parallel.