Overview
We have all played with our iphone's panaroma mode. The goal of the project is to create a panaroma by stitching together multiple images. A panaroma is essentially a wide-angle view of an image. Several devices like wide-lenses or the go-pro have this functionality. Now what if you don't have a gopro handy? The idea here is to bridge that gap. You can simply take photos with the same point of view but with rotated viewing directions and with overlapping fields of view. Then, using point correspondences we will recover homographies and perform a projective warp on the respective images. Finally, using a simple linear blend we stitch the images together to create a panaroma.
Shooting Pictures (iPhone Camera)
I used my iPhone's camera to capture all of the pictures for this project
Recovering Homographies
Since we are trying to stich together images we need to find a realtionship between them. It is given that any two images on the same plane must have a homography that realtes them. This is usually represented by a 3x3 matrix as follows:
This matrix as you can see has eight degrees of freedom and in turn only needs 4 points of correspondences. But, note that we can also solve this problem using least sqaures over many points to get a more accurate warp. Here's the Ax = b matrix used to solve the equation:For part A, to get the points of correspondences I simply recorded them manually using matplotlib's ginput(). I found that anywhere between 7-10 pts of correspondences were sufficient to get a decent H.
Warp and Image Rectification
Once I found the H matrix, by inverse warping and resampling the image I was able to warp the image based on its H. Image warping is often used to rectify images. For instance given an image with a plane like a rectangle, I simply selected 4 points that were the corners of the plane whose corresponding points were that of a rectangle. Then by applying the warp to the inverse H I was able to rectify the image. Here are my examples:
Starry Night by Van Gogh at NYC Moma (August 2018)
Rectified Starry Night
Water Lilies by Monet at NYC Moma (August 2018)
Rectified Water Lilies
Mosaics (Panaroma!!!)
The goal here is to create a mosaic given images that have the same point of view with rotated viewing angles and overlapping views. Here are my results:
One Messy Apartment
A unique light debacle at Bancroft
Just another day at the Glade
Reflections
Definetely a really interesting projects! I have always thought panaromas are cool and capture the moment (like a sunset) more accurately. I had a hard time with the warp as it required me to break down the problem into smaller problems and solve it step by step. If I had more time, I might play around with spherical/cylindrical warping. Huge shout out to Tae for help in Office Hours as well as of course the good ol' Piazza, StackOverflow, and peers for answering my several linear algebra related questions. Looking forward to Part B and not having to select pts manually!!!