Project 6: Automated Panorama Stitching

Ben Cohen (btcohen)
April 19, 2010

Algorithm

Feature Detection & Matching

To find the matching features between the images, I first run the Harris detector on both images to find the interest points. I then select 500 of those points from each image by using the adaptive non-maximal suppression outlined in Brown, et al.. Next I compute descriptors for each feature by taking an 8x8 sample centered at each feature point and standardizing them. Finally, I find the distance between every feature point in the two images, rank them by the distance from their nearest neighbor divided by the distance from their second nearest neighbor, and then return only the points whose ratio was lower than the mean of the ratio for all the points.

RANSAC

I implemented the RANSAC algorithm as described here. For each of the 10,000 iterations, I picked four point to be the candidate points for the transformation and then computed how many of the points in the first image were correctly transformed to their corresponding point in the second image (within .5 pixels). If there were more than 10 of these points, then I compared the total error for all points to the previous best error. After all 10,000 iterations completed, I then returned the set of points which had the smallest total error.

Warping

Once RANSAC returns the four correspondence points, my algorithm computes the transformation matrix using the methods outlined in section 3 of this paper. Once the transformation matrix is computed, I warp the left image and then trivially composite the right image on top of it by copying it into the same matrix.

Results

The automatic alignment works very well for the mountain scene, most likely due to the large area of overlap. The results for the trolley aren't as good, most likely because the area of overlap is much smaller, so there are fewer feature points that actually match. The two panoramas that I made worked fairly well because I gave the two images a fairly large area of overlap.

Required Images

Additional Images