CS194-26 Project 1: Images of the Russian Empire

Aman Dhar

September 5th, 2018

In the early 1900s, Sergei Mikhailovich Prokudin-Gorskii began traveling around the Russian empire taking photographs. For each scene, he took three photos: one with a red filter, one with a green filter, and one with a blue filter. This way, he hoped that color photographs would be created in the future from these images, and that they would educate schoolchildren about the empire.

In this project, I have taken some of the digitized Prokudin-Gorskii glass plate images and aligned triplets of them to form single RGB color images. I hope to continue what Prokudin-Gorskii could not and educate you about the Russian empire.


Part A: Simple Alignment of Small Images

In this part, I aligned the green and red plate images to the corresponding blue plate image for four different small images (~350x350 pixels in size). To align the plate images, I searched over a window of possible integer displacements in the interval [-15 pixels, 15 pixels] in both the horizontal and vertical directions. So in total, for each image, 31 * 31 = 961 distinct alignments were tried. To pick the best alignment between two plate images, I used the SSD metric (sum(square(img1 - img2))) on each alignment and picked the alignment that scored lowest.

The results are below. I have provided the alignment shifts required to align both the green plate image and the red plate image to the blue plate image. They are given in the format (horizontal shift in pixels, vertical shift in pixels).

Overall, this part was not too complicated, and the plate images were aligned quite well in all cases. There are some artifacts on the borders of the images, as not all of the plates shared the exact same borders. To make sure that the uneven borders did not affect the aligning, I used cropped images (50 pixels on all sides) to calculate the alignment vectors, and then used those vectors to align the full images together. Using this technique, the main content of all of the images looks very well-aligned.


cathedral.jpg

green alignment = (5, 2); red alignment = (12, 3)


monastery.jpg

green alignment = (-3, 2); red alignment = (3, 2)


nativity.jpg

green alignment = (3, 1); red alignment = (7, 0)


settlers.jpg

green alignment = (7, 0); red alignment = (15, -1)

Part B: Aligning Large Images with the Image Pyramid Technique

For the larger images, performing an exhaustive search would require a window larger than 31 pixels wide/tall, and this would be too costly and slow. Instead, I used the image pyramid technique mentioned in the project instructions. I started by cropping ~500 pixels from all sides before aligning the plate images. To align them, I began by scaling the images down to 1/8 of their original size. At this size, they were similar to the smaller images from part A, so I used my naive alignment search here. Once I had found the right displacements, I divided by the scale (1/8) to get the displacement needed for the full-size images. I applied this shift to the full-sized images, and then repeated the process with scales 1/4, 1/2, 3/4, and finally 1. At each scale, I searched over the same window [-15 pixels, 15 pixels].

This worked well, and was much quicker than other methods, because I could essentially align most of the image at one scale, and then continue tuning this alignment at higher and higher scales. Again, the slignments came out great. I did not seem to have issues with aligning the green and red plate images to the blue plate image as other students did on some of the images below. The images below are not the raw aligned tif images, as they have been compressed to jpg files.


emir.tif

green alignment = (48, 24); red alignment = (102, 40)

Notes: Anyone know where I can get one of those robes?


harvesters.tif

green alignment = (59, 9); red alignment = (123, 7)


icon.tif

green alignment = (40, 16); red alignment = (89, 23)


lady.tif

green alignment = (52, 9); red alignment = (112, 12)


self_portrait.tif

green alignment = (79, 29); red alignment = (176, 37)

Notes: Combined three different selfies into one colorized selfie.


three_generations.tif

green alignment = (52, 14); red alignment = (112, 11)


train.tif

green alignment = (42, 6); red alignment = (87, 32)


turkmen.tif

green alignment = (56, 21); red alignment = (116, 28)

Notes: Great hair


village.tif

green alignment = (64, 12); red alignment = (138, 22)


Below, I have included some other images from the collection that were not included in the project's starter materials. I apologize in advance for the bad image names I chose.


bridge.tif

green alignment = (67, 12); red alignment = (144, 14)


structure.tif

green alignment = (51, 27); red alignment = (108, 36)


swamp.tif

green alignment = (12, -10); red alignment = (68, 5)


That's all! Thanks for checking out my results.