# CS 194-26 Project 6A: Image Warping and Mosaicing

Christine Zhou, cs194-26-act

Flour

HMMB

Leconte

UCBSO

## 2/3/4. Recover Homographies, Warp the Images, and Image Rectification

In this part, we wanted to find the homographies for the image in order to warp one image into the shape of an other. First we defined the correspondences between the two images. Then, using the correspondences as our pixels, we calculated the H matrix such that H * p, a correspondence in the original image, maps to the p', a correspondence in the warped image. Once we have this H matrix, we can use the inverse of H and do an inverse mapping. This will get all the pixel values of the warped image from the original. If this is done for each of the pixels in the warped image, we will get the original image warped into the shape of the warped image. Below is an example of a two images that are warped and rectified (the output correspondences form a rectangle, effectively "rectifying" the image):

## 5. Blend the images into a mosaic

Using the warping that was discussed in the previous part, generate mosaics, panoramic-like photos. This is done by aligning the photos together and then blending the resulting image.

To do this, we again will map correspondences between the two images. Then we will keep one image static and warp the other image into the static image. Once we have the static image and the warped image, we can set each image on top of each other. There will be a visible seam between the two images, but this can be blended using alpha blending over the entire overlapping region. Some examples of the "mosaic"ed images are shown below (originals, the warped image, and then the blended images):

HMMB

Leconte

UCBSO (left and middle)

UCBSO (right and middle)

## 6. What I Learned

I learned that these panoramic-like photos do not involve math that is too complicated, and with just matrix multiplications we are able to align images together. I also learned that it is very important that the correspondences are carefully picked; if the points are just barely off then the resulting image will not be aligned very well.