CS 129 Project: Image Alignment Writeup

[Yipin Zhou] (zyp)
September 16 2012

Single scale algorithm

Before doing alignment, it is necessary to remove the borders of images to improve final results. I have tried keeping 90%,80%,70% and 50% of the internal pixels to do alighment and 70% one has the best preformance. In this part, I exhaustively search over a window of [-15,15] pixels and evaluate each shiftments by computing sum of squared differences(SSD) between two channel images. For low resolution images single scale algorithm works pretty well, but for high resolution images [-15,15] size shift window is not enough, some of the results are blurred. It is not a good idea to expand the size of the window which will cause a much slower results. The two images below are one of good results(left) and bad results(right).

Multi scale algorithm

To improve and speed up the results of high-resolution images, image pyramid method is used. And the size of shift window becomes smaller and smaller from coarse level to fine level. High resolution images and most low resolution images are aligned well through this algorithm except one low-reso image because the coarsest level of that image is too small to be aligned properly(my point of view). The two pictures below are one of good results(right) and the low resolution bad result(left).

Combine scale algorithm

To guarantee the aligning quality of both high-reso image and low-reso image and the preformence of the algorithm, I combined single scale algorithm and multi scale algorithm. After border removing, if the larger dimention of the image is smaller than 350 pixels, single scale algorithm will be applied, otherwise, multi scale algorithm will be used. Images below are the results of the combine scale algorithm.

Additional results

Images below are aligned by combine scale algorithm. The low resolution images are on the left side and high resolution images are on the right side.

Extra credit

Automatic contrasting

I have tried several ways to implement image contrasting. Applying image with the unsharp filter seems work best. The two image below are results of auto contrasting, the left one is original image and the right one is contrasting image.

Automatic white balance

My color balancing algorithm is based on Gray World Assumption, that is, given an real world image, the red, green and blue channels will average out a gray value. The left image below is original image, and the right image is the image after color balancing.

Evaluating by gradients

Gradients image is gained by applying the original image with Sobel filter. The left image below is result image of alignment evaluating by gradients and the right image is the according gradients image.