CS 194-26 Project 1

Images of the Russian Empire -- colorizing the Prokudin-Gorskii photo collection

Chengzong Ou, SID 3032221973

Overview

As early as 1907, a Russian man named Sergei Mikhailovich Prokudin-Gorskii was traveling across the Russian Empire with the special permission from the Tzar to photograph landscapes, portraitures, cities, and more. However, colored photography was a technology that was not yet available at that time. However, Prokudin-Gorskii had an ingenious idea: taking three exposures of images, each with a glass color filter so that the exposure only captures the raw brightness of red, green, and blue. In this assignment, I took the set of three exposures from Prokudin-Gorskii, and overlayed these images to reproduce colored photos.

Approach

I began with the Sum of Squard Difference (SSD) algorithm to overlay the images, and I used the green image as a base image for blue and red to align on. It worked well on the smaller images, but there was some alignment issues with the bigger images. I then implemented an automatic edge cropping function to solve the issue. The function first starts 10% away from the edge, and goes towards the edge until it hits a row/column that sums to less than a specified threshold. Once it hit this threshold, it discarded any row/columns beyond that. A further 5% was discarded from each edge to prevent potential misdetections. For the larger images, I have also implemented an image pyramid search approach. Images are first recursively downscaled by 2x until it is smaller than 100x100px, and it is aligned at each level to guarantee a reasonable runtime.

Results

Small Images

cathedral.jpg
Blue offset from Green: (0 , -1) Red offset from Green: (0 , 7)


monastery.jpg
Blue offset from Green: (-2 , 3) Red offset from Green: (0 , 6)


nativity.jpg
Blue offset from Green: (-1 , -3) Red offset from Green: (0 , 4)


settlers.jpg
Blue offset from Green: (0 , -7) Red offset from Green: (-1 , 8)


Large Images

emir.tif
Blue offset from Green: (-27 , -43) Red offset from Green: (16 , 55)


harvesters.tif
Blue offset from Green: (-16 , -57) Red offset from Green: (0 , 65)


icon.tif
Blue offset from Green: (-18 , -42) Red offset from Green: (5 , 48)


lady.tif
Blue offset from Green: (-8 , -47) Red offset from Green: (-1 , 62)


self_portrait.tif
Blue offset from Green: (-36 , -75) Red offset from Green: (12 , 97)


three_generations.tif
Blue offset from Green: (-11 , -52) Red offset from Green: (-3 , 58)


train.tif
Blue offset from Green: (-7 , -42) Red offset from Green: (26 , 48)


turkmen.tif
Blue offset from Green: (-15 , -55) Red offset from Green: (-1 , 60)


village.tif
Blue offset from Green: (28 , -63) Red offset from Green: (-63 , 72)


Additional Images

cathedral2.tif
Blue offset: (-10 , -57) Red offset: (7 , 98)


squad.tif
Blue offset: (-35 , -3) Red offset: (30 , 27)


boat.tif
Blue offset: (-14 , 14) Red offset: (13 , 11)