I implemented a fully automatic panorama stitcher. First, I found
log-polar features in each input image using my code from Project 1.
Next, I determined which images fit together and estimated an initial
pairwise rotation between matching images using absolute orientations
(with a little help from RANSAC for robustness to outliers). Using
this pairwise alignment, my program made an initial estimate of the
global rotation of each image, then used bundle adjustment to refine
the estimate. To blend the images, I used a simple bilinear weighting
scheme.
Most components of the project seemed to work pretty well once I got
my code working. One problem was that I found that the least squares
solver was pretty slow on large input sets, so my program often spent
a long time on bundle adjustment. I switched to solving the least
squares problem using the LAPACK routine dgelsy, which uses a
"complete orthogonal factorization" of the A matrix. I'm not
sure exactly what this routine does, but I believe it uses QR
factorization to solve least squares problems. It ran quite a bit
faster than the C++ routine, although bundle adjustment still took a
significant amount of time. Even better would be to take advantage of
the sparsity of the A matrix.
[Back to top]
Here is a panorama of the mountain sequence without bundle adjustment:
Here is a panorama of the mountain sequence with bundle adjustment:
Click here to view the Quicktime VR version.
There is not much difference between the two, although the lower left
region of the panorama is noticeably sharper in the bundle-adjusted
version. There is still a bit of misregistration, however.
Here's one the the sample panoramas (the Microsoft lobby):
without bundle adjustment:
and with bundle adjustment:
Click here to view the Quicktime VR version.
There are quite a few improvements in the bundle-adjusted version,
especially in the statue.
Here's a more dramatic example of why bundle adjustment is good:
Palo Alto panorama without bundle adjustment:
and with bundle adjustment:
The ends of the panorama actually line up in the bundle-adjusted
version. However, there is still quite a bit of blur in the images,
in regions of the ground and the tree. It's not clear whether this is
because my program made a mistake or because of other factors, such as
parallax or radial distortion.
Here's a panorama I shot in the physics and astronomy building. They
have this really neat Foucault pendulum under a nice dome. I tried to
capture the motion of the pendulum in the panorama, and you can see it
if you look carefully, but a panoramic video texture would do the
graceful swinging motion much more justice.
Without bundle adjustment:
With bundle adjustment:
Click here to view the Quicktime VR version.
When the bundle adjustment step is omitted, the most noticeable
artifact is that the rails on the stairs are broken. This is mostly
corrected by bundle adjustment, although there is still a little
misregistration in a few areas, partly because the camera wasn't
carefully set up and a regular Kaidan head was used, and partly
because I think my program made a few mistakes.
[Back to top]