Re: how to read/display an image like it's done in ENVI? [message #69231 is a reply to message #69230] |
Tue, 29 December 2009 05:15   |
Hassan
Messages: 48 Registered: October 2009
|
Member |
|
|
On Dec 29, 12:31 pm, David Fanning <n...@dfanning.com> wrote:
> Hassan writes:
>> 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.
>
> Shouldn't that be [299, 159, 0]?
>
> 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.")
yeah, It is [299,159,0] but the problem still exists. I used the
following commands to import the data from ENVI:
ENVI> ENVI_OPEN_FILE, image, /NO_REALIZE , R_FID=FID
ENVI> ;If it is a valid file, read the header
ENVI> ;if (fid[0] eq -1) then return, -1
ENVI> envi_file_query, fid, ns=dimX, nl=dimY, nb=nbBands,
DATA_TYPE=dataType,$
ENVI> OFFSET = HeaderOffSet, LOOKUP= lookup, class_names =
classNames,$
ENVI> num_classes = numClasses
ENVI> map_Info = ENVI_GET_MAP_INFO(FID=FID)
ENVI> ;Pack the header info in a structure (optional)
ENVI> headerInfo = {ns:dimX, nl:dimY, lookup:lookup,
map_info:map_Info}
ENVI> data = read_binary(ref2,data_Start = HeaderOffSet,$
ENVI> data_Type=dataType, data_Dims=[dimX,dimY,nbBANDS],ENDIAN
= "native")
ENVI> image=data
do you think has something unusual happened?
|
|
|