Images of the Russian Empire: Colorizing the Prokudin-Gorskii photo collection

Name: Daniel Edrisian

email: edrisian@berkeley.edu

Hello and welcome to my first project! I really enjoyed working on this project and I hope you like my results.

Objective

Sergei Mikhailovich Prokudin-Gorskii took some photos with three channels roughly coordinated with RGB. Out input images are stacks of the RGB plates, and we need to automatically align them on top of each other to make these color outputs.

Methodology

First, we need to determine how we "grade" our alignments. This can be done by taking the difference between the colors and each pixel and summing them. If the sum is high, it means that they probably aren't aligned. This is called the SSD (sum of squared differences) and will be used as our cost function to minimize.

The basic way to go about this is to try our SSD function on a range of all pixel offsets. This works fine, but it is very costly. The way to improve this is to limit the range of pixel shifts to some smaller portion of the image in the center. It is still very costly, and especially slow on larger images (like the .tif examples).

To remedy this issue on big images, we can use a multi-scaled approach. What we essentially do is to create a set of differently-scaled images, and do the SSD minimization process from the bottom all the way up. On the first round, the image is a very scaled down image, and the pixel offsets determined are very rough and not accurate. But, it gives us the general area of which our image should be aligned. Then, we go up one scale and look further into that region determined from the lower scale before. Determining the new offsets means multiplying our previously determined offsets by the scalar (in my case I scaled by 2 each time, so our offsets would be scaled by sqrt(2)) and then adding them to the newly determined offsets. This happens all the way up, and refines our offsets to closely match what a single-scale solution would do. The results are pretty good and the speed is under 45 seconds for each large .tif image.

Outputs

monastery.jpeg

Final R and B channel offsets (single-scale): 6 1 3 -2

Final R and B channel offsets (multi-scale): 6 1 3 -2


tobolsk.jpeg

Final R and B channel offsets (single-scale): 4 1 -3 -3

Final R and B channel offsets (multi-scale): 4 1 -3 -3


cathedral.jpeg

Final R and B channel offsets (single-scale): 7 1 -5 -2

Final R and B channel offsets (multi-scale): 7 1 -5 -2


church.tif

Final R and B channel offsets: 33 -8 -25 -4


emir.tif

Final R and B channel offsets: 57 17 -48 -24


harvesters.tif

Final R and B channel offsets: 64 -3 -59 -17


icon.tif

Final R and B channel offsets: 49 5 -41 -18


lady.tif

Final R and B channel offsets: 60 3 -50 -7


melons.tif

Final R and B channel offsets: 85 3 -77 -8


onion_church.tif

Final R and B channel offsets: 58 10 -50 -26


self_portrait.tif

Final R and B channel offsets: 86 5 -73 -27


three_generations.tif

Final R and B channel offsets: 59 -2 -50 -15


train.tif

Final R and B channel offsets: 43 26 -42 -6


workshop.tif

Final R and B channel offsets: 52 -11 -52 1


choice1.tif (Example of my own choosing)

Final R and B channel offsets: 72 7 -28 -6


choice2.tif (Example of my own choosing)

Final R and B channel offsets: 60 -4 -27 -12