CS 194-26 Project 1 - Anusha Syed

Overview

The initiative of this project was to create an algorithm to colorize images given a grey-black negative plate. The main idea behind the algorithm was to superimpose red, green and blue plates to create the clearest possible colored image.

In order to do this, I used the standard squared differenc (SSD) as a metric to approximate the best displacement to align the images. I computed the SSD while searching over the displacements between the red and blue plates then the green and blue plates, since I was aligning with the blue plate as the base.

I had two image pyramids, one to find the red and blue offsets and one to find the green and blue offsets. I implemented the image pyramid by beginning with an image of 1/16 of the original image and searching over it, rolling the next resolution image by the found offset and recursing until we grew back to the 100% resolution image.

I used a search radius of (-15, 15) for the smaller jpg images and (-5, 5) for the tif images. Although this was a fairly good search window, some images, especially the emir, were still quite blurry.

Example Images with Offsets

Icon

R-B Offest: (0, -1)

G-B Offset: (0, 0)

Harvesters

R-B Offest: (-1, 0)

G-B Offset: (0, -1)

Lady

R-B Offest: (-1, 3)

G-B Offset: (0, 1)

Monastery

R-B Offest: (1, -1)

G-B Offset: (0, 0)

Nativity

R-B Offest: (-1, 1)

G-B Offset: (1, 9)

Self Portrait

R-B Offest: (1, 4)

G-B Offset: (0, 0)

Settlers

R-B Offest: (-1, 0)

G-B Offset: (0, 1)

Three Generations

R-B Offest: (-1, 0)

G-B Offset: (1, 0)

Train

R-B Offest: (1, -1)

G-B Offset: (0, -1)

Turkmen

R-B Offest: (0, 0)

G-B Offset: (0, 1)

Village

R-B Offest: (-1, 0)

G-B Offset: (1, 0)

Emir

R-B Offest: (-1, 1)

G-B Offset: (-1, 1)

Selected Prokudin-Gorskii Images with Offsets

Church of Resurrection

R-B Offest: (4, 1)

G-B Offset: (-1, 1)

Prisoners

R-B Offest: (-1, 0)

G-B Offset: (-1, -1)

Grunzinki

R-B Offest: (0, 1)

G-B Offset: (0, -1)

Failures and Difficulties

One of the main difficulties I faced was speed. Getting the image pyramid to work efficiently and learning to utilize the numpy functions was challenging. Additionally, due to the brightness, the images of the emir and grunzinki were particularly challenging.