In this project the goal is to create colored images by overlaying three plates, R, G, and B, that are photographs taken of the same image by Gorskii. By figuring out how much to displace each plate, we can overlay the three optimally to create the sharpest and clearest color image from them.
Image mapping algorithms must be created in order to help more intelligently determine how to overlay the plates. These algorithms have a hard tradeoff for accuracy and runtime, so a balance must be found where the image will be overlaid correctly while completing the task in a reasonable timeframe.
Tradeoffs for how exhaustive searches are, and how deep image pyramids are, have to be determined. By exhaustively searching over ranges of pixels to find the displacement based on a heuristic, a naive solution was found. Applying this to larger files (such as tif files) was not ideal, so a smarter implementation had to be devised.
This is where recursive exhaustive searches through an image pyramid was implemented.
Exhaustively search over the range of [-15, 15] pixels and find the largest value of the normalized cross correlation to determine the most appropriate offset to create the colored image.
For larger images such as the provided Tiff files, naive searches were not optimal for finding the correct overlay. By using an image pyramid, we can continually scale the image by a factor of 2 until we can find the optimal displacement.
These recursive calls on an exhaustive search could be very slow, so care was taken to find the average minimum number of recursive calls (4) and smallest displacement window (-14, 14) to exhaustively search for the best results paired with decent runtime.
Some results, such as Emir, were not nearly as accurate. This is due to a large descrepancy in the RGB plates brightness in conjunction with a lack of a function to intelligently crop borders. Implementation of such a function and/or layering the plates in a different order would likely provide a far sharper image.
A series of other images I found interesting to test the alogrithm on. View of Voznesene was slightly less well aligned likely due to the large variance in brightness of each plate in the clouds in the sky as well as the border on the picturre