Re: Flood fill with threshold

Edward Cannon <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>



On Apr 16, 2010, at 7:50 AM, "Yury V. Zaytsev" <[email protected]> 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
>
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.