Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to set transparent background to grabcut output image in OpenCV (C++)?

Hi I'm using the grabcut algorithm to remove the background of an image, and currently I get these results: image description

What I want is that the background to be transparent instead of black. I tried the suggestions I found here: http://answers.opencv.org/question/24463/how-to-remove-black-background-from-grabcut-output/#24508

which led me to this result: image description

What I want is that my program doesn't depend on the colors of the image, since any color can be part of the foreground. As far as I understood, thresholding performs the image segmentation based on colors, so I can't use it.

I've read something about blob and edge detection but I didn't manage to implement it. So I need help. Thanks

How to set transparent background to grabcut output image in OpenCV (C++)?

Hi I'm using the grabcut algorithm to remove the background of an image, and currently I get these results: image description

What I want is that the background to be transparent instead of black. I tried the suggestions I found here: http://answers.opencv.org/question/24463/how-to-remove-black-background-from-grabcut-output/#24508

which led me to this result: image description

What I want is that my program doesn't depend on the colors of the image, since any color can be part of the foreground. As far as I understood, thresholding performs the image segmentation based on colors, so I can't use it.

I've read something about blob and edge detection but I didn't manage to implement it. So I need help. Thanks

How to set transparent background to grabcut output image in OpenCV (C++)?

Hi I'm using the grabcut algorithm to remove the background of an image, and currently I get these results: image description

What I want is that the background to be transparent instead of black. I tried the suggestions I found here: http://answers.opencv.org/question/24463/how-to-remove-black-background-from-grabcut-output/#24508

which led me to this result: image description

What I want is that my program doesn't depend on the colors of the image, since any color can be part of the foreground. As far as I understood, thresholding performs the image segmentation based on colors, so I can't use it.

I've read something about blob and edge detection but I didn't manage to implement it. So I need help. Thanks

How to set transparent background to grabcut output image in OpenCV (C++)?

Hi I'm using the grabcut algorithm to remove the background of an image, and currently I get these results: image description

What I want is that the background to be transparent instead of black. I tried the suggestions I found here: http://answers.opencv.org/question/24463/how-to-remove-black-background-from-grabcut-output/#24508

which led me to this result: image description

What I want is that my program doesn't depend on the colors of the image, since any color can be part of the foreground. As far as I understood, thresholding performs the image segmentation based on colors, so I can't use it.

I've read something about blob and edge detection but I didn't manage to implement it. So I need help. Thanks