• Intro
  • Homography
  • Rectification
  • Mosaic
  • Summary

Panorama Stitching

Karl Cempron: CS194-26-AEG

The purpose of this project is to use image warping to achieve wide panoramas from multiple images of the same source content. This part will contain the first half of the project, discussing homography, rectifying an image, and finally, creating a mosaic.

A sample panorama!

The Homography Matrix

In projective geometry, a homography is an isomorphism of projective spaces, induced by an isomorphism of the vector spaces from which they are derived. By limiting the movement of our camera to rotation we are able to generate different perspectives within an image. We can select correspondence points in order to find out how an image was warped, and then rectify them such that the images exist on the same 3d plane. To do this we needed to solve a system of linear equations with 8 unknown variables. Because each correspondence gives us 2 equations each, we could technically solve it with only four correspondences, but to account for possible noise and other shifts more are used to overconstrain the system and is then solved using the least-squares method.

Linear Equation solving for 8 unknowns.

Least Squares approach

Image Rectification

To test the implementation of the homography matrix, we take images and rectify them using four points. The result warps the images to a new planar perspective. In the examples provided I chose to warp them into rectangular forms.

Art Gallery

Wall Painting rectified

Edgy Sign

Rectified Edgy Sign

Image Mosaic

Finally, we warp the images so they're registered and create an image mosaic. Instead of having one picture overwrite the other, which would lead to strong edge artifacts, I use weighted averaging. For mosaics that consist of more than 2 images, I first stitch the first together and then stitch additional ones after with the resultant. The final images displayed below have been cropped to remove any unwanted backgrounds.

Left Image

Right Image

Thames Panorama

Left Image

Right Image

Fireplace Panorama

Left Image

Center Image

Right Image

Road Panorama

The Reflection

Firstly I was impressed with how it was possible to warp 1 image into another plane via a 3x3 matrix and perhaps was more surprised on how someone was able to derive such an awesome transformation. Secondly, I was surprised on how easy it is to actually make panoramic images. Though this algorithm currently requires manual selection of correspondence points, I am still thoroughly impressed by how straightforward the procedure was.