For this first project, given an image consisting of 3 colorized images from the Prokudin-Gorskii Photo Collection, I made a program that could find the best alignment between these 3 colorized images. By using either Sum of Squared Differences (SSD) or Normalized Cross-Correlation (NCC), we can find the optimal height and width displacement to best align these images.
There are 2 approaches that I implemented to find the best alignment for the images.
Exhaustive Search:
Pyramid Approach: Applying the Exhaustive approach but more efficiently
cathedral_output.jpg Red: (3, 12) Green: (2, 5)
monastery_output.jpg Red: (2, 3) Green: (2, -3)
tobolsk_output.jpg Red: (3, 7) Green: (3, 3)
church_output.jpg Red: (-6, 58) Green: (4, 24)
harvesters_output.jpg Red: (16, 124) Green: (18, 58)
icon_output.jpg Red: (22,90 ) Green: (18, 40)
lady_output.jpg Red: (10, 112) Green: (8, 48)
melons_output.jpg Red: (14, 178) Green: (10, 82)
onion_church_output.jpg Red: (38, 108) Green: (28, 50)
self_portrait_output.jpg Red: (36, 174) Green: (28, 78)
three_generations_output.jpg Red: (12, 112) Green: (16, 48)
train_output.jpg Red: (32, 88) Green: (6, 40)
workshop_output.jpg Red: (-12, 104) Green: (0, 56)
emir_output.jpg Red: (-6, 0) Green: (24, 48)
Note: Aligning the emir image on the blue image does not output a clear image as the brightness on the colorized images are not consistent.
A solution to counter the blurry image of emir is to change the orientation where we would align the colorized images on the GREEN image, not the BLUE. By using the pyramid search on the GREEN image we get the following result:
emir_green_output.jpg Red: (16, 56) Blue: (-24, -48)