CS194-26 Project 5a: Image Warping and Mosaicing

Shreyas Patankar

Shoot the Pictures

For the purposes of Part A, I have shot the following photos of my living room to ultimately stitch together:

Left Shot
Middle Shot
Right Shot

Recovering Homographies

The next part in the project was to compute the Homography matrix to create the "perspective change." I first began by selecting 5 keypoints in each image. I selected the keypoints as follows:

Left - Middle Keypoints
Middle - Right Keypoints

Then the homography matrix was computed using least squares to solve for H in the equation p' = Hp, where p represent the points in the original image, and p' represents the transformed points.

Image Rectification

The homography matrix H was then used to "perspective change" the photos. In my case, I chose to change all images to match the perspective of the middle image. Below, I have shown 1 example of my homography translation for the left -> middle change.

Left Original
Left After Homography

Blending the images into a Mosaic

I tried for very long to blend the images into a single mosaic, but was having quite a bit of trouble. While I am close to a solution, I have presented here the manual stitching of all images after the homography transformation for proof of concept. Hopefully I will have the mosaicing working in the next day or so. For now, here is the manually stitched image:

Stitched image (manual)

Final thoughts

After completing this part of the project, I am quite impressed by the amount of precision with simply selecting the 5 keypoints that I did. Although I did not 100% get the mosaicing part, I was excited to see that my images fit together nicely even while manually completing the mosaic! I am excited to move to the auto-stitching portion of the project where I can continue to learn about these concepts.