1. Images preprocessed by cropping the edges by 15% on each end.
2. For smaller resolution images, I used a brute-force algorithm that shifted the channels using a [-20, 20] offset in both the x and y directions, prioritizing the translation with the largest normalized cross-correlation (NCC). I aligned the red and green channel to the blue channel.
3. For larger resolution images, I used the same [-20, 20] offset, but used the pyramid technique to efficiently find the optimal translations since the brute-force algorithm requires a larger window, which causes the algorithm to run very inefficiently. Additionally, I scaled the images by 0.5 before running it through the pyramid technique since a translation of 20 in either direction on the full-scale image did not affect the NCC as much, but dramatically increased the cost of running the algorithm.
For the emir image, the large difference in intensity values between the red and blue channel resulted in NCC favoring an incorrect alignment. To correct for this, I used Canny Edge to preprocess an image, which allowed alignment to be independent of the raw pixel values. The edges proved to be a better feature and correctly aligned the image.