CS180 Project 1: Colorizing the Prokudin-Gorskii Photo Collection

By Alena Chao

Overview

For each image in the Prokudin-Gorskii collection, an exposure was taken through each a red, a green, and a blue filter. However, the channels are not fully aligned, so in this project we use different algorithms to reconstruct the image.

Single Scale Alignment

For smaller images, we can simply compare the channels at the original resolution. We keep the blue channel constant and shift the green and red channels, trying to find the best shift that produces the best Normalized Cross-Correlation (NCC) score. We limit our search within a certain max shift. We also crop the border of the image to avoid unnecessary loss in our score, since we expect the channels to be unaligned at the edges.

Cathedral
Cathedral
Monastery
Monastery
Tobolsk
Tobolsk
Image Red dx Red dy Green dx Green dy
Cathedral 3 12 2 5
Monastery 2 3 2 -3
Tobolsk 3 6 3 3

Multi Scale Alignment

For larger images, it is less feasible to try out all possible shifts. So, we can construct an image pyramid. I still used the same cropping and NCC scoring, but we no longer only use the original resolution of the channels. We essentially recursively downsize both the current channel and reference channel by a factor of 2, find the best shift at that lower resolution, and then when we scale the images back up we make sure to also scale the shift back up as well. We can sum up these shifts to get a total shift we can apply to our original channels.

One image my algorithm struggled with was the self_portrait image. This is probably due to the fact that there are large artifacts in the image, causing a large error even if the image is aligned, making it harder to find the best shift with precision. Some solutions to this is to use different features rather than the raw pixel colors, or using a gausian filter to get rid of this aliasing.

Church
Church
Emir
Emir
Harvesters
Harvesters
Icon
Icon
Italil
Italil
Lastochikino
Lastochikino
Lugano
Lugano
Melons
Melons
Self Portrait
Self Portrait
Siren
Siren
Three Generations
Three Generations
Image Red dx Red dy Green dx Green dy
Church -14 52 -4 23
Emir 106 36 46 20
Harvesters 8 122 10 59
Icon 22 90 16 41
Italil 34 77 18 38
Lastochikino -6 74 -2 -3
Lugano -28 93 -12 38
Melons 7 174 4 83
Self Portrait 26 172 18 76
Siren -21 98 -7 48
Three Generations 7 110 5 52

Custom Images

At the estate, Denmark
At the estate. Denmark
In Alupka, Crimea
In Alupka. Crimea
Image Red dx Red dy Green dx Green dy
At the estate. Denmark -3 12 -1 7
In Alupka. Crimea -26 139 -11 33