By: Sanil Pande
This color photo collection is of separate red, green, and blue color channels on high resolution images.
The challenge is to develop an algorithm that both runs fast and is able to find the alignment between all three channels correctly..
Since the channels are misaligned, simple stacking the three channels on top of each other does not work.
The next immediately obvious method is to exhaustively search over all alignment pixels. This works well for smaller images, but at a higher resolution of greater than 1024 pixes, the method becomes prohibitively slow.
A smarter method is to align the the channels exhaustively at smaller scales (~128 pixels), and then use these results to fine-tune the search over larger scales.
This was implemented here using a recursive algorithm using a window size of 5 pixels on each side, which works quite fast and under one minute for each image.
Even after using the pyramid method, there are some problems. Specifically, normalized cross correlation on the raw channels does not work well due to changes in intensity.
To remedy this, I used a Sobel filter, and summed the absolute values of the responses along both the vertical and horizontal axes.
Using these responses to calculate the NCC for a particular offset gives excellent results, and all the given images are aligned correctly.
Here are the final results of the colorization algorithm on the test set, along with the displacements of each non-base filter. The small .jpg images took an average of around 1 second to run, while the .tif images finished in about half a minute each.
Green: (5, 2) Red: (12, 3)
Green: (49, 24) Red: (107, 40)
Green: (60, 17) Red: (124, 14)
Green: (40, 16) Red: (90, 23)
Green: (56, 9) Red: (120, 13)
Green: (78, 29) Red: (175, 37)
Green: (54, 12) Red: (111, 9)
Green: (41, 2) Red: (85, 29)
Green: (57, 22) Red: (117, 28)
Green: (137, 21) Red: (64, 10)
Here are some additional images taken from the Prokudin-Gorskii collection, colorized using the same method.
Green: (12, 8) Red: (90, 18)
Green: (67, 1) Red: (139, -8)
Green: (39, -6) Red: (98, 5)