Page 1 of 1

Removing simple background from an image

Posted: 2016-10-17T12:34:54-07:00
by hiemanshu
I am using floodfill to remove the background from image (I know the color of the background), and it works well for most cases except when the background is disjoint, for example the Google logo, white color still exists inside the characters (the disjoint white space in the O).

I found that using -transparent works in removing it from the space in the characters as well, is using -transparent a good idea or is there a better way to do this?

Re: Removing simple background from an image

Posted: 2016-10-17T12:38:19-07:00
by fmw42
-transparent is the only way to do that without having to floodfill each separate white region.

Re: Removing simple background from an image

Posted: 2016-10-17T12:40:43-07:00
by hiemanshu
Are there any side effects to using -transparent? I'm asking because almost every other post I've found uses floodfill.

Re: Removing simple background from an image

Posted: 2016-10-17T12:42:55-07:00
by fmw42
Only if you have white regions that you want to remain white.

Re: Removing simple background from an image

Posted: 2016-10-17T12:46:20-07:00
by hiemanshu
Ah cool, thanks!