Part 1: how to process an image pair. source code and sample images
Part 2: how to process in batch a list of image pairs. source code and sample images