Jonathan Beall's Panorama Stitcher

Design

Basic Operation

My stitcher implements the basic operations of warping images to spherical coordinates, using RANSAC to find the translational motion between two matched sets of features, stitching a number of images together into a panorama according to these alignments, cutting off the overlap from a 360° panorama, and transforming it so the two ends will align vertically.

Extra Features

In addition to these basic features, I have enhanced the panorama program in several ways. I edited the image library to remove all but one of the compiletime warnings. Athough I implemented other features, these were not completed until after the initial code duedate. However, I did implement automatic gain compensation (Add an extra argument to the blendPairs command, 1 to fully match gains, something between 0 and 1 to do partial compensation.) by computing the average log-intensity of the pixels in each overlapping region, then using the ratio of these averages to determine an exponential gain (while keeping the net-gain around the 360° panorama equal to 1) to be applied to the pixels of each image (while maintaining the ratios of the different colors in each pixel) before blending them. I also allow non-3600° panoramas to be created by detecting if the 1st and last images being blended do not match, and if so not cropping half of the 1st and last images, not performing the skew correction, and not ensuring that the net gain-equalization is 1.

Supporting Software

To perform the matching between features, I use the Features executable from project 1. However, I was unable to get the feature detection portion of this to work well enough to reliably create the panoramas, so I instead used a 2rd party, open source, SIFT feature detector, the code for which is included with my code. I also created several scripts to assist in automating the panorama generation process. One script, makeSiftPanorama.sh, automatically executes the programs to warp all the images in a folder, find their features, do the feature matching, align the images based on the features, and finally to construct the panorama. I also created a tiny wrapper script for the sift feature matcher I used in order to allow it to work with tga images and to output in the appropriate format for the Features executable to do the matching.

Performance and Examples

In the following examples, click on the small panorama to view a full-sized version, or click on the adjacent icon () to view the panorama in a Java panorama viewer applet.


The given test images align well, but show significant banding due to differing exposures.


With gain-compensation activated, this banding is largely eliminated.


This panorama was taking with the tripod. A couple objects show slight ghosting, but quite nice overall.


This handheld panorama demonstrates the wobble introduced by camera motion, and shows ghosting due to imperfect alignment due to un-modeled camera roll.


Although this handheld panorama was taken with a steadier hand, there are many noticible 'ghosts' cause by people walking by while the panorama was being taken.


This smaller-angle panorama demonstrates my stitcher's ability to make non-360° panoramas. Significant camera movement between shots shows up in the blurring of the nearby trees in the lower middle of the image.

Code

The latest version of the code and a binary compiled to run on an Intel Mac (binary may require 10.5 or fltk installed in /sw/) are available for download.