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.

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.
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.
Related projects
Face Morphing with Delaunay Triangulation
Smooth warping between two faces via point correspondences, Delaunay triangulation, and affine warps per triangle. Plus: population mean faces and caricature generation by extrapolation.
Auto-Stitching Photo Mosaics
Building a panorama pipeline from scratch — Harris corner detection, Adaptive Non-Maximal Suppression, feature matching, RANSAC for homography estimation, and Laplacian-pyramid blending.
Filters & Frequencies — Edges, Hybrid Images, and Blending
Working in the frequency domain to extract edges, create hybrid images that change meaning with viewing distance, and blend images seamlessly via Laplacian pyramids. Ends with the famous 'oraple.'