9.20.2011

From Russia with Love | Colorizing the Sergei Mikhailovichn Prokudin-Gorskii Collection



A quick Computational Photography project, I took Gorskii's original BW negatives from the Library of Congress and wrote an algorithm to colorize them so they could be seen as intended. (check out the rest of the images after the break, or go for the long haul at the computational photography blog)




Background
"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. 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." (15-563 computational photography)


Algorithm

Gorskii's negatives have held up pretty well considering the their age and the technology used to conceive them. However, their imperfections (the slightly blurred edges, handwritten iteration numbers, a recorded movement unique to the third frame) which make them so beautiful to the naked eye, are akin to horrible wrenches thrown into the calculated perfection of a single algorithm designed to work well for all of them. To overcome this, I do a bit of preprocessing before I calculate the alignment of the photographs, mainly cropping and some basic cleanup.


Aligning them happens in a similar fashion to how you would approach the problem if you had the negatives laying on a light board in front of you. Stack, shift one a little bit over to the right, see if it looks better, try a little to the left, and repeat until you find the best results. I used the Sum of Squared Differences (SSD) to calculate the "cost" of each alignment and doing my best to minimize it. Since the .tif files are so large from the website, the quickest method is actually using a Gaussian pyramid, and pass up the alignment from the smaller images to the next rather than trying to look at the original images point blank. (This cuts the time it takes to run the program from around 10min to under 60 seconds) You could do this recursively, but since I really only needed a pyramid of height 3 to get useful data, it was a bit like using Mjölnir to crack a walnut. 



The left image is the original negative, the top right is the composite with a naive implementation (split the original into thirds, combine), and the bottom right is after my alignment/cropping algorithm.


Here are some of my favorites from the collection after running my algorithm on them :)









No comments:

Post a Comment