Project 1: Colorizing the Prokudin-Gorskii Photo Collection

Goal:

The goal of this project is to use Produkin-Gorskii's Photo Collection to compose a colored image.
Each colored image is composed of three separate images that are in green, blue, and red.
The main challenge is to figure the optimal and efficient way in aligning the three images to compose a singular colored image.

Implementation Strategies:

Exhaustive Search with Cropping

In exhaustive search, we created an algorithm that would calculate the Sum of Squared Differences (SSD) in a region of [-20,20] pixels in both axes exhaustively. The minimal displacement vector with respect to the axes was chosen based on the minimal SSD. However, this becomes an issue as the three colored images may not properly align at the edges. To account for this, I calculated the SSD by removing about 7% of the edges of each color image channel. This allowed for the more inner pixels to better align.

Image Pyramid Search

In Image Pyramid Search, I scaled down the image by a factor of two five total times. This means at the top of the pyramid, we had an image that had its dimensions scaled down by a 1/32. I then applied the exhaustive search that is described above in the three topmost images of the pyramid with a window of [-20,20]. For the last few larger images of the pyramid, I used the range [-5,5] instead. This is because by the time we get to the larger images, we are relatively close to properly aligning the color channels. Secondly, this reduces run time.

Results:

Cathedral

Cathedral image

Green Displacement Vector: [-388, -677]

Red Displacement Vector: [-387, -670]

Monastery

monastery image

Green Displacement Vector: [-389, -685]

Red Displacement Vector: [-389, -679

Toboslk

tobolsk image

Green Displacement Vector: [-393, -679]

Red Displacement Vector: [-393, -676]

Church

church image

Green Displacement Vector: [4, 25]

Red Displacement Vector: [-4, 58]

Emir

emir image

Green Displacement Vector: [24, 49]

Red Displacement Vector: [56, 103]

Harvesters

harvesters image

Green Displacement Vector: [16, 60]

Red Displacement Vector: [13, 124]

Icon

icon image

Green Displacement Vector: [17, 41]

Red Displacement Vector: [23, 89]

Lady

lady image

Green Displacement Vector: [8, 56]

Red Displacement Vector: [23, 89]

Melons

melons image

Green Displacement Vector: [11, 82]

Red Displacement Vector: [13, 179]

Onion Church

onion-church image

Green Displacement Vector: [26, 51]

Red Displacement Vector: [36, 108]

Self Portrait

self-portrait image

Green Displacement Vector: [29, 79]

Red Displacement Vector: [36, 176]

Three Generations

three-generations image

Green Displacement Vector: [14, 53]

Red Displacement Vector: [11, 112]

Train

train image

Green Displacement Vector: [6, 42]

Red Displacement Vector: [32, 87]

Workshop

workshop image

Green Displacement Vector: [6, 53]

Red Displacement Vector: [-12, 103]

Extra Images

City of Lodeinoe Pole

lodeinoe image

Green Displacement Vector: [21, 24]

Red Displacement Vector: [29, 60]

Cardboard Factory

cardboard-factory image

Green Displacement Vector: [4, 25]

Red Displacement Vector: [-3, 92]

City of Lodeinoe Pole

ona-zhe image

Green Displacement Vector: [-3, 29]

Red Displacement Vector: [-7, 114]