CS 194-26 Project 1
Images of the Russian Empire: Colorizing the Prokudin-Gorskii photo collection
Rohan Narayan, ID 26650514
The first step was basic alignment of the 3 photos. Without translation of the green and red filtered images, the compiled image would look like the image on the left. Alignment allows all images to line up on top of one another, leading to a clear image, such as the one on the right.
For Step 1, we assume that we work with small images. Try all possibilities of translation of the image over a [-15,15] grid. To do this, use
With larger images, the (x,y) the displacement needed to align images would be greater than 15–with these larger images (on the scale of 4000x3000), an exhaustive search would take too long. Therefore, we use a pyramid structure to downscale the image, then align the smaller-sized images. We then scale up the displacements, and use them to align the higer-resolution images.
For an image, continue to
Below we can see the process executed on smaller .jpg images. Hovering over each photo will show the (x,y) displacements used for the Green and Red filtered images.
Below we can see the process executed on larger .tif images. All executions lasted less than 30 seconds. Like above, hovering over each photo will show the (x,y) displacements used for the Green and Red filtered images. Below this is the execution time to complete the alignment.
Although the method worked for all other images, the emir.tif image wasn't working correctly. As the spec mentions, this is probably because the brightness values were different. To solve this issue, I tried to align on a different color. Because there wasn't as big of an issue with brightness values, the image aligned correctly.
Blue: (-24,-49), Red: (17,57), Time: 20.65s
Below we can see the process executed on other images in the collection. To view original source, hover over the photo. Note: image names were made up by me
There is a noticeable white border on the left and right of almost all the images. I aimed to remove these borders. In order to do this, I added up all the columns for all three images, once aligned. Since the white columns would have much larger pixel values, the summed values would be noticeable higher than the rest of the image.
The results can be seen below. The black border around the image shows the cropped white borders.