Project 1 Submission

Name: Rohan Murthy

Instructional Account: cs194-26-adk

Overview:

This project allowed us to use computational photography to create colored images from non-colored images. The way this is done is by laying color channel photos on top of each other based on a certain alignment. For each of the pictures, there are three glass plates for the color channels; Red, Green, and Blue. It was our task to devise an algorithm that will align these three plates in such a way that will produce the best color image possible.

My Approach:

Firstly, I took the image with the three panels and got each of the color channel panels by dividing into three, vertical-wise; blue, then green, then red. For alignment, I first align the green channel with the blue channel. Then, I align the red channel with the newly aligned green channel. The reason for aligning in this order is because the filter order from top to bottom is BGR. To do these alignments I made an algorithm to find the correct (x,y) translation that will yield the highest normalized cross correlation between two channels.

Here is my algorithm to find the best (x,y) translation for alignment:
First, I crop the images that are being aligned. For smaller images I crop 100 pixels from the left, right, top, and bottom of the images. For larger images I crop 200 pixels from the left, right, top and bottom of the images. The reason this is done is to get rid of noise near the border of the images.

Results of running my algorithm:

Monastery:

Settlers:

Cathedral:

Nativity:

Harvesters:

Emir:

Three Generations:

Turkmen:

Lady:

Train:

Icon:

Self Portrait:

Village:

Railroad:

Blast Furnaces: