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

Home » Public Forums » archive » Re: identify the pixel location of a specific value
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: identify the pixel location of a specific value [message #48965] Tue, 06 June 2006 18:05
Mike[4] is currently offline  Mike[4]
Messages: 6
Registered: June 2006
Junior Member
Many thanks.

However, I am a newbie in IDL.
I don't even known how to open the "a" image.
I've tried DIALOG_READ_IMAGE( ).
But it doesn't show the image I want.
It is a EVI standard image.
So how to read it in "a", and then processing in a way you mentioned.

Mike.
Re: identify the pixel location of a specific value [message #48980 is a reply to message #48965] Tue, 06 June 2006 06:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
greg michael writes:

> If a is your image, b will be the minimum value, and i the position of
> that value within a.

Actually, the *first* position of the minimum value within a.
The minimum can obviously be represented more than once in an
image. To find *all* the minimum values, you might use the
WHERE function:

indices = Where(a EQ Min(a), count)
Print, 'There are ' + STRTRIM(count,2) + ' minimum values.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: identify the pixel location of a specific value [message #48981 is a reply to message #48980] Tue, 06 June 2006 06:06 Go to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
Try:

b=min(a,i)

If a is your image, b will be the minimum value, and i the position of
that value within a.

regards,
Greg


Mike wrote:
> Hi,
>
> Actually I want to specify the pixel location of the minimum value of a
> single-banded image.
> I compute statistics at first. Write down the minimum value.
> and then? thanks.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: iTool identifiers
Next Topic: Question on call_external

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

Current Time: Wed Oct 08 16:00:28 PDT 2025

Total time taken to generate the page: 0.00518 seconds