Project 1: Colorizing the Prokudin-Gorskii Photo Collection

Julie Soohoo

Naive Algorithm

Using the b channel as the reference, my algorithms match the g and r channel to blue. After testing two scoring metrics, I found that normalized cross-correlation (NCC) worked better over sum of squared differences (SSD) so eventurally only NCC was used. For the smaller images, I cropped off 1/8 of each side of an image before comparision to get rid of borders that could cause inaccuracies during comparisions. Then I tested displacements over a window of [-15, 15] in both horizontal and vertical directions, and kept the one with the best score in order to realign the uncropped matrices.

Cathedral: G(5, 2) R(12, 3)
Monastery: G(-3,2) R(3,2)
Nativity: G(3, 1) R(8, 0)
Settlers: G(7,0) R(15-1)

Image Pyramid

In the case of the larger images, I cropped the images by the same factor as the smaller ones. However since the images are larger, it would take too much time, I used the image pyramid approach, resizing the image by a factor of 1/2 while recursively calling the function until the image height was less than 300. In the deepest level of recursion, I searched over a the same window of displacements as the naive approach. Going back up the recursion, I multiplied the found displacements by 2 to account for the fact the images were resized. Then the image at that level would be rolled by that amount along while recalculating scores with a different displacement window, which was halved in size from the previous level to make computations shorter. The parameters were found after testing different ones, and I found these to make better results out of the ones I tested. Finally, the images would return the final displaced, uncropped channel that was aligned to the reference.
Harvesters: G(60, 16) R(124, 14)
Icon: G(40, 16) R(90, 22)
Lady: G(56, 8) R(118, 12)
Self Portrait: G(78, 28) R(176, 36)
Three Generations: G(52, 14) R(112, 12)
Train: G(42, 6) R(88, 32)
Turkmen: G(56, 20) R(116, 28)
Village: G(64, 12) R(138, 22)

Failure

My matching algorithm failed in the case of the photo of Emir. This is likely because the image's pixels notably do not have the same brightness values, particularly where his robe is in the blue and red channels. This is a large part of the photo and at the center where the scoring algorithm will do its work, so the comparison between the brightness channels using normalized-cross correlation did not work in this case.

Emir: G(50, 24) R(306, -162)

Extras

Extra glass neg. images were taken from the Library of Congress.

Floodgate and guardhouse of the M.P.S. (Ministry of Communication and Transportation) at Belyie Ozerki: G(12, 18) R(28, 26)
View of the Church of Saint George. Staraia Ladoga. [Russian Empire]: G(0, 10) R(24, 12)
Exit from the yard of the Church of Saint George. Riurik fortress. [Staraia Ladoga, Russian Empire]: G(74, 22) R(154, 36)