Re: identify the pixel location of a specific value [message #48965] |
Tue, 06 June 2006 18:05 |
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  |
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  |
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.
|
|
|