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:
- Initially you have to specify the rough alignment of the images, i.e.
- Image A is to the left of image B and they overlap by less that 10%.
- Image C is to the right of image B and they overlap by 10-20% etc.
- Based on the parameters in 1) the algorithm will attempt to find unique a "template" in the overlapping regions. It will then use a template matching technique to locate the template in each of the 2 overlapping images.
- Item 2) can be repeated several times to give a series of matching locations, that can then be used to provide an exact fit.
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.