CS766 Project 2: Panoramic Mosaic Stitching

Project Report

Aubrey Barnard

Tuesday, October 14, 2008

Description

For this project I chose to work with Java. This had the advantage of being familiar and having a library with some image capabilities already attached.

I consider my implementation a straightforward implementation. The inputs are a directory containing a series of images in panorama order and a directory in which to place the generated images.

Requirements

My project is perhaps slightly unusual in that it has a few software requirements. These requirements are: java, make (GNU make), ImageMagick (convert), and a bash-compatible shell. These requirements are not unreasonable as any Linux-based system set up to work with images should have these. My project benefits significantly from leveraging this other software.

How to Run the Software

From the base directory of the project, run a command like the following:

bash src/panorama.sh images/resized/allenGarden1 results/allenGarden1

The first argument to the script is the directory containing the images to be stitched together into a panorama. The images must be in a sequence when the file names are sorted. The second argument is the destination directory where the results are placed and all the intermediate work is done. The result is stored in the destination directory as 'panorama.jpg'.

Panoramas

The following images are some of the panoramas I created.

Allen Gardens 1

Allen Gardens 2

Bascom Hall

Wisconsin Historical Society Hall

Wisconsin Historical Society Reading Room

Observatory Drive

Tripp Hall Lawn

Test Images

Allen Gardens 1 in Panorama Viewer

Results

My program appears to successfully create panoramic mosaic images from a series of images taken in rotation. Unfortunately, my program is not that robust, and suffers accuracy when the SIFT features are inadequate or have a higher variance than the program tolerates. This can be helped by tweaking the variance parameters, but this does not help in all cases. For example, the panorama of the test images has many artifacts. I am not sure why this is, exactly, given that my program works well on my own series of images. I tried tweaking parameters to see if it would help, but I couldn't find a setting that fixed the panorama for the test images. This seems to be a problem when image features are sparse. Without enough features, an incorrect consensus can be formed, and consequently the images are stitched incorrectly.

My favorite panorama is the first one from the Allen Gardens because of its variety and inspiring subject. That is the panorama I want to submit for the image contest.

Implementation Details

The only detail of my implementation that deserves mention is that I modified the RANSAC algorithm. This algorithm I used to find a sample consensus is based on the random sample consensus algorithm, but has a few differences. For this project, the model is a homography, specifically a translation. A translation only has two degrees of freedom, so one pair of points (a correspondence of two image features) suffices as the sample. Since the sample size is one, the algorithm might as well generate a model for each sample and compare it to the best-known model. This approach is guaranteed to find the model that is the best consensus. This approach simplifies several aspects of the random sample consensus algorithm without loss of functionality for this assignment. I can elaborate if there are questions.

Extensions

I did not implement any extensions.

Effort

I worked alone on this project. This project also took lots of effort, but was much more straightforward than the previous project.