Project 1 Writeup

Chao Qian (chaoqian)
September 16, 2012



Goal And Algorithm

The goal of the project is to align an image with blue, green, red channels, and than combine them to a colorful image as real as possible. To achieve the goal, we must implement a good and reasonable algorithm to align them with both accuracy and efficiency. The Algorithm used here should be the best compared with some other algorithms being implemented. The comparison metric can be modified yourself, in this project I use SSD and NCC to see which is the best algorithm. Other metrics is described in extra credit.

Description of my project

First thing to mention is that before starting the aligning process, I cut the border of the image to make sure that when starting the aligning process, more accurate and realistic pictures can be obtained. The border of a image is predefined as of the 15% of image height and width. Than, I tried the metrics using SSD and NCC, but I found that both metrics have some misalignment. And for the small JPG images, the single-scale implementation seems better and for the large TIFF images, it is better to use 5-6 level multi-scale implementation.

Discussion on the result

There is an interested result I want to discuss here, when applying multi-scale implementation( 3 or 4 level) to small images, all the result except image3 ( called '00153v.jpg') is OK. For image3, the red part was always misaligned if the pyramid's level is higher than 3. Like the image below:

The alignment using Pyramid( level 2) for image3

The alignment using Pyramid( level 3) for image3





Both SSD and NCC metrics gives the bad result on level 3, The reason I think is that if the Pyramid's level is too high, the image is too blur to detect the accurate shift vector.

Extra Credit

  1. Automatic cropping

    I did automatic cropping as a way to detect the borders and the algorithm used here is to calculate the average value of the intensity( mean_value) of the blue, green and red channels of the picture. And for each row/column I also calculated the average, if the diffusion of (1.0-average) and (average – 0.0) is beyond the range of [0.1* mean_value , 0.3*mean_value], than these lines or cols are borders and remove the border to get the more accurate image.

Image result with cropping

Image result without cropping





Results Images













Selected Large Images



























Extra Data

Original

After Aligning