Project Color Alignment Writeup

Lyn Fong (lfong)
February 5th, 2010


The key to my alignment algorithm was edge detection. This was because the intensities of the images differed for the B, G, and R images, making a simple sum of squared differences iffy. The only thing that really mattered was that the edges lined up, not the values inside the edges. I only used the middle 70% of the images because the black outer borders produced strong edges that kept throwing off the alignment. I then create the gaussian pyramid. The lowest level of the pyramid is the first level at which both dimensions are less than 100 pixels long. I found that smaller images occasionally distort the important features too much and completely throw off the alignment. Next i try shifting over a window of pixels. Since the shifted picture will have empty pixels where the original image was shifted from, the distance metric is only computed over the valid pixels, and then divided by the number of valid pixels, so that the distance becomes error per pixel. This avoids giving too much error to images that shift more. After finding the shift, i record the total shift, adding it to any existing shifts, and then double it on the next level of the pyramid since the scale of the image is also doubled. The distance is computed as a simple sum of square differences over the edge image. A sobel filter was used to do the edge detection.

Results Images

I think the results are actually quite nice. The only con being that it takes quite a while to process the large images.