The purpose of the project was to take glass photo images which represented R, G, and B pictures and align so that we are able to colorize the photo. My approach was to search over a window of [-16, 16] and roll each R/G against the blue and keeping track of which roll value (x, y) produced the minimum SSD. This measurements best aligns the R/G/B images so when they are stacked, it produces a colorized photo.
G(5, 2) R(12, 3)
G(-3, 2) R(3, 2)
G(3, 1) R(8, 0)
G(7, 0) R(14, -1)
My algorithm for the large photos was essentially to start at a factor of the each image at 0.0625. I then aligned the R/G against the B at this factor. After finding the proper (x, y) to align to, I then multiple the (x, y) to 1/factor to get the proper x and y at the factor 1 image. Then, I roll the images to that (x, y) and then rescale it down to factor*2 and decrease my window range by 2, so from [-16, 16] to [-8, 8]. As we scale up to our original image, we can decrease our search range in accordance with our scaling factor.
G(40, 2) R(82, -3)
G(52, -22) R(106, -55)
G(89, -19) R(185, -50)
G(59, 16) R(124, 13)
G(40, 16) R(90, 22)
G(56, 8) R(116, 11)
G(78, 28) R(176, 36)
G(53, 14) R(112, 11)
G(42, 6) R(87, 32)
G(56, 20) R(116, 28)
G(64, 12) R(138, 22)
For Emir, I did the same as I did for Large Photos, but instead I aligned the photos against G instead of B. This fixes the alignment issues I was facing before.
B(-50, -24) R(56, 17)