Project description

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, 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.

Results on Smaller Images

Original digitized glasses

cathedral.jpg

monastery

nativity

settlers

Single Scale Alignment

The result of running single scale alignment using a window of displacement works well on small images. Again we are only evaluating the center 2/3 of the images.

As we can see, the boundaries of the merged images are not aligned well due to rolling. This can be resolved by simply croppy out the borders.

Results on Larger Images

Pyramid Alignment

I started with the image downscaled to 1/512 of its original size, and then work my way to till the original image. At each level I still use a window of displacements from [-15, 15].

The boundary issue still exists, since we are using the same technique at each level. This method works on most of the images, but there are cases where it does not work well.

Failure

In the case of Emir of Bukhara, the images to be matched do not actually have the same brightness values (they are different color channels). This posts a significant challenge, since RGB intensity does not provide a good feature.

One solution is to use a better feature. I attempted Canny Edge detection to extract edge information for each pixel, and use that to match.

Edge feature

Instead of looking at RGB feature, I used canny edge detector to get edge matrix for each of the glasses

Using edge information as feature, I performed the same pyramid matching method on the edge matrices, and obtained the best displacements, and using them to align the original R and G images.

As can be observed, now the alignment is much better.

Automatic cropping

After obtaining the color image, I turned it into grayscale image, and then use edge detection on it. The sum of a row or column in the edge matrix is a good indicator of bordering. Using this information, we can implement auto-cropping. Some cropped examples are below

Automatic contrasting

To make the color more contrasting, we look at the exposure histogram of the image, and try to make the distribution as uniform as possible.

The result is much richer colors

Displacements Report (Anchored on B)

nativity.jpg: G: (3, 1), R (7, 1)

settlers.jpg: G: (7, 0), R (15, -1)

cathedral.jpg: G: (5, -1), R (11, -1)

monastery.jpg: G: (-3, 1), R (3, 2)

self_portrait.tif: G: (-9677, -7621), R (-6329, -7622)

three_generations.tif: G: (-6367, -11135), R (-6308, -7420)

emir.tif: G: (-9578, -11083), R (-12729, -7364)

harvesters.tif: G: (-9596, -11037), R (-6329, -7622)

icon.tif: G: (-9692, -11207), R (-9643, -11201)

lady.tif: G: (-9579, -7627), R (-9517, -11298)

train.tif: G: (-9673, -7483), R (-9624, -7480)

village.tif: G: (-9747, -7645), R (-6402, -7652)

turkmen.tif: G: (-9572, -7515), R (-9512, -7508)