Re: Image output display from IDL [message #60843 is a reply to message #60823] |
Thu, 19 June 2008 21:36   |
Raghu
Messages: 3 Registered: June 2008
|
Junior Member |
|
|
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 -
|
|
|