[Image-SIG] Flood fill with threshold

Edward Cannon cannon.el at gmail.com
Fri Apr 16 17:47:55 CEST 2010





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

> Hi!
>
> On Fri, 2010-04-16 at 07:42 -0700, Edward Cannon wrote:
>> 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.
>
> I can't to this, because I don't know it. I only know the seed point.
> Also, the border color is not constant, it varies a little bit. What I
> want to get is the analog of the Gimp thresholded flood fill tool.
If you have the point you can get the color there with the getpixel  
method.
> Right know I have found Eric Raymond's flood fill code in ImgDraw.py  
> and
> trying to adapt it to use a threshold, but it's not entirely clear how
> to define distance in terms of colors. Maybe just as the distance
> between vectors will do.
I have found that works pretty well.
> -- 
> Sincerely yours,
> Yury V. Zaytsev
>


More information about the Image-SIG mailing list