comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Some kind of pantbucket-function?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Some kind of pantbucket-function? [message #34573] Wed, 02 April 2003 05:35
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Alexander Gro� (AlexanderGross_NOSPAM@gmx.de) writes:

> I have images (2D als well as 3D) with a lot of white dots surrounded by a
> black/dark medium. I want to find all white dots with the MAX-function wich
> returns only the whitest dot. In my case the dots have a size of more than
> one pixel, so I need some kind of a paintbucket function (like known in
> Photoshop) to fill the found dot with black and then search for the next dot
> in the image.
>
> Is this kind of function available in IDL 5.4? If not, I would greatly
> appreciate an implementation suggestion since I am new to IDL.

The MAX function can find the whitest dot, as well as the
index of that dot, but a more general solution would be
to use the HISTOGRAM function and REVERSE_INDICES to
locate these values.

http://www.dfanning.com/tips/histogram_tutorial.html

To "fill" the dot, use the brightest pixel as a seed
for the SEARCH2D function. This will give you the pixel
locations of all the "like-minded" pixels in the immediate
vicinity.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Some kind of pantbucket-function?
Next Topic: a question about IDL graphics under X

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:49:15 PDT 2025

Total time taken to generate the page: 0.80597 seconds