16-726 HW1 Colorizing the Prokudin-Gorskii Photo Collection

Overview

This assignment aims to align the three channels of the digitized Prokudin-Gorskii glass plate images, and produce a color image with as few visual artifacts as possible.

Approach

I searched over a window of [-n, n] to shift the green and red channel images and find their best alignment with the blue channel respectively. I used structral similarity provided in the skimage.measure package to compute the aligment score in the final version of my code, as it gave the best results. For low resolution images, I do this search at the original image with window [-15,15]. For high resolution images, I used image pyramid I searched at 1/16, 1/8, 1/4, 1/2 scales with window [-15, 15], [-7,7], [-3,3], [-3,3] respectively. I did not search at the full scale as that would take a long time to run and the current scheme works quite well.

Results - Single Scale

cathedral.jpg. x, y displacement for green channel is (2, 5). x, y displacement for red channel is (3, 12).

In [19]:
import skimage.io as skio
im = skio.imread('results/cathedral.jpg')
skio.imshow(im)
skio.show()

Results - Multi-scale

1. emir.jpg. x, y displacement for green channel is (22, 50). x, y displacement for red channel is (40, 106).

In [7]:
import skimage.io as skio
im = skio.imread('results/emir.jpg')
skio.imshow(im)
skio.show()

2. harvesters.jpg. x, y displacement for green channel is (14, 58). x, y displacement for red channel is (12, 122).

In [13]:
import skimage.io as skio
im = skio.imread('results/harvesters.jpg')
skio.imshow(im)
skio.show()

3. icon.jpg. x, y displacement for green channel is (16, 40). x, y displacement for red channel is (22, 90).

In [14]:
import skimage.io as skio
im = skio.imread('results/icon.jpg')
skio.imshow(im)
skio.show()

4. lady.jpg. x, y displacement for green channel is (8, 56). x, y displacement for red channel is (12, 120).

In [15]:
import skimage.io as skio
im = skio.imread('results/lady.jpg')
skio.imshow(im)
skio.show()

5. self_portrait.jpg. x, y displacement for green channel is (28, 78). x, y displacement for red channel is (36, 176).

In [17]:
import skimage.io as skio
im = skio.imread('results/self_portrait.jpg')
skio.imshow(im)
skio.show()

6. three_generations.jpg. x, y displacement for green channel is (14, 56). x, y displacement for red channel is (10, 112).

In [18]:
import skimage.io as skio
im = skio.imread('results/three_generations.jpg')
skio.imshow(im)
skio.show()

7. train.jpg. x, y displacement for green channel is (0, 40). x, y displacement for red channel is (30, 86).

In [11]:
import skimage.io as skio
im = skio.imread('results/train.jpg')
skio.imshow(im)
skio.show()

8. turkmen.jpg. x, y displacement for green channel is (20, 56). x, y displacement for red channel is (28, 116).

In [9]:
import skimage.io as skio
im = skio.imread('results/turkmen.jpg')
skio.imshow(im)
skio.show()

9. village.jpg. x, y displacement for green channel is (12, 66). x, y displacement for red channel is (22, 138).

In [8]:
import skimage.io as skio
im = skio.imread('results/village.jpg')
skio.imshow(im)
skio.show()

Results - Custom Image

In [20]:
import skimage.io as skio
im = skio.imread('results/cathedral_1.jpg')
skio.imshow(im)
skio.show()

im = skio.imread('results/rafts.jpg')
skio.imshow(im)
skio.show()

im = skio.imread('results/grave.jpg')
skio.imshow(im)
skio.show()