Quantcast
Viewing all articles
Browse latest Browse all 41027

Blending artifacts in OpenCV image stitching

Hi there, I am using OpenCV to blend a set of pre-warped images. As input I have two 4-channel images (*.png or *.tif) from where I can extract a bgr image and an alpha mask with the region related to the image (white) and the background (black). Both image and mask are the inputs of the Blender module `cv::detail::Blender::blend`. When I use feather (alpha) blending the result is ok, however, I would like to avoid ghosting effects. When I use multi-band, some artifacts are appearing on the edges of the images: [![enter image description here][1]][1] The problem is similar to the one raised [here][2], and solved [here][3]. The thing is, if the solution is creating a binary mask (that I already extract from the alpha channel), it does not work for me. If I add padding to the ovelap between both images, it takes pixels from the background and messes up even more the result. I guess that probably it has to do with the functions `pyrUp` and `pyrDown`, because maybe the blurring to create the Gaussian and Laplacian pyramids is applied to the whole image, and not only to the positive alpha region. In any case, I don't know how to fix the problem using these functions, and I cannot find another efficient solution. When I use another implementation of multiresolution blending, it works perfectly, however, I am very interested in integrating the multi-band implementation of OpenCV. Any idea of how to fix this issue? Thank you in advance. [1]: http://i.stack.imgur.com/g1xHd.png [2]: http://dsp.stackexchange.com/questions/3082/blending-artifacts-in-photo-stitching [3]: http://dsp.stackexchange.com/questions/6362/blurring-non-uniform-areas

Viewing all articles
Browse latest Browse all 41027

Trending Articles