Given glass negatives which contain the green, red, and blue light intesities for an image separately, we can overlay them to create an RGB image. However, the layers may not align exactly, so we must computationally determine a proper alignment.
To accomplish this, I used SSD to measure how well two images align. I loop over a range of possible alignments and use the alignment that yields the smallest SSD. Afterwards, I crop out the edges of the image, which have awkward looking borders.
(The above photo failed to align properly; this is probably because of the logs in the water; some were cut off, which led the program to shift to the next log over.)
I was considering using SSD divided by the square of the number of pixels (potentially playing around with this heuristic) as a measurement of the value of the current image is, and then finding the amount of cropping to minimize this value. However, I decided my code was already taking too long, so I decided to crop 6% off each of the borders to remove the color inconsistency.