Programming Project #5
15-863: Computational Photography
Ashique KhudaBukhsh
Stitching Photo Mosaics
Due Date: 11:59pm on Thursday, November 17, 2011
Project Description
Part A
In this part, we shoot and digitize images for stiching photo mosaics and performing image rectification. In order to stich photo mosaics, we first speficy corresponding points in an image pair (A and B) and then compute the homography of one image (A) to the plane of the other image (B). After that, we warp the image (A) using that homography and then blend the warped image (warped A) with the other image (B). In order to stitch three images (A,B and C) for my project, I projected A and C onto B and then stiched all the images together using alpha-blending.
Part B
In this part, we try to automate the entire process.
Design Specifics in part B
- First Harris corner points are detected.
- Adaptive Non-Maximal Suppression is used to make the points evenly distributed and also reduce the size of the problem. In the end, 250 points are chosen.
- Feature descriptors are extracted using the methods described in the MOPS paper.
- Feature matching is implemented considering nearest and second nearest neighbors.
- Homography is computed using the 4-point RANSAC algorithm as taught in the class.
- 1000 iterations of 4-Point RANSAC is used.
The third part of the project can be found here.
Sample Panorama
Original Images
Stitched Panorama
Automatically Stitched Panorama
Original Images
Harris Corners of the leftmost image.
Points obtained after using adaptive non-maximal suppression.
Stitched Panorama
Automatically Stitched Panorama
Original Images
Stitched Panorama
Automatically Stitched Panorama
The panorama also serves as a bells and whistles where I have put multiple images of the same person in my panorama.
Image Rectification
I tested my homography function by rectifying the following images. In the first case, I tried to make the face of the packet parallel to the viewing plane. In the second case, I tried to make the window pane parallel to the viewing plane.
Original Image
Rectified Image
Original Image
Rectified Image
Bells and Whistles
This is how I wish the Busstop sign, right in front of my house, should look like :-).
However, this is how it actually looks like.
This is not the best way to do business I guess.
I used mixed blending from Project three to blend the projected logo. This was the original.
A graduate vampire spends all his night at work.
And it is quite natural that during the daytime, he is sleep-deprived enough to have illusions like this.
And he sees Tarkovsky's mysterious dog in Stalker on a GHC wall.
When he gets enough sleep, he sees a different picture though.
Better Blending
It is clear the the four-level laplacian pyramid blending looks nicer than a two-level one. The six-level one looks a better blending of the sky and the nine-level one has the nicest blending of the sky.
9-level
6-level
4-level
2-level
Acknowledgement
I used the webpage of Natasha, our TA, to format my submission.