[Image-SIG] floodfill routine ?

Arnd Baecker arnd.baecker at web.de
Mon Feb 2 02:43:10 EST 2004


On Sun, 1 Feb 2004, Joe Reinhardt wrote:

> I have C code that works with PIL to do this.  I originally wrote
> these functions in python, but found them too slow and rewrote them in
> C.
>
> I added a new module with two functions:
>
> ImageRegion.rgrow(seed, neighborhood) - seeded region growing
> ImageRegion.cclabel(neighborhood)     - connected components labeling
>
> Both of these functions run in less than one second when applied to
> 1000x1000 images.  They both work well with the ImageStat module that
> is available in PIL, so you can use the region growing or cc labeling
> to find regions, and then use ImageStat to measure them, or to mask
> out grayscale regions to measure their statistics.
>
> If you are able to compile your own Image module you are welcome to
> try to use these functions.  Also, if you use i386 Debian, I can send
> you the deb file for the modified Image module.

I would be interested in this as well (if you did attach it,
it was blocked from the mailing list ;-).

More generally I think it would be nice to see this integrated
in a future release of PIL.
In the meantime a page (or wiki ?) where add-ons to PIL are collected
might be very useful (I know talking is cheap ;-).

Best,

Arnd



More information about the Image-SIG mailing list