Re: how to read/display an image like it's done in ENVI? [message #69233 is a reply to message #69232] |
Tue, 29 December 2009 03:05   |
Hassan
Messages: 48 Registered: October 2009
|
Member |
|
|
On Dec 29, 1:10 am, David Fanning <n...@dfanning.com> wrote:
> Hassan writes:
>> I have an multi-band image [488,290,62] and opened it in ENVI. I need
>> to work with a particular pixel for example pixel with column 300 and
>> row 160 in band 1. after importing the image in IDL, i couldnt find
>> the pixel.
>> print, image[300,160,0] >>> it shows me a pixel value that is
>> different with the one is shown in ENVI
>> I flipped the image (using reverse function) and consider it starts
>> with column=0 and row=0 in IDL but still couldnt find the pixel.
>> image=reverse[image,2]
>> print, image[299,159]
>
>> I'm not sure if I describe the problem clearly so please let me know
>> if you need more explanation.
>
> ENVI uses an indexing system that starts at [1,1],
> rather than the [0,0] of IDL. Could that be the
> problem?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Hi David,
No, I took that into account as well for example if the pixel value of
the position [300,160,0]/[column,row,band] the equivalent pixel in the
flipped image in IDL should be [299,160,0] but the pixel value doesn't
match.
Thanks
Hasan
|
|
|