Assignment 1: Colorizing Images:

Description: For this assignment, I use various image processing techniques to colorize the digitized Prokudin-Gorskii glass plate images. 

Processing: First, I separate an image file (example on the left) into three subimages, each representing one color channel. Then I search over a range of displacement to find the best displacement to align different channels. To determine how good an alignment is, I implemented two metrics, SSD and NCC. They have similar performance, but SSD runs faster. To prevent the black pixels on the edge to harm the result, I take out the 10% width and height on the boundary when calculating NCC and SSD. I align green and red channel to blue channel, and stack the three images up to produce the image on the right. For large images, I implemented an image pyramid, where the algorithm first finds the proper displacement on a scaled-down version of the image, and then adjust that displacement for every scale up. 

My processing fails at aligning red and blue channels for emir.tif, mainly because the clothes and the background have similar values in red channel. To improve on this, I probably need to implement some edge detection or filters that takes surrounding pixel into account

 

                   

                                                      Offset: G[5,2], R[12,3]

   Offset: G[49,24], R[99,-211]           Offset: G[59,16], R[124,13]

    Offset: G[41,17], R[90,23]           Offset: G[56,8], R[116,11]

 Offset: G[-3,2], R[3,2]                 Offset: G[82,11], R[178,13]

 Offset: G[3,3], R[6,3]                      Offset: G[79,29], R[176,37]

 Offset: G[51,27], R[108,36]                   Offset: G[53,0], R[105,-12]

 Offset: G[53,14], R[112,11]                   Offset: G[65,12], R[138,22]

Offset: G[43,6], R[87,32] 

Extra Images:

Offset: G[4,0], R[14,-1]                   Offset: G[2,2], R[7,3]

Offset: G[4,-4], R[11,-9]              Offset: G[2,1], R[11,1]