CS194-26 Project 1

Colorizing the Prokudin-Gorskii Photo Collection

Overview


The aim of this project was to digitally colorize several images using the glass plate negatives of Sergei Mikhailovich Prokudin-Gorskii. This involves aligning the 3 filtered plates on top of one another to form a single RGB image. On low-resolution images the task can be done using exhaustive search over a specified range of displacements, but on the larger images the processing time is much faster when using an image pyramid to rescale the photos before performing a search over the displacement range.

My approach was to, depending on the image's format (jpg vs tif), apply the alignment procedure using the sum of squared differences as my loss measure. For the large .tif files, a recursive image pyramid is made so that the image will be rescaled to half its resolution until it has been rescaled 5 times or one of its dimensions reaches under 325 pixels. Using the lowest resolution version of the image pyramid, an exhaustive search is done to find the displacement values, which then are doubled in scale to work with the image one recursive depth higher. This displacement is applied at this next level to the plate being aligned, and then a 300x300 pixel window in the center of the image is used to calculate the additional displacement for the current resolution.


Problems

I initially built my image pyramid incorrectly and was only applying the lowest resolution displacement scaled to the original resolution. I noticed this when all my displacements for the images using the pyramid were having even-valued displacements (since the displacement is multiplied by 2 when it goes up a recursive depth). After changing the algorithm to apply additional displacements at each level I had better results.

There was also a problem with the Emir photo not aligning properly, which I couldn't figure out how to solve until reading on Piazza to align the plates to the green filter. The green-aligned image is in the results section, but here is what it looked like when aligning on the blue plate:

Results


Cathedral. G: [5, 2] R: [12, 3]


Emir. B: [-48, -24] R [58, 18]


Harvesters. G: [59, 18] R: [124, 16]


Icon. G: [41, 18] R: [90, 23]


Lady. G: [52, 8] R: [112, 12]


Melons. G: [82, 10] R: [180, 12]


Monastery. G: [-3, 2] R: [3, 2]


Onion Church. G: [50, 26] R: [108, 37]


Self Portrait. G: [77, 29] R: [175, 37]


Three Generations. G: [49, 16] R: [109, 12]


Tobolsk. G: [3, 3] R: [6, 3]


Train. G: [42, 6] R: [85, 32]


Village. G: [64, 13] R: [137, 23]


Workshop. G: [52, 0] R: [104, -12]


Extra images


Yasnaya Polyana. G: [39, 14] R: [75, 14]


Nazar Mohammed. The Hungry Steppe. G: [43, 19] R: [102, 39]