I first wrote a function to align the small images using exhaustive search over the window -15 to 15 and using the sum of square differences formula to find the best alignment. Unfortunately, all but one image aligned correctly using this algorithm. However, when I tried aligning that image using the green channel as a base instead of the blue channel, I found that it worked.

Green: x=2, y=5 Red: x=1, y=10 |
Green: x=2, y=4 Red: x=2, y=9 |
Blue: x=-3, y=-7 Red: x=2, y=7 (aligned to green channel) |

Green: x=1, y=-3 Red: x=1, y=4 |
Green: x=1, y=2 Red: x=2, y=9 |
Green: x=1, y=4 Red: x=1, y=13 |

Green: x=3, y=5 Red: x=4, y=11 |
Green: x=0, y=5 Red: x=0, y=11 |
Green: x=2, y=2 Red: x=2, y=4 |

Green: x=0, y=2 Red: x=0, y=9 |
Green: x=1, y=5 Red: x=3, y=13 |
Green: x=0, y=0 Red: x=1, y=5 |

Green: x=0, y=8 Red: x=0, y=13 |

Instead of using exhaustive search to align the large TIF files, which are each around 3000 pixels in width, I implemented a coarse-to-fine pyramid speedup recursively. The function makes its first estimate at 200-400 pixels, and simply searches around the previous estimate for every larger size. This speeds up the process of aligning the images considerably. There were no issues finding the correct alignment for all the large images. Below images have been scaled and compressed to JPEGs.

Green: x=6, y=43 Red: x=32, y=87 |
Green: x=-6, y=13 Red: x=-12, y=133 |

Green: x=10, y=-16 Red: x=17, y=11 |
Green: x=20, y=24 Red: x=33, y=71 |

Green: x=39, y=50 Red: x=60, y=106 |
Green: x=27, y=51 Red: x=36, y=108 |

Green: x=8, y=56 Red: x=11, y=116 |
Green: x=21, y=8 Red: x=43, y=73 |

Green: x=38, y=71 Red: x=62, y=148 |
Green: x=48, y=56 Red: x=87, y=143 |

**Border Cropping**: I implemented automatic border cropping, which I achieved to moderate success. I tried several methods, and ended up using MATLAB's edge detector to trim off edges. I tried combining this with a sum of square differences method, but it seemed to make overly aggressive crops on some images, so I removed that functionality. However, even so, I ended up with some nasty edges and some too-cropped edges.**Color Correction**: I implemented a grey world color correction algorithm, which worked reasonably on the images. However, some images ended up a little on the green side, which looks a little odd. On the whole, however, it made improvements on most of the images.**Contrast Enhancement**: I tried several methods of enhancing contrast, some of which worked for only part of the image set. I settled on a very simple contrast enhancer that did very minimal processing on the images, but it did improve every image instead of only some.