Colorizing the Prokudin-Gorskii Photo collection


Intro

The goal of this project is to colorize the Prokudin-Gorskii images, digitized by the LoC. Given a grayscale image that contains the B, R, G color channels, stacked in that order, we want to output an aligned RGB image, and the lateral translations that align the R and G color channels to the B channel.

Methods

The color channels are aligned using an intensity-based image registration algorithm. Images are aligned by splitting the input image, I, along the height into the B, R, G channels. For each possible offset in some given range, the offset is scored by a L2/ SSD based metric. The offset with the minimum score is optimal because it minimizes the distance between pixel intensities. To handle larger images, this brute force offset search is applied to a Gaussian image pyramid, which makes the offset calculation more robust to artifacts in the image. Offset search is applied to each level of the pyramid starting from the coarsest level, and previous offsets are used to inform the next level of search.

The SSD metric is unable to handle cases where the brightness between color channels is different, but converting the images to binary edge images can handle this shortcoming, as edges of objects across different color channels stay constant. Using the edge technique still results in some misaligned images (see: melons, self-portrait, textiles). This could likely be fixed by tuning the sensitivity of the edge detection, which I have not done. :) Finally, 15% of the edge pixels are cropped to remove borders.

Results
File Results
cathedral.jpg
G: [5 2], R: [12 3]
emir.tif
G: [49 23], R: [107 40]
harvesters.tif
G: [60 18], R: [123 14]
icon.tif
G: [38 16], R: [90 22]
lady.tif
G: [56 10], R: [120 13]
melons.tif
G: [80 10], R: [ 125 -107]
monastery.jpg
G: [-3 2] R: [3 2]
onion_church.tif
G: [52 24], R: [107 34]
self_portrait.tif
G: [77 29], R: [123 53]
three_generations.tif
G: [57 16], R: [115 10]
tobolsk.jpg
G:[3 3], R: [7 3]
train.tif
G: [40 8], R: [85 34]
village.tif
G: [65 10], R: [126 -5]
workshop.tif
G: [53 -1], R: [105 -12]
bashkir.tif
G: [63 -8], R: [126 -21]
estate.tif
G: [74 13], R: [126 25]
textile.tif
G: [49 -17], R: [-126 -102]