CS4670 Project 3 - Panoramas
Kolbeinn Karlsson (kk752) and Pradeep Gopinathan (pbg42)
10/18/12
In this project, we implement a program that takes a series of overlapping images and stitches them together into a panorama.
Part 1: Spherical Warping
This was pretty straight-forward. We just had to convert from spherical
coordinates to Euclidian ones and add radial distortion. The change
from spherical coordinates was done in the following manner:
![(\hat{x},\hat{y},\hat{z}) = (\sin \theta \cos \phi, \sin \phi, \cos \theta \cos \phi) (\hat{x},\hat{y},\hat{z}) = (\sin \theta \cos \phi, \sin \phi, \cos \theta \cos \phi)](../../../../../../../tmp/klf_2012-10-18_16-45_du3610.png)
We then normalized the coordinates by projecting them to the z=1 plane:
![x'_n = \frac{\hat{x}}{\hat{z}} x'_n = \frac{\hat{x}}{\hat{z}}](../../../../../../../tmp/klf_2012-10-18_16-51_uo3610.png)
![y'_n = \frac{\hat{y}}{\hat{z}} y'_n = \frac{\hat{y}}{\hat{z}}](../../../../../../../tmp/klf_2012-10-18_16-51_EV3610.png)
Finally, we apply radial distortion:
![x'_d = x'_n (1+ \kappa_1 r^2 + \kappa_2 r^4) x'_d = x'_n (1+ \kappa_1 r^2 + \kappa_2 r^4)](../../../../../../../tmp/klf_2012-10-18_16-51_LG3610.png)
![y'_d = y'_n (1+ \kappa_1 r^2 + \kappa_2 r^4) y'_d = y'_n (1+ \kappa_1 r^2 + \kappa_2 r^4)](../../../../../../../tmp/klf_2012-10-18_16-52_SF3610.png)
Then we are good to go.
Part 2: Alignment and RANSAC
The base case of translation was quite easier than the homographies.
While the math behind the homographies was not too difficult to
understand, it was difficult using the package to get it to do exactly
what we wanted it to do.
Part 3: Blending images
The images were blended using simple
feathering. We the used the alpha channel to keep track of the
accumulated weight of each pixel to normalize it in the end.
Results
The test sequence
![Test sequence panorama](testseq.jpg)
Unfortunately we didn't get the interactive panorama viewer to work in
time for the deadline, so this plane-ol' non-interactive image will
have to do.
Our images
Our panorama did not go all to well.
![w01.jpg](w01.jpg)
![w02.jpg](w02.jpg)
![w03.jpg](w03.jpg)
When we ran Panorama on it, all we got was this:
![panorama](pano.jpg)
We got the same output from the solution executable, so the problem is
presumably not in our code, but in the quality of the images or the
feature matcher.
360 Panorama
We also tried making a 360 panorama with the test images supplied and it worked beautifully:
![pano_360.jpg](pano360_th.jpg)