Project 1

Sergei Mikhailovich Prokudin-Gorskii was convinced, as early as 1907, that color photography was the wave of the future. His idea was simple: record three exposures of every scene onto a glass plate using a red, a green, and a blue filter. The goal of this project is to 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. I will explain how I extract the three color channel images, place them on top of each other, and align them so that they form a single RGB color image.

Image 1

Single-scale Implementation

The algorithm computes the best displacement between two images as follows:

  1. Exhaustively search over a window of possible displacements (from -15 to 15 pixels) around the center of one image.
  2. For each possible displacement, calculate a score using Structural Similarity Index (SSIM).
  3. Select the displacement with the best score.

Multi-scale Pyramid Implementation

For larger images, the single-scale implementation proves to be too slow. I implemented a coarse-to-fine pyramid speedup to handle the .tif ones provided in the directory. Given two images, the algorithm works recursively as follows:

  1. Base case: If the images' max dimension is less than 400 pixels, return the single-scale algorithm's best displacement.
  2. Resize the two images to be half their size.
  3. Recursively pass the resized images to get the best displacement.
  4. Going up the stack, take the previous call's displacement and double each coordinate.
  5. Use this doubled-vector as the initial coordinates and search around a 2x2 window with the single-scale displacement algorithm.

A few more images...

Bells & Whistles: Automatic Cropping

I created an algorithm to detect borders around the images, which I assumed could be a possible culprit for noise. My idea was to use variance as a proxy for edge detection since the border seems to be almost fully one color. I calculate column-wise and row-wise variance and set a threshold so that any variance greater than the threshold must no longer be a border. My cropping method was able to fully crop out both the black and white borders around the image, but only slightly sharpened the image.