I am working on a photo stitching application that uses multi-band blending. I need to get rid of unpleasant edges appearing at some places:
Here is the area of overlap (left - new image added to the mosaic, right - current mosaic contaning pixels of new image on background pixels to improve blending, middle - blending mask):
If I just compute weighted average between left and right image according to mask, the result is of course OK. However, this would leave a visible seam as two images have usually slightly different exposure.
So all three images need to be successively blurred to build a Gaussian pyramid - here is how one level of the pyramid looks like:
You can see that the top part of blending mask "touches" the border. The Gaussian blurring filter reflects on image borders and this causes inaccuracy in lower band.
I colored the images to make the problem more visible:
I am not sure about how to blur the mask so that it would deal with overlap area edges nicely.
Few suggestions:
- change behavior of the blurring filter (how?)
- extend area of blending mask so that one part never "touches" the border
- update weighting masks so that resulting blend mask is more "edge-aware"
Any other suggestions/hints?