Project 1: Images of the Russian Empire:

CS 194-26 Fall 2021

Bhuvan Basireddy



Overview

The goal of this project was to take the digitized Prokudin-Gorskii glass plate images (taken with red, green, and blue filters) and produce colored images from them.

Low Resolution Image Approach

For the low resolution images, I did an exhaustive search over the range of [-15,15] to displace the pixels in both axes in order to find the optimal shift. This optimal shift was calculated using the Sum of Squared Differences (SSD) metric. For a displacement of the red or green channel, I calculated the SSD between the respective channel and the blue channel and kept track of the optimal alignment, given by the lowest SSD score. I also cropped around 10% of the the border around the images to get rid of the inaccurate data, which had caused some images to be slighty off.

g: [-3, 2], r: [3, 2]
g: [3, 3], r: [6, 3]
g: [5, 2], r: [12, 3]

High Resolution Image Approach

For the high resolution images, the exhaustive search method is not enough because the optimal displacement can be a much larger range than [-15, 15], which will increase the runtime significantly if we try to do a brute force search on a wider range. Thus, I implemented the image pyramid to get around this issue. I repeatedly rescaled the images by 0.5 until I hit my threshold of 64 by 64 pixels. At this bottom level, I applied the low resolution approach from above to find the optimal displacement, which is added to the total displacement and then propagated up with recursion. At the next level, I applied the total displacement * 2, since the images are rescaled by 2 as we recurse back to the original image size, to the channel that was displaced, and the low resolution approach is used this time with a range of [-5, 5], as are all subsequent searches. This is repeatedly done until we hit the original image size, and the total displacement estimate is returned, which is then used to align the images. For the emir in particular, I instead aligned the red and blue channels with the green channel, which worked much better than aligning with the blue channel.

g: [53, 0], r: [105, -12]
b: [-49, -24], r: [57, 17]
g: [25, 4], r: [58, -4]
g: [53, 14], r: [112, 11]
g: [81, 10], r: [178, 13]
g: [51, 26], r: [108, 36]
g: [42, 5], r: [87, 32]
g: [41, 17], r: [89, 23]
g: [78, 29], r: [176, 37]
g: [59, 16], r: [124, 13]
g: [51, 9], r: [112, 11]

Example Images


g: [59, 28], r: [126, 34]
g: [34, 3], r: [98, 4]
g: [31, 30], r: [55, 46]