Project 1 CS 194-26: Colorizing the Prokudin-Gorskii Photo Collection

By Diego Uribe

Project Description

In this project I worked on colorizing images of the Prokudin-Gorskii Photo Collection. In order to this I had to extract the three color channel images from a given image. Then I had to align the images and place them on top of each other to form a single RGB colored image.

Implementation Details

Single Scale Exhaustive Search Alignment using L2 Norm

For this part I wrote an exhaustive search algorithm that took two images, some slicing parameters, and the horizontal and vertical displacement ranges. The slicing parameters were used to crop the provided image and only focus on the inner pixels, this with aims of eliminating the effect the border pixels in the distance metrics. After I sliced the images I then displaced image2 over image1 over all possible horizontal and vertical displacements in the provided ranges. In each displacement iteration I found the L2 norm between the displaced image1 and image2 and stored this displacement values if the L2 norm was less than the global minimum of all L2 norms. Then I used the horizontal and vertical translation values that minimized the L2 norm and use this to align image1 onto image2.

Green to Blue Alignment: (5,2), Red to Blue Alignment: (12, 3)

Green to Blue Alignment: (-3,2), Red to Blue Alignment: (3, 2)

Green to Blue Alignment: (3,3), Red to Blue Alignment: (7, 3)

Image Pyramid Alignment

For this part I wrote an image pyramid algorithm that takes in two images, a scaling factor, and set of levels. The algorithm would rescale image1 and image2 by the scaling factor at each level. Then in a recursive fashion, the algorithm would update the horizontal and vertical displacement ranges over which we want to compute the distance metric. Then it used the horizontal and vertical translation values to align image2 onto image1. This algorithm turned out to be much faster than the naive exhaustive search one. For all the processed images I used 5 levels and a scaling factor of 0.5.

Green to Blue Alignment: (34,3), Red to Blue Alignment: (98, 5)

Green to Blue Alignment: (48, 24), Red to Blue Alignment: (592, 36)

Green to Blue Alignment: (59, 17), Red to Blue Alignment: (123, 14)

Green to Blue Alignment: (41,17), Red to Blue Alignment: (89, 23)

Green to Blue Alignment: (55, 8), Red to Blue Alignment: (114, 12)

Green to Blue Alignment: (81, 10), Red to Blue Alignment: (178, 14)

Green to Blue Alignment: (51, 27), Red to Blue Alignment: (108, 37)

Green to Blue Alignment: (78, 29), Red to Blue Alignment: (175, 37)

Green to Blue Alignment: (52, 14), Red to Blue Alignment: (111, 12)

Green to Blue Alignment: (42, 6), Red to Blue Alignment: (86, 32)

Green to Blue Alignment: (53, -1), Red to Blue Alignment: (106, -12)

Other Examples

Green to Blue Alignment: (-15, 10), Red to Blue Alignment: (11, 19)

Green to Blue Alignment: (-28, -94), Red to Blue Alignment: (23, -83)

Green to Blue Alignment: (75, -41), Red to Blue Alignment: (113, -67)

Failure

I was not able to get the emir image aligned correctly due to inconsistencies in the brightness between the three color channels. This caused my distance metric to fail. I tried normalizing the pixel values of each color channel but could not get it to work.

Green to Blue Alignment: (48, 24), Red to Blue Alignment: (592, 36)