CS 194-26

Image Manipulation and Computational Photography

Project 1: Colorizing the Prokudin-Gorskii photo collection

Parsa Fereydouni, cs194-26-agy



Overview

Sergei Mikhailovich Prokudin-Gorskii (1863-1944) [Сергей Михайлович Прокудин-Горский, to his Russian friends] was a man well ahead of his time. Convinced, as early as 1907, that color photography was the wave of the future, he won Tzar's special permission to travel across the vast Russian Empire and take color photographs of everything he saw including the only color portrait of Leo Tolstoy. And he really photographed everything: people, buildings, landscapes, railroads, bridges... thousands of color pictures! His idea was simple: record three exposures of every scene onto a glass plate using a red, a green, and a blue filter. Never mind that there was no way to print color photographs until much later -- he envisioned special projectors to be installed in "multimedia" classrooms all across Russia where the children would be able to learn about their vast country. Alas, his plans never materialized: he left Russia in 1918, right after the revolution, never to return again. Luckily, his RGB glass plate negatives, capturing the last years of the Russian Empire, survived and were purchased in 1948 by the Library of Congress. The LoC has recently digitized the negatives and made them available on-line.
To learn more about Prokudin-Gorsky's colletion click here to go to Library of Congress's website.
To download other digitized glass plate negatives click here.

Process

For this project, I proceeded as the following:

  1. Extract the three color channel images
  2. Align the imeage by exhaustively searching over a window of possible displacements, score image similarity using normalized cross-correlation (NCC), and take the displacement with the best score. I used the blue channel as the reference channel, and individually aligned the red and green channel images with the blue one.
  3. Stack the three seperate channels to get a one 3-channel RGB image.
  4. (Bells and Whistles) Increase contrast to get more vibrant images. I achieved this by some pixel value rescaling explained in further detail later
  5. (Bells and Whsitles) Crop images to remove black, white and other color borders. These borders appear as a result of the black borders and the visual artifacts of the original glass plate negatives, as well as the displacement applied to each color channel when aligning them.

Cropping

For cropping, I took each color channel and thresholded the image on that channel, setting pixel values greater than 0.05 to be equal to 1. This gave me a picture that was all white except for the darkest pixels. These dark pixels were predominantly in the margins. I found the appropriate indices by which I could crop the image so to get rid of the dark border and keep the main content untouched.

Contrasting

For increasing contrast, I sorted image pixel values for each channel, and for each channel I set the pixel values of the 0th percentile to be equal to the value of the 1st percentile, and the values of the 99th to be equal to the 100th. Then I rescaled values so that brightest pixel value becomes a 1 and the darkest to be a 0.



Examples


Icon; green (41,18), red(90,23)
Icon; without contrasting or cropping

mosque; green (52,34), red(123,61)
Village; green (52, 7), red(113, 11)