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

Home » Public Forums » archive » Re: Image output display from IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Image output display from IDL [message #60823 is a reply to message #60822] Fri, 20 June 2008 15:51 Go to previous messageGo to previous message
yp is currently offline  yp
Messages: 42
Registered: February 2005
Member
On Jun 20, 5:36 am, Raghu <geor...@gmail.com> wrote:
> Hi Chris,
>
> These are just gray scale images. I just narrowed down the actual
> problem. My images are in ERDAS Imagine (.img) floating point data
> type. When i convert these into floating point again using
> float(images) in ENVI , the resulting images are in ENVI format. When
> these ENVI float images are used in the script, the output looks fine.
> It seems like IDL treats ERDAS' floats differently or i don't quite
> know if there's something else thats wrong here. I have tried it a few
> times now and although the header file in ENVI reads the ERDAS files
> as float, the IDL script seems to do something else when i read the
> ERDAS files directly.
>
> I'm wondering if i'd have to import all my images into an IDL float
> type before i start processing. I'd still think that float
> irrespective of the software would be the same, but i might be wrong.
>
> Ram
>
> On Jun 19, 8:38 pm, Chris <cnb4s...@gmail.com> wrote:
>
>> Are they truecolor images?
>
>> If so, it may be an issue with how the image is passed back and forth
>> in IDL. An n pixel by n pixel color image read into idl (usually) gets
>> stored as a n x n x 3 data cube (plane 0 is R, plane 1 is G, and plane
>> 2 is B). You have to tell IDL which dimension of the array stores
>> these color slices when working with them. In the above example, the
>> third dimension stores the color slices so, if I wanted to display the
>> image in IDL, I would use tvscl,im,true=3. Similarly, if you write out
>> a color image, you usually have to specify which dimension runs
>> through the different colors. Perhaps during the reading and writing
>> stages, you switched this index, meaning that the final image would
>> have all of these weird color/stripe patterns.
>
>> Try scanning the IDL help for the "TRUE" keyword
>
>> Chris
>
>> On Jun 19, 1:42 pm, Raghu <geor...@gmail.com> wrote:
>
>>> Hi all,
>
>>> I wrote a script in IDL which reads multiple images and outputs an
>>> image according to some conditions i specified.
>>> The code works, seemingly with no errors and outputs the required
>>> image. However, when i display the image in ENVI, the output image
>>> looks like a series of tiles/bands as if the values are grouped line-
>>> by-line. The statistics are right, but the display looks really weird.
>
>>> I had read something about how IDL stores images but i can't quite
>>> find the keywords to search for it.
>>> Does this have to do with any machine settings or is it a setting
>>> within IDL itself ? Any ideas ?
>
>>> I can attach a graphic if it helps.
>
>>> Thanks in advance,
>>> Ram- Hide quoted text -
>
>> - Show quoted text -
>
>


Unless you change the OS, IDL should treat the floating point grey-
scale images (from ERDAS) correctly. Few points you could check - (i)
number of pixels and scan-lines (and the size of the file), (ii) how
the bands are stored, BIL/BSQ/BIP?
If you are reading Erdas .img files straight in IDL, remember that
there will be few bytes recorded as file header. Perhaps you want to
export the images/bands as binary flat file(s) before reading in IDL.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL7 IDLWAVE help problem
Next Topic: Fed Up with IDL: image subset by shape or EVF file

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

Current Time: Fri Oct 10 14:56:32 PDT 2025

Total time taken to generate the page: 1.20297 seconds