CS129 Project1 Color Alignment

Yun Miao, Sept 17 2012

Introduction

Prokudin-Gorskii collection is a library of triplet images taken with R,G,B color filters before color film was invented. The black and white images represent the color intensity in each of the R,G,B channel. The goal of this project is to align the three channels to recreate a color image.

Exhaustive Search

Two methods are used to find the best alignment, the first Simple Squared Difference (SSD) and the second Normalized Cross Correlation(NCC). The two methods work well on the small scale images except one (shown below), probably due to the blemish in the right corner of the red channel. In this case, a Sobel filter is used to highlight the edges of the images first. Then the edges are aligned. The exhaustive search does not work well with large scale images due to the huge amount of computation at each shift.

ssd ncc gradient

Image Pyramid

An image pyramid is used to reduce the amount of computation. The function searches for an optimal shift recursively and returns when it finds a shift after the image is scaled down to 400 by 400.

Enhancement

Cropping

Auto cropping is achieved by calculating the standard deviations of the rows and the columns of the pixels along the edge of the image. Any vector with deviation smaller than 0.05 is cropped away after the alignment.

before after

Contrast

Contrast is achieved by linearly scaling the intensity of each pixel in a channel. The ratio is calculated such that the brightest pixel scales to 1 and the darkest pixel scales to 0.

before after

More Pictures