CS280A Project 1: Colorizing the Prokudin-Gorskii photo collection

Overview

The goal of this assignment 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. In order to do this, the steps are to 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.

Single-scale implementation on low-res images

In this section, brute-force search within a small range of pixel shifts[-15, 15] is used. L2 norm is defined as the alignment metric. Results are shown below.

Description of image

Results of single-scale implementation on low-res images.

A multiscale pyramid version that works on the large images

For large image files (in this case, .tif files), brute-force search becomes time-consuming and inefficient. Instead, pyramid search involving creating a series of images at different resolutions and then finding the optimal alignment at each level of the resolutions was used. For my design, each level of the pyramid is a downsampled-by-2 version of the previous image. The search pixel range at each level is defined as [-7, 7] and the total pyramid levels are 5.

It is also noted that a pre-crop step to cut off unwanted white borders before splitting the original image into three channels is necessary to prevent the large displacement during alignment. After splitting, another pre-defined cropping is used to remove black borders of each image for higher alignment accuracy.

As a result, each images takes less than 1min processing time and the aligned images were shown below.

Description of image

Results of a multiscale pyramid version on large images.

Bells & Whistles

From the above aligned large-scale images result, it is obvious that 'melons.tif' is not well-aligned very. This misalignment occurs because the pre-defined margin cutoff cannot account for the differences between the top and bottom margins. As a result, the red channal image, after splitting, is significantly shifted from the correct alignment. Even with the pyramid searching function, it is still hard to align it to the blue channel.

With the help of the sobel filter, the edge of the original image can be detected (with a threshold of 0.1). The aligned image is much better than before.

Description of image

Examples of alignments using auto-cropping.

Other Examples

This section shows more images downloaded from the website.

Description of image

Aligned animal images.