Overview
We were given our first project based on the aspirations of Sergei Mikailovich Prokudin-Gorskii. By putting together his glass plate images that were provided by the Library of Congress, I was able to reproduce a color image using three color channel images. The metric I decided to use was the sum squared difference because it was more intuitive to me.JPG images
The jpg images were relatively straightforward to colorize. While using the blue channel as a reference, we checked the green and red channels against it to find the best alignment.All it took iterating through a pixel displacement of [-15, 15] using a for loop to find the smallest SSD (sum of squared differences) in order to determine a good alignment.
JPG
TIF images
The TIF images were much more difficult to work with due to the sizes of the r, g, and b matrices. Thus, in order to combat this, I used an image pyramid as suggested. I would continually scale a plate by half until the matrix that represented it had a length less than 200, while keeping track of the amount of times I scaled. I would then find the relatively best displacement by rolling the red and green matrices against the blue one by looking through displacements [-15, 15]. I would then recursively call the function and multiply the relatively best displacement by 2 and search between displacements [x-3, x+3] and [y-3, y+3] in the image that was twice the scale as the previous one, and continually do it until the scale reached the original size.
R[18, 17], G[45, 9]
R[123, 8], G[58, 11]
R[89, 22], G[40, 16]
R[114, -16], G[43, -6]
R[173, -3], G[76, -1]
R[111, 8], G[52, 6]
R[91, 3], G[41, -2]
R[114, 4], G[55, 6]
R[135, -15], G[62, -7]
A few additional images I grabbed from the Library of Congress website are below
Windmills R[125, 21], G[55, 10]
Melon Vendor R[178, 8], G[81, 4]
Tea Station R[104, -14], G[52, -4]