CS194-26 Project 1:
Colorizing and Aligning Images of the Russian Empire

  Brian Zhen

  2017-09-06

Goal of this project is to automatically produce color images of Prokudin-Gorskii's glass plate images of Russia which contain three color channels (blue, green, and red).


In order to colorize the images, we divide the image into three equal parts to extract the color channels. Due to noise in the image borders, we only measure the pixels inside the center region of the image. Using a metric function, we compare pixels within a specified window, e.g. [-15, 15] and approximate the optimal alignment. The metric functions used were Sum of Squared Differences (SSD) and Normalized Cross-Correlation (NCC), and we found that NCC produced a more accurate alignment.


For higher resolution photos, we need to use a different approach to align the images since searching exhaustively may take a long time. We use the image pyramid technique in which we incrementally align images from coarse to finer resolutions. This technique allows us to align large images quickly by first matching less pixels in a lower resolution picture, and then updating our estimate if needed back to the original image resolution.


For the .jpg images we use a single-scale implementation, and for the larger .tif files we use the pyramid multi-scale implementation. Note: for the multi-scale solution, we found that alignment was much better when centering the green channel instead of the blue channel.



Examples:

cathedral.jpg
NCC Displacement [x,y]: green: [5,2], red: [12,3]


monastery.jpg
NCC Displacement [x,y]: green: [-3,2], red: [3,2]


nativity.jpg
NCC Displacement [x,y]: green: [3,1], red: [7,0]


settlers.jpg
NCC Displacement [x,y]: green: [15,-1], red: [7,0]


lady.tif
NCC Displacement [x,y]: blue: [-46,-25], red: [47,15]


train.tif
NCC Displacement [x,y]: blue: [-43,-7], red: [44,27]


harvesters.tif
NCC Displacement [x,y]: blue: [-68,-48], red: [74,0]


icon.tif
NCC Displacement [x,y]: blue: [-44,-18], red: [72,5]


self_portrait.tif
NCC Displacement [x,y]: blue: [-132,-10], red: [33,42]


three_generations.tif
NCC Displacement [x,y]: blue: [50,4], red: [103,-4]


turkmen.tif
NCC Displacement [x,y]: blue: [-64,-34], red: [75,10]


village.tif
NCC Displacement [x,y]: blue: [-76,-16], red: [90,-1]


emir.tif
NCC Displacement [x,y]: blue: [-52,-21], red: [81,33]