Image Warping & Mosaicing

Nancy Li



Overview

The goal of this project is to get familiar with image warping, and a cool application of it: iamge mosaicing! Part A of this project involves computing a homography between a pair of images, to project one image into the geometry of the other. Then, we are able to blend warped images together to create a panorama image.


Computing the Homography Matrix

After asking for at least 4 user defined input points, we compute the variables of the homography matrix using linear algebra. We solve for Xh = X', where h is an 8x1 vector represeting the 8 unknowns of the homography matrix, X is the user defined points, and X' are rectified points. Images are then warped using the homography matrix.



Card image cap

Original hotpot table

Card image cap

Card image cap

Original view of a sign

Card image cap

Now you can read the words!




Mosaic

Choose one image as the base image. The other image is taken and warped to the base image's coordinates. Then use linear blending to blend the two pictures into a panorama; along the seam, a weighted average of the two images is computed.
I took pictures of the interior of a library at Alameda. Due to time constraints, I have only managed to finish one mosaic. The pictures were taken on a phone, and you can see some image artifacts on the rug due to alignment issues.


Card image cap

Left view

Card image cap

Center view


Card image cap


What I've learned

This is how phones automatically make panoramas! I learned that a simple 3 by 3 homography matrix is enough to warp an image into a whole new geometry, so powerfully that I can even read a sign that I could not read in the original image. I also learned the importance of taking good photographs with good alignment; sometimes image artifacts are unavoidable no matter how good the mosaic/blending algorithm is, if your images don't align well.




HTML/CSS for this page was taken from https://v4-alpha.getbootstrap.com/components/card/