CS 194-26 Project 1:
Images of the Russian Empire: Colorizing the Prokudin-Gorskii Photo Collection

Sol Ah Yoo


Overview

The goal of this project is to automatically align Sergei Mikhailovich Prokudin-Gorskii's (1863-1944) RGB images to form a single colored image.

Main Part

I used the skeleton code provided to us to separate the images by the RGB channels, only changing it to take in all images in the image folder.

Then, to find the displacements, I scaled down the images until its width was less than 400px and used those images to get a displacement score using normalized cross-correlation. Next, I used the displacements I got as the next ranges of pixels to look at for the higher resolution image and repeated these steps until I got to the original image.

Bells and Whistles

Auto Contrast - I rescaled the image intensities so that the darkest pixel would be zero and the lightest pixel would be 1. But this didn't have a big effect on the output images so I also used an adaptive histogram method (skimage.exposure.equalize_adapthist) after cropping the borders out. For the high resolution images, I had to apply this function on a lower resolution image first and then rescale back to the original size.

Edge Detection - I used Canny edge detection to find the edges and applied the same algorithm I used in the main part for finding displacements. The effect was most noticeable in emir.tiff where the original algorithm didn't align the image very well because the individual RGB images didn't have the same brightness levels.

Auto Cropping - I used Canny again to detect edges, then used probabilistic Hough line transform to get these edges into coordinate points. To automatically detect borders, I checked if they were horizontal or vertical lines and near the edges of the image. If they were, I cropped them out. I also cropped after aligning the images using the displacements I got to get rid of the sharp color block resulting from aligning the images.

Results

The original images without Bells & Whistles are on the left and the images with Bells & Whistles are on the right.

Cathedral
G: (2, 5) R: (3, 12)
Cathedral
G: (1, -9) R: (-3, -2)
Monastery
G: (2, -3) R: (2, 3)
Monastery
G: (3, -13) R: (2, -7)
Nativity
G: (1, 3) R: (0, 8)
Nativity
G: (0, 1) R: (0, -8)
Settlers
G: (0, 7) R: (-1, 14)
Settlers
G: (2, -6) R: (1, -2)
Emir
G: (25, 47) R: (59, 91)
Emir
G: (16, -79) R: (15, -31)
Harvesters
G: (17, 59) R: (14, 127)
Harvesters
G: (96, -99) R: (85, -45)
Icon
G: (16, 42) R: (21, 90)
Icon
G: (25, -128) R: (31, -79)
Lady
G: (8, 53) R: (10, 112)
Lady
G: (16, -43) R: (28, 13)
Self Portrait
G: (28, 79) R: (35, 176)
Self Portrait
G: (37, -113) R: (52, -16)
Three Generations
G: (14, 51) R: (12, 111)
Three Generations
G: (21, -69) R: (13, -11)
Train
G: (6, 44) R: (32, 90)
Train
G: (15, -157) R: (24, -97)
Turkmen
G: (21, 55) R: (29, 115)
Turkmen
G: (13, -48) R: (3, 4)
Village
G: (12, 65) R: (22, 141)
Village
G: (-4, -87) R: (5, -22)