Images of the Russian Empire: Colorizing the Prokudin-Gorskii photo collection

Overview

In this project, I took the digitized Prokudin-Gorskii glass plate images and then produced color images. The original glass plate images had 3 parts from top to bottom, each using blue, green, and red filters. I extracted these 3 parts and placed them on top of each other to create a color image. The programming language I used was Python.

Single-Scale Appoach

For smaller image files ('cathedral.jpg', 'monastery.jpg', 'tobolsk.jpg'), I used naive approach (two for loops) to search for a small displacement that would align the green (or red) part to the blue part of the image. The displacements I chose to search was from -15 to 15. Eventually, the displacement that yielded the maximum score was chosen. The scores were calculated using Normalized Cross-Correlation.

green offset: 0, 0
red offset: 8, 0

green offset: -8, 0
red offset: 8, 0

green offset: 0, 0
red offset: 8, 0

Multiscale Appoach

For larger image files (.tif), I used the image pyramid approach which provided a faster search. To do so, I chose to downscale the images by 0.125, 0.25, and 0.5. I first downscaled the 2 images and then applied the naive approach described above. Finally, I multiplied the best displacement metrics by 2 to align with metrics at the level above it. This algorithm eventually returned the best displacement at the original scale (scale=1).

green offset: 0, -8
red offset: 48, -8

green offset: 0, 8
red offset: 104, 16

green offset: 120, 0
red offset: 120, 8

green offset: 48, 16
red offset: 88, 16

green offset: 56, -8
red offset: 120, -16

green offset: 80, 0
red offset: 120, -8

green offset: 56, 16
red offset: 104, 8

green offset: 32, -8
red offset: 112, -24

green offset: 48, 0
red offset: 120, -8

green offset: 56, 8
red offset: 104, 8

green offset: 112, -8
red offset: 104, 0

Examples from Prokudin-Gorskii Collection

green offset: 8, 0
red offset: 12, 0

green offset: 4, -4
red offset: 12, -8

green offset: 0, 0
red offset: 8, 0

Challenges

My algorithm did not align some of the images very well. I think it was because I used fixed parameters for all images. These might work for some images but not the others. It could also be due to the different brightness of these images, making the calculation of score inaccurate. Moreover, aligning based on the similarities between the images' RGB values might not be the best indicator.

Bells & Whistles

Since when aligning the 2 parts of an image, I used Normalized Cross-Correlation to calculate a score, it would take the borders into consideration. However, since these borders did not align exactly and thus had strange colors, I would like to crop them off before calculating the score. To do so, I used 'sk.feature.canny' as the edge detector. I applied this technique on 'monastery.jpg' and 'tobolsk.jpg', and they clearly demonstrated improvements on the images.

Left/Before:
green offset: -8, 0
red offset: 8, 0

Right/After:
green offset: -4, 0
red offset: 4, 0

Left/Before:
green offset: 0, 0
red offset: 8, 0

Right/After:
green offset: 4, 0
red offset: 8, 0