I'm blending two images by taking the distance transform, and using the result of the distance transform, I perform dt1/(dt1+dt2). This gives me the alpha for both the images, which I then apply it. But this quite frequently leads to duplication, like so:
I've referred to the following (but I couldn't find a conclusive solution):
http://graphics.cs.cmu.edu/courses/15-463/2010_spring/Lectures/blending.pdf
https://dsp.stackexchange.com/questions/29156/blending-artifacts-in-opencv-image-stitching