scs logo Programming Project #1 (proj1)
15-463: Computational Photography
Natasha Kholgade

Images of the Russian Empire:
Colorizing the Prokudin-Gorskii photo collection
Due Date: 11:59pm on Tuesday, September 7, 2010

Overview

This project involved aligning images taken by Prokudin-Gorskii in the red, green and blue channels such that a colorized final image is produced as output. In order to achieve the desired alignment, the method explored in this project was one of shifting the green and blue channels and comparing with the red channel using a distance metric; the best shifts in the x- and y- directions corresponded to those with the most optimal value of the distance metric to perform the comparison. The final images in this project have been produced by using normalized cross-correlation as the distance metric. The project also addressed the development of an image pyramid in order to tackle the process of shifting for large images.

Specifics

The basic shift-and-match operation was implemented using the circshift() function in MATLAB with the provision of a user-specifiable displacement window. For every shift within the window, the resulting normalized cross-correlation between the two images was stored in a matrix, and the shifts in the x and y directions corresponding to the maximum value of the normalized cross-correlation were used as the final shift values.

For the image pyramid, the images in the three channels were each shrunk down in various levels (each image at the current level being one-half the size of the image at the previous level) for a user-specified number of levels. Starting at the smallest image, the shift-and-match operation was applied and carried through till the final level. At each step, after the shift-and-match operation on the current image in the green and blue channels, the image at the level above was shifted through twice the sum of the current shift with all previous shifts. In order to save memory, the image pyramid was not actually built before hand; in fact each resize and shift was done by computing the correct shift factors only when necessary. The final shift was equivalent to the current shift plus twice the sum of all previous shifts.

Issues

The major issue observed in this project came up during implementation of the image pyramid for shifting. For the image with the train engine, for an image pyramid with five levels, after about the third level (i.e. a resize of 1/4th the original size), the shifts introduced were too large and the channels did not line up. This may be attributed to some interference from the edges of the glass plate where the information is not in agreement across all channels. In order to circumvent this, for the large channels, some of the border was thrown out before doing the pyramidal shift-and-match, and once the final shifts were calculated, they were appropriately applied to the original channels. This helped correct the problem; in addition it sped up the operation.

Low-res images

       


       


       


High-res images can be found at the following links