CS 194-26 Project 4: [Auto]Stitching Photo Mosaics

Rohan Chilukuri

Shoot the Pictures

The three scenes that I shot to make a mosaic out of are Bowles Hall (note the flying flag, this will make the mosaic in that region worse than if the photos were taken on a non windy day), and two other rooms inside the hall. The photos of each set were taken so that a large part of them overlapped and correspondences could be defined between the images.

Recover Homographies

We seek to solve for the projective transformation matrix H in

Warp the Images

All of the images are warped as defined by the homography that was solved for using least squares in the above equation. Inverse warping is used to fill in color.

Image Rectification

In order to warp an image so that a plane in the image is frontal-parallel, I define a correspondence between a square on that plane and a manually defined square in the center of the image.

Non rectified image
Rectified to left wall
Rectified to ground
Rectified to right wall

Blend the images into a mosaic

First, all the images in the scene are warped to the middle image by computing the homographies to the middle image, and warping the whole image with appropriate image boundaries computed using the corners. Then, the total image boundaries are computed by the range of where the corners of each image land after warping with the homographies. Each image is placed (from left to right) into the total image by computing the offset between the image and the top left corner, and using a laplacian stack to blend the overlapping regions. From below, can see that the images are very well aligned in the middle region where the correspondences are defined, but degrade slightly as we move away from the center.

What I Learned

I learned how to stitch and blend images. The coolest thing was how well the output of the combination of images looked, and how rectifying can allow you to see parts of your image even better than in the original image.

Bells and Whistles

To do in part B