I'm using OpenCV wherein I'm trying to copy one image with a certain level of transparency on to the top of another one image. But in the end, instead of having the transparent image, I see the whole checkered background. Both images have 4 channels. The image with the flowers was obtained with the GrabCut method and then transformed to a BGRA.
I`m copying the image normally using:
flowers.copyTo(newimg(Rect(0,0, flowers.cols, flowers.rows)));
imwrite("test.png", newimg);
Any ideas of why this is happening?