CS194-26 Project 1: Colorizing the Prokudin-Gorskii Photo Collection

Sairanjith Thalanki | 3032739634 | sthalanki@berkeley.edu

Goal: Take the digitized Prokudin-Gorskii glass plate images and, using image processing techniques, automatically produce a color image with as few visual artifacts as possible.


  1. Split the original image into 3 parts
  2. Remove the border by chopping off about 5% on each side. I experimented with various borders and cutoff the smallest border that was sufficient for all of the images provided to us.
  3. Align the blue & red image to the green image by finding the displacement vector with the smallest Normalized Cross-Correlation (dot product of the normalized image vectors) or the smallest Sum of Squared Differences (aka L2 norm). I saw minimal difference between the results for NCC aand SSD. I aligned with the green image instead of the blue image since green is in the center of the visible color spectrum. My hypothesis is that green would align better with the blue and red colors since it is closer in wavelength.
  4. Shift the original image for the red and blue channels by their respective calculuated displacement vectors and stack them using np.dstack

Images + Displacement Vectors

Red: (-35, -3) Blue: (64, 1)
Red: (-5, -2) Blue: (7,1)
Red: (-49, -24) Blue: (57, 17)
Red: (-60, -16) Blue: (65, -3)
Red: (-40, -17) Blue: (48, 5)
Red: (-54, -8) Blue: (63, 4)
Red: (3, -2) Blue: (6, 1)
Red: (-82, -8) Blue: (96, 3)
Onion Church
Red: (-51, -26) Blue: (57, 10)
Self Portrait
Red: (-79, -29) Blue: (98, 8)
Three Generations
Red: (-54, -12) Blue: (58, -2)
Red: (-3, -3) Blue: (4, 1)
Red: (-43, -6) Blue: (43, 27)
Red: (-52, 1) Blue: (53, -11)

Selected Images from the Collection

Blue Door
Red: (-7, -3) Blue: (8, 1)
Red: (0, 0) Blue: (7, 0)
Red: (-4, -1) Blue: (6, 0)

Bells and Whistles


When I increase the contrast by linearly stretching the current colors by setting the 5th percentile value on each color to 0 and setting the 95th percentile of each color to 255, the brightness was too high in the new images. So instead I chose to make a smaller change and set the min value to 0 and the max value to 255. The contrasting didn't make much of an effect on the image since most images had values close to 0 and 255 and all of the jpgs had values at exactly 0 and 1 for all channels. I think the blue/green colors are closer to correct in this image and the shadows are a bit darker.

Three Generations w/ Contrast
Three Generations with Auto-Contrast
Three Generations w/o Contrast
Three Generations without Auto-Contrast
Icon w/ Contrast
Icon with Auto-Contrast
Icon w/o Contrast
Icon without Auto-Contrast

Better Features: Roberts Edge Detection

Edge Detection: My edge detection did not change the result significantly since the images already aligned very well with just the image pyramid. I think the Roberts Edge Detection led to slightly sharper image for emir.

Canny Intermediate Edges
Canny Edges
Emir Roberts
Emir w/ Roberts Edge Detection Red: (-54, -12) Blue: (58, -2)
Onion Church
Emir w/o Roberts Edge Detection Red: (-49, -24) Blue: (57, 17)