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

Jacky Zhao

Overview

This project is about stitching together many photographs to create larger composite images. We warp and blend together images that are of the same scenery but slighly shifted, similar to a panorama.

Recover Homographies

We first need to recover the parameters of the transformation between each pair of images: p′=Hp

We first need to figure out the values for H (a,b,c,d,e,g,h). This can be solved by setting up a system of linear equation (A*h = b) and then using least squares to solve for H. A is sized 2N x 8 as for each points, there are two rows in the A matrix.

Image Rectification

After solving for transformation matrix H, I apply it to every p' to find which p value belongs at that coordinate in order to rectify an image. I selected the four corners of flat objects in the image and then rectified them into a rectangle

Blend Images into a Mosaic

Using the technique above, I was able to make an image mosaic. I warped the second image to the first one. I then blended overlapping pixels using alpha blending so that there will be a more smooth transition between each image.

What I learned

I now have a better understand of how panoramas are implemented. It makes me curious of what other improvement/optimizations are used in industrial panorama programs like the ones in our iphones.