Project 1: Colorizing the Prokudin-Gorskii Photo Collection

COMPSCI 194-26: Computational Photography & Computer Vision (Fall 2021)
Alina Dan

Background

Sergei Mikhailovich Prokudin-Gorskii had recorded pictures onto glass plates using three different filters: a red one, a blue one, and a green one. This project attempts to align the three negatives from each color channel on top of one another such that they produce a colored RGB image.

Implementation

Three color channels (R, G, and B) are first extracted from the glass plate image. With these three images, I searched over a window of 15x15 pixels to find the best displacements (in terms of achieving the smallest L2 norm) for optimal alignment.

Once the best displacements for each channel were found, I took each image and stacked them on top of each other to produce the colored version of the picture.

Cropping & Image Pyramid

To minimize the affect of blurry and dirty edges on computing the best offsets, I cropped each image prior to the search by 110 of the original length and width.

To tackle larger images (TIFs) where the naive exhaustive search would be costly, I incorporated an image pyramid alongside the exhaustive search. I first rescaled the original image to be much smaller (.0625 of the original) then performed the exhaustive search on the rescaled image. The process was then repeated with .125 of the original, .25, and .5 while updating our displacement estimate.

For emir.TIF, my algorithm did not do so well in alignment. It was largely due to the difference in brightness of the filters (a lot of blue with little red). Thus, I decided to align the red and blue images to the green rather than red and green to blue. After switching to aligning the red and blue channels to green, emir aligned really well.

Cathedral: Green = (2, 5), Red = (3, 12)
Monastery: Green = (2, -3), Red = (2, 3)
Tobolsk: Green = (3, 3), Red = (3, 6)

Image Pyramid

Church: Green = (4, 24), Red = (-4, 58)
Emir: Blue = (-24, -48), Red = (18, 56)
Harvesters: Green = (16, 60), Red = (14, 124)
Icon: Green = (16, 40), Red = (22, 90)
Lady: Green = (8, 50), Red = (12, 112)
Melons: Green = (10, 82), Red = (12, 178)
Onion Church: Green = (26, 52), Red = (36, 108)
Self Portrait: Green = (28, 78), Red = (36, 176)
Three Generations: Green = (14, 54), Red = (10, 112)
Train: Green = (4, 42), Red = (32, 88)
Workshop: Green = (0, 52), Red = (-12, 104)

Other Examples

Lilacs: Green = (-6, 50), Red = (-24, 96)
Sunset: Green = (-40, 74), Red = (-68, 114)
Double Poppies: Green = (8, 8), Red = (14, 60)