I want to concatenate two images that have are overlapped with each other. Sample of two such images are attched. Images 1.png, 2.png, 3.png, 4.png and 5.png are overlapped and I want to create a concatenated version of these images. Overlapped sections of the images should not copied. The overlapped sections didn't have fixed height.
I need a very very fast (As fast as possible) and accurate function for concatenation.