← all projects
Computer Vision · September 2024 · 1 min read

Colorizing 1907 Russian Empire Photographs

Reconstructing color from Sergei Prokudin-Gorskii's glass plate negatives (captured 1907–1915) using image pyramids and normalized cross-correlation alignment.

PythonNumPyscikit-imageComputer Vision

Before color film existed, Sergei Prokudin-Gorskii traveled across the Russian Empire with a custom camera that took three grayscale exposures through red, green, and blue filters. A century later, his 2000+ glass plates survive — but aligning the three channels back into color images is non-trivial: tiny mechanical shifts between exposures mean naive stacking produces ghosted, rainbow-fringed chaos.

input3 stacked grayscale plates (B, G, R) from glass negatives methodImage pyramid + normalized cross-correlation search outputAligned RGB composite, 14 Prokudin-Gorskii photographs

The Alignment Pipeline

Why NCC over SSD? Normalized cross-correlation is invariant to global brightness differences between plates (which differ because each filter absorbs light differently). Sum-of-squared-differences, by contrast, can be dominated by overall intensity mismatch rather than structural alignment.

Why pyramids? Brute-force search for the right (x, y) offset at full resolution means evaluating millions of candidate offsets per plate for large images (the original TIFFs are 10,000 pixels tall). Image pyramids turn this O(n²) search into O(log n): align at the coarsest level, then refine offsets at each successive resolution. A 100× speedup with no accuracy loss.

Edge-based refinement: the emir image has colored clothing that confuses intensity-based alignment — the red robe looks bright in the red channel but dim in blue/green. Switching to gradient-magnitude alignment (where the structural edges drive the correlation rather than raw pixel values) resolves this. The emir image visible above was aligned via edge features.

#image-alignment#computational-photography#historical-photography

Related projects