(android) Make background transparent in opencv.

asked 2018-12-13 04:34:10 -0500

updated 2018-12-13 04:59:06 -0500

Akhil Patel gravatar image

Hi, I am using OpenCV android library to extract an image from background, for this i have used grabcut() method.

Here is the code :

Imgproc.grabCut(imgC3, mask, rect, bgdModel, fgdModel, 1 ,Imgproc.GC_INIT_WITH_RECT);

but main problem is sometime it's extract some portion of the forground image also.

so how can i perform only background transparent.

edit retag flag offensive close merge delete