CS 194-26 Project #1

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

This project involved using 3 color channel images (R,G,B) to create a single colored photo. The process involved finding a displacement vector to properly align the images and then stacking the 3 images on top of each other to produce a colored otuput. For the smaller images (jpg), I utilized single-scale alignment and exhaustive search. When working with larger images (tif), I had to change my approach and used an implementation I will describe later on.

Single-Scale Alignment

I used exhaustive search with a search window of size [-15,15] to find the displacement vector. We aligned green to blue and then red to blue. We then stacked all aligned green (ag) and aligned red (ar) with blue to get our colored output.

A small optimization I made was cropping the colored channels to get rid of the borders. This optimization made my displacement vectors more accurate.

tobolsk green(3,3) red(3, 6)

cathedral green(2,5) red(3, 12)

monastery green(2,-3) red(2, 3)

Multi-Scale Alignment

For multi-scale alignments, exhaustive search would be too slow on the .tif images. I implemented a pyramid image approach that calculated displacement vectors at different levels and scaled it to get a “running” displacement vector that would be used to align the image. I used 4 layers that were sizes 1/8, 1/4, 1/2, and 1 of the original image’s resolution.

An optimization I made for this section was to scale the window size to be lower as we traversed down the image pyramid. This made my alignment much faster as it didn’t have to explore as many options as the image got closer to the original resolution.

church green(4,25) red(-4, 58)

harvesters green(-17,-59) red(-3, 64)

icon green(18,41) red(23, 90)

lady green(7,51) red(10, 112)

melons green(9,82) red(12, 179)

onion_church green(27,50) red(37, 108)

self_portrait green(29,78) red(37, 175)

three_generations green(14,50) red(37, 108)

train green(14,50) red(11, 109)

Emir & Workshop

Emir and Workshop waere the only .tif files that I had to make major modifications to. Instead of keeping blue as the base channel, I changed the base channel to green. I then had to align blue and red to the green channel to produce the colored image output.

emir blue(-24,-48) red(17, 57)

workshop blue(0,-53) red(-11, 52)

Other Examples

These are a couple of other images I found on the Prokudin-Gorskii collection. I aligned them using blue as the base channel and my multi-scale alignment algorithim (I used tif files).

lugano green(13,35) red(37, 85)

russian_church green(10, 16) red(9, 46)

boat green(14,50) red(11, 109)