Sergei Mikhailovich Prokudin-Gorskii (1863-1944) 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. 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.
I have attempted my own resurrection of Prokudin-Gorskii's art over here. Please see my technique below and some results following that.
I have got my hands on the digitized Prokudin-Gorskii glass plate images and am automatically producing a color image from it.
My Algorithm:
The alignment is done using a pyramid approch where the matching is first done on an image which is one eight of the original size, then one fourth, then one half and then full. This helps to narrow the search space for template offsets because say the image which is scaled down to eighth returns an offset of 2 then the full image cannot have an offset between 8 and 24.
Also, to align the image I use the L2 norm also known as the Sum of Squared Differences (SSD) distance which is simply sum(sum((image1-image2).^2)).
Extra Credit:
I intelligently crop the images automatically to take the borders out so that the artifacts from the misaligned image are removed.
Template Images | Composed Image | Offsets: GB_X, GB_Y, RB_X, RB_Y |
4, 1, 9, -1 | ||
2, 3, 5, 5 | ||
6, 1, 12, 0 | ||
2, 2, 4, 3 | ||
2, 0, 6, 0 | ||
1, -1, 13, -1 | ||
1, 1, 4, 2 | ||
5, 1, 11, 1 | ||
6, 2, 14, 4 | ||
39, 15, 90, 33 | ||
47, 38, 107, 55 | ||
35, 25, 51, 38 | ||
42, 5, 87, 32 | ||
14, 6, 49, 14 | ||
57, 25, 125, 33 | ||
16, 2, 42, 4 | ||
-16, 10, 11, 17 | ||
24, 20, 71, 33 |