[Image-SIG] remove an image background using PIL
douglas at paradise.net.nz
Mon Jun 1 02:23:18 CEST 2009
Peter Yen <colorpyen at gmail.com> wrote:
>> Thanks for your quick response. The background is unknown at the time of
>> processing. Actually I don't need a very accurate methodology to remove all
>> background, removing partially is good enough.
I once wrote a (GPL'd) C module that fairly reliably extracts the
background of a photograph of a drawing on paper. It is essentially the
same as PIL's floodfill but it follows shallow gradients.
The public git browser seems to be broken right now, but if this
sounds like what you need download a tarball, and look for the
expand_region function in the img-c directory.
More information about the Image-SIG