Introduction

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.

Sergei did something clever: he recorded three exposures of every scene onto a glass plate using a red, a green, and a blue filter. In this project we take those three exposures and atempt to align them to create a full colored image.

Step 1: Image Alignment

In order to align the images properly, we can start with a very simple naive approach. We'll keep a single color stationary, in the case of the project we'll go with the color green, and try aligning the other color images (red and blue) to the green one. Then, to find the correct alignment, we'll try various pixel displacements ranging from -15 to 15 for both the horizontal and vertical directions. In order to find the best alignment in that range, we'll use the SSD (Sum of Squared Differences) of the current color photo with the green photo. Below are the results for low resolution photos.

Low Resolution Photos

  • settlers.jpg

    Blue: (0, -7) Red: (-1, 8)

  • nativity.jpg

    Blue: (-1, -3) Red: (-1, 4)

  • cathedral.jpg

    Blue: (-2, -5) Red: (1, 7)

  • monastery.jpg

    Blue: (-2, 3) Red: (1, 6)

Step 2: Handling Large Resolution Images

In order to handle large scale photos, we can no longer approach the problem using the same -15 to 15 range for each alignment. However, if we scale the range up to something like -100 to 100, our computation time will take too long. That's where an image pyramid comes in. We essentially downscale each photo by a factor of 2 until the photo reaches a height with pixel length less than 300. Then, we recursively use our naive alignment and continue to align going to higher and higher resolutions. As a result, we can instead compute a -15 to 15 range alignment for the 300 height photo and only a -2 to 2 range for each upscaled photo. This distractly reduces the computation time for a -100 to 100 range. Below are some examples for the higher resolution photos.

High Resolution Photos

  • emir.tif

    Blue: (-24, -49) Red: (17, 57)

  • three_generations.tif

    Blue: (-14, -53) Red: (-3, 58)

  • train.tif

    Blue: (-5, -42) Red: (27, 43)

  • icon.tif

    Blue: (-17, -41) Red: (5, 48)

  • village.tif

    Blue: (-12, -64) Red: (10, 73)

  • self_portrait.tif

    Blue: (-29, -78) Red: (8, 98)

  • harvesters.tif

    Blue: (-16, -59) Red: (-3, 65)

  • lady.tif

    Blue: (-9, -51) Red: (3, 61)

  • turkmen.tif

    Blue: (-21, -56) Red: (7, 60)

Struggles

Unfortunately, there were a few struggles along the way that prevented getting perfect alignments at first. At first, I didn't realize that cropping was necessary to get a better alignment. However, after cropping about height/10 pixels, the images aligned significantly better. Additionally, emir.tif was not aligning properly when aligning against blue, so instead, I aligned against green and as a result, all the photos aligned much better.

Extra Photos from Collection

  • 00453u.tif

    Blue: (-10, 32) Red: (9, 49)

  • 00470u.tif

    Blue: (17, -61) Red: (-26, 55)

  • 01003u.tif

    Blue: (-13, -54) Red: (14, 75)

  • 01031u.tif

    Blue: (-13, -15) Red: (1, 27)

  • 01043u.tif

    Blue: (-10, 16) Red: (8, 26)

  • 01654u.tif

    Blue: (-9, -30) Red: (8, 100)