[Image-SIG] Flood fill with threshold

Edward Cannon cannon.el at gmail.com
Fri Apr 16 16:42:36 CEST 2010


What you need to do is pass the color to one of these algorithms at  
run time. Getting the color is a UI problem--use tinker or the like.
Edward Cannon
Unicorn School



On Apr 16, 2010, at 6:40 AM, "Yury V. Zaytsev" <yury at shurup.com> wrote:

> Hi!
>
> I have an image with certain areas that are bounded by color  
> boundaries.
> I'd like to have a program that flood fills the region with a certain
> threshold after the user clicks on the image and records the pixels  
> that
> belong to this area.
>
> I found out that Gimp's flood fill tool with threshold 48 does exactly
> what I want. Has anyone got a clue on what is the algorithm they used?
>
> All I could find after short Googling are flood-fill algorithms where
> you give the target color explicitly which I do not want to do,  
> because
> I don't know it and also it varies slightly across the border.
>
> Is there any implementation I might refer to other than downloading
> Gimp's source code and trying to make sense out of it?
>
> Thanks!
>
> -- 
> Sincerely yours,
> Yury V. Zaytsev
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig


More information about the Image-SIG mailing list