4 ms·
I had this issue for a site a few months ago and did the flood fill approach, also making available a simpler mode. This algorithm could use a few tweaks, but
by paulcaponetti 13y ago
I had this issue for a site a few months ago and did the flood fill approach, also making available a simpler mode. This algorithm could use a few tweaks, but it worked quite well for images with only white backgrounds, but can easily be tweaked to deduce background colors.
https://github.com/PCaponetti/image-background-removal https://github.com/PCaponetti/image-background-removal