CS 184 Final Project Proposal

Project 1

Colorizing the Prokudin-Gorskii Photo Collection

Michael Wang

Overview

This project attempts to automatically crop, align, and overlay the three photo plates within the Prokudin-Gorskii Photo Collection. Since each plate was essentially the same photo taken through a blue, green, and red filter respectively, our goal to create a color composite would be to overlay them and form a proper RGB image by replicating the way the human eye sees color.

Technical Approach

In the library, the three plates that comprise a color image are stacked vertically atop each other. The first step was to manually crop off any borders on the image. Then, the stacked image was divided into thirds to isolate each colored plate as their own image. The next step came from overlaying them properly so that the details on each plate aligned with each other. To automatically find the correct anchor points to align each photo with, this project fixes a base plate (in this case, green), and overlays other plates at varying displacements to find the best displacement where details match identically. To do so, this project uses Sum of Squared Differences (SSD) to compare brightness values at different displacements. However, simply comparing brightness values, while effective for most images, failed in others. This showed rather strikingly in the emir.tif file, where attempting to use SSD on the brightness values for each color plate resulted in a severely misaligned image. This is due to the unequal brightness values in each plate. Points that were supposed to match on each plate do not have similar brightness values, throwing off the SSD score. This will be remedied by using a different metric later in the project. Since using an exhaustive search becomes prohibitavely slow for larger .tif files, an image pyramid was implemented to reduce the range of searches. This project uses 5 layers, resulting in a marked speedup as lower resolution images pinpoint a general area to align the image at, and lower levels help refine the search area with a much smaller window.

Image Results

Using the blue plate resulted in crisp pictures for the most part, but utilizing a different base plate (e.g. red) helped add more clarity to pictures like workshop.

Castle
Red Displacement: (-159, 4)
Green Displacement: (-94, 3)
Cathedral
Red Displacement: (-14, 3)
Green Displacement: (-8, 2)
Emir
Red Displacement: (74, 0)
Green Displacement: (274, 225)
Harvesters
Red Displacement: (-132, 13)
Green Displacement: (-69, 21)
Icon
Red Displacement: (-179, 23)
Green Displacement: (-87, 21)
Lady
Red Displacement: (-139, 12)
Green Displacement: (-72, 8)
Melons
Red Displacement: (-78, 21)
Green Displacement: (-47, 10)
Monastery
Red Displacement: (-23, 2)
Green Displacement: (-16, 2)
Onion Church
Red Displacement: (-147, 36)
Green Displacement: (-76, 26)
Self Portrait
Red Displacement: (-83, 38)
Green Displacement: (-51, 29)
Three Generations
Red Displacement: (-143, 12)
Green Displacement: (-74, 14)
Tobolsk
Red Displacement: (-19, 3)
Green Displacement: (-10, 3)
Train
Red Displacement: (-170, 33)
Green Displacement: (-85, 7)
Workshop
Green Displacement: (76, 8)
Blue Displacement: (152, 8)

Other Images

Grave
Red Displacement: (-224, 0)
Green Displacement: (-116, 5)
Lilies
Red Displacement: (-206, 43)
Green Displacement: (-109, 31)
Wall Paintings
Red Displacement: (-135, 0)
Green Displacement: (-78, 9)

Bells & Whistles

Due to the inconsistent brightness values across channels in emir.tif, this projects implements edge detection to remedy this issue. Rather than comparing brightness across the values, edge detections allows us to extract the salient features of an image that are present regardless of color channels, and align the image through that.

Blue plate edges
Green plate edges
Red plate edges
Emir, aligned on edges
Red Displacement: (-148, 40)
Green Displacement: (-79, 24)