Colorizing the Prokudin-Gorskii Photo Collection

CS 194-26 Project 1 by Muhab Abdelgadir

After being given various 3 grayscale images, we are to recreate color images from the Prokudin-Gorskii Photo Collection.


We are given a total of 14 images to colorize, however they come in 3 grayscale images initially:

monastery

tobolsk

Therefore, we must split the images and layer them as RGBs in order to further understand how we can align them, to take a step towards creating a single, colored image.

After we stack the image, we are left with a single image, however the images are not properly aligned. Thus we must determine the next movement for each of the RGB channels in order to make a distinguishable color image.

MID

Methodology

In order to further determine the displacement of each RGB channel, and calculate the best value in which to properly align each image. Utilizing Normalized Cross-Correlation and Sum of Square Differences, both are used in moving channels and comparing them to other channels. This algorithm compares 2 channels initially, applies the most optimal displacement, then compares it to the final channel, and applies another transformation.

Normalized Cross-Correlation and Sum of Square Differences do not efficiently work on larger images, therefor a new more efficient way must be utilized: the Image Pyramid method. Initially, the most optimal movements for downsized versions of the image, then the image is rescaled. From here, apply the same movements of the downsized versions to the larger image but with larger power/exponent. Normalized Cross-Correlation yielded better results, thus it is primarily used.

Alignment: I did not necessarily face major problems, however, when first approaching the project, my images would not align properly. However, instead of using the Sum of Square Differences to determine channel displacement, I simply began to implement the Normalized Cross-Correlation, as well as the Image Pyramid method, and my images better lined up.

MID

Color Anomalies: Another issue I encountered, was cropping the images after they were aligned. After aligning them, there were various color anomalies along the border. INSERT IMAGE. To fix these color anomalies on the edges, as they are not necessary to the image, I crop these image channels AFTER alignment to finish the image off in its recolorized state. However, I did not crop 4 images: Castle.tif, harvester.tif, lady.tif, train.tif. They resulted in a "Lossy conversion from uint16 to uint8. Losing 8 bits of resolution. Convert image to uint8 prior to saving to suppress this warning" error, so I let them be as they were losing bits per crop.

MID

Observe the color anomolies at the top of the image above.

Conclusion and Results

Overall, I have concluded that utilizing the sum of square differences yields almost the same value and effectiveness as Normalized Cross-Correlation. Also, it is apparent that the Image Pyramid method was the most effective and efficient, and after image alignment and coloring, cropping color anomalies along the edges results in the best image restorations.

Here are all the final results of colorizing the Prokudin-Gorskii Photo Collection:

MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


MID MID


Results of Select Images from Prokudin-Gorskii Collection

MID MID


MID MID


MID MID


MID MID


Displacements:

Castle: (4, 100); G: (36); B: (0, 0)

Cathedral: R: (2, 10); G: (2, 4); B: (0, 0

Emir: R: (40, 104); G: (24, 48); B: (0, 0)

Harvesters: R: (12, 124); G: (16, 60); B: (0, 0)

Icon: R: (20, 88); G: (16, 40); B: (0, 0)

Lady: R: (12, 108); G: (8, 48); B: (0, 0)

Melons: R: (16, 180); G: (12, 84); B: (0, 0)

Monastery: R: (2, 4); G: (2, -2); B: (0, 0)

Na Uralie: R: (6, 10); G: (4, 4); B: (0, 0)

Onion Church: R: (36, 108); G: (24, 52); B: (0, 0)

Piony: R: (0, 12); G: (0, 6); B: (0, 0)

Self Portrait: (36, 172); G: (28, 76); B: (0, 0)

Siren: (-2, 10); G: (0, 4); B: (0, 0)

Three Generations: (8, 112); G: (12, 52); B: (0, 0)

Tobolsk: R: (2, 6); G: (2, 2); B: (0, 0)

Train: R: (32, 88); G: (4, 44); B: (0, 0)

Workshop: R: (-12, 104); G: (0, 52); B: (0, 0)

Zakat: R: (-6, 12); G: (-4, 8); B: (0, 0)