Project 1

Overview

In this project, we took the digitized versions of Sergey Prokudin-Gorsky's triple exposure pictures of scenes from the Russian Empire and aligned them to create the colorized versions of these pictures, which you can find below. You can find more information about the project on the Library of Congress' page here.

Methodology

We align the pictures by choosing one of the pictures as a "base" and aligning the other two pictures to this base picture. For all of the images, I picked green as the base and aligned red and blue to it. Then, for all of the calls to the single scale alignment function, I cropped the images by 20% on each side. This reduced computations and also allowed the alogirthm to align the photos better by focusing on the content of the photos instead of the borders and edge artifacts. For my metric, I used the sum of squares error on the difference between the base photo and the relative photo. Minimize this metric and return the best alignment offsets. The methodology is further exaplined under each of the following sections.

Low-Res Images

Single Scale alignment. These pictures only required one call to the alignment function to be aligned perfectly. My implementation searched over a grid area of \( [-15,15] \) by \( [-15,15] \) pixel grid to align the pictures.

Cathedral Monastery Tobolsk

High-Res Images

Multiscale alignment with an image pyramid using Gaussian blurring and sampling to build the pyramid.

First I blurred the images with a Gaussian 3 by 3 filter to prevent aliasing. Then, I sampled the images up to some factor \( \frac{1}{2^i} \) where \( i \) ranges from \( \log_2(w) - \mathrm{level factor} \) to 1, where \(w\) is the width. The level factor parameter prevents from having an image with too little pixels, and a value that worked well for me is 5. Starting from the smallest pictures, my implementation blurs and scales (sample) them, then aligns the images with a \( [-15+j,15-j] \) by \( [-15+j,15-j] \) pixel search grid like before, where \(j\) is the iteration number. Once I got the alignment offsets, the algorithm multiplies them by \( 2^i \) to return to the normal scale. Then, I aligned the relative image to the fixed image using these offsets and repeated the iteration with the next larger image.

Church Emir
Harversters Icon
Lady Melons
Onion Church Sculpture
Self Portrait Three Generations
Train

Custom Images

The first three are high resolution images which used the multiscale alignment algorithm as described above. The last one is low resolution which used the single scale alignment algorithm.

Boy Bible
Railroad Men Chalice (low res)

Displacements

Picture Blue y-axis offset Blue x-axis offset Red y-axis offset Red x-axis offset
cathedral.jpg -5 -2 7 1
monastery.jpg 3 -2 6 1
tobolsk.jpg -3 -3 4 1
High Res Examples
church.tif -25 -4 33 -8
emir.tif -48 -24 57 17
harvesters.tif -59 -17 65 -3
icon.tif -41 -17 48 5
lady.tif -56 -8 62 4
melons.tif -82 -10 96 4
onion_church.tif -51 -26 57 10
sculpture.tif -33 11 107 -16
self_portrait.tif -78 -29 98 8
three_generations.tif -52 -14 59 -2
train.tif -43 -6 44 26
Custom images
bible.tif -40 12 46 -14
boy.tif -40 16 62 2
railroad_men.tif -34 14 87 -12
chalice.jpg -6 -1 7 0

Bells and Whistles

None