Project 5: Stitching and Mosaics

Part 1: Image Warping and Mosaicing

Took three pictures of my living room to try to turn into a mosaic!

1.1: Recover Homographies

In [6]:
 

Using the above formula and least squares, I was able to get the values for a through h to use as values for H in the next part

1.2: Image Warp and Rectification

Using the equation p' = Hp I solved for p by applying the inverse homography matrix on the set of all coordinates, then normalizing all the x,y coordinates to 1 by dividing by w to get the rectified images.

Left, center and right image respectively!

In [7]:
 

Rectified Images:

In [9]:
 

1.3: Image Stitching

For this part, I took the three images and stitched them together to produce a mosaic. For some reason, the mosaic looks disoriented because I messed up one of the functions.

In [10]:
 

Conclusion

I had a great time working on this project and it was pretty cool to see how mosaics are created