CS1290 Project 1: Image Alignment with Pyramids

Name: Chen Xu
login: chenx

Algorithm Design

The algorithm tries to align the three different RGB channels of a given glass plate image, and create the corresponding color image. Normalized cross correlation is used to measure the alignment.

Let image1 = image1 - mean(image1), image2 = image2 - mean(image2)

Normalized cross correlation: dot( image1./||image1||, image2./||image2|| )

Image pyramids are used to make the search process fast. Shift values are recorded for each pyramid level from top to bottom. If (xi, yi) is the shift value of level i, the final accumulated shift value is

Shift_x = sum(xi*2^i), where i = 0 ... level-1. The down sampling is performed by first using a Gaussian kernel to filter the intensity image and then picking up every other pixels from source image.

Below are some of the derived color images.

Discussion and Extra Points

Automatic image cropping is done to reduce noise in source image before alignment. Horizontal and vertical gradients are calculated by applying sobel filter to the glass plate image. Rows and columns with largest row sum or column sum of gradients near borders are found, and the glass plate images are cropped along those rows and columns.

The following table of images shows the gradient map, the results of cropped channel images and color image drived before and after automatic cropping. It shows that, removing the white and black borders makes the results much better.
Gradient Map Crop Result Before Cropping After Cropping

Results

Here are the some results from Library of Congress.

Here are more results, including high resolution images.