What is a good method to align images together that may have different rotations, exposures, etc, but have the same background or other fixed reference?
Adobe Photoshop can do this with its "Photomerge" feature.
How can I do this programatically? Is there an Open Source application that does it?
You want to search for image stitching
or image registration
as these are the names that it's also known by. This wikipedia article has some useful information. But I only know of commercial libraries that do it, not any open source ones.
The basic outline of the process (in the commercial library I know of) is this:
In step 3 you can also take account of distortion such as rotation and lens distortion. But to allow for changes in colour step 2 would need to be more advanced (i.e. not just based on the greyscale pixel level).
There's an feature request to add this functionality to the AForge library, but at the moment it's not been done and I don't know the current status.