Project 01

Images of the Russian Empire: Colorizing the Prokudin-Gorskii Photo Collection

Devesh Agarwal


Overview 

“Color is a power which directly influences the soul.” ~Wassily Kandinsky

The Prokudin-Gorskii collection of photos are an inspiring set of photographs from as early as 1907 taken by Sergei Mikhailovich Prokudin-Gorskii. Some of the earliest photographs taken in color, these images are a direct window into the past. However, restricted by the technology of the time, Sergei came up with an innovative solution to preserve color in his photographs. For each picture, he recorded the exposure on a red, blue, and green filtered plate. 

In the course of this project, I have used different means of alignment and enhancement to combine these plates and create colored images of Sergei's subjects.

Naive Approach: Single-Scale Implementation

First, I implemented an exhaustive search approach to align the frames by creating a simple exhaustive search implementation that used given ranges to iterate through each frame and calculate the displacement offsets.  

To achieve this, I used two algorithms: 

Σ (image1 - image2)2

(v / ||v||) • (v2 / ||v2||) 

This approach worked successfully on low-resolution images and created colored images showcasing the beauty and glory of the Russian Empire in the twentieth century. I noticed that the normalized cross-correlation metric performed more effectively and provided cleaner results. 

However, on high-resolution images, exhaustive search using either algorithm turned out to be too expensive on time. 

Cathedral
R: (12, 3) G:(5, 2)
Monastery
R: (3, 2) G: (-3, 2)
tobolsk
R: (6, 3) G: (3, 3)

Advanced Approach: Multi-Scale Pyramid Implementation

Since exhaustive search could cover small ranges of values, the window for search would be smaller than optimal and not provide the appropriate displacement. Thus, I implemented a multi-scale pyramid.

This algorithm rescaled the red and green frames to smaller images and calculated the displacement offsets on them. It then propagated and rescaled the displacement vector to the original size.

This sped up the process and achieved better-merged images.

R: (123, 9) G: (60, 18)
R: (84, 28) G: (41, 8)
R: (95, 4) G: (35, 4)
R: (90, 22) G: (42, 16)
R: (115, 12) G: (57, 17)
R: (105, -12) G: (52, -2)
R: (107, 35) G: (52, 24)
R: (120, 13) G: (56, 10)
R: (107, 40) G: (49, 23)
R: (130, 14) G: (79, 9)
R: (129, 45) G: (77, 29)

Bells and Whistles

Edge Detection

Although most images were aligned appropriately using the multi-scale pyramid implementation. Some of the images were not aligned very well at any level of recursion of the pyramids. This could be due to the misalignment in brightness/intensity in each frame. To solve for this problem, I implemented an edge detection algorithm using canny that calculated for edges within each frame of the image and then aligned using normalized cross-correlation of the boolean matrices containing the edges. This gives us a lot more comprehensive algorithm that corrects the displacement using edges in the image.

Automatic Contrasting

In order to further enrich the images, I implemented an auto-contrasting method that effectively rescaled the exposure intensities to values within the middle 85% range of intensities. This regenerated the image with more pronounced colors and enriched the image.

Melons, Pyramid Implementation
Melons, Edge Detection Applied
Melons, Automatic Contrast Applied
Self Portait, Pyramid Implementation
Self Portait, Edge Detection Applied
Self Portait, Automatic Contrast Applied
Emir, Pyramid Implementation
Emir, Edge Detection Applied
Emir, Automatic Contrast Applied
Onion Church, Pyramid Implementation
Onion Church, Edge Detection Applied
Onion Church, Automatic Contrast Applied
Icon, Pyramid Implementation
Icon, Edge Detection Applied
Icon, Automatic Contrast Applied
Workshop, Pyramid Implementation
Workshop, Edge Detection Applied
Workshop, Automatic Contrast Applied

Custom Images

I scoured the Library of Congress for images that I saw in black and white and yearned to see in color. I implemented my pipeline on these four images that each represent a part of Russia that I relate with. After implementing my pipeline on these images, I saw glistening pictures of a hundred years ago and suddenly all seemed normal. I wondered if the magic I was so intoxicated by came from the lack of color. In the black and white a full spectrum of mystery lay. Food for thought.

Naziya
Sculpture
Church Profile
Farm