Re: Problem displaying images on 8 bit monitor [message #50546] |
Wed, 11 October 2006 11:46  |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
Hello,
Most (all??) modern DOME cards are 12-bit; this one is a bit older.
It's frustrating because even Windows' very own shoddy Paint program
can display my 8-bit images correctly so I can't understand why IDL
would have a problem.
I'm in touch with ITTS about this. Not much progress thus far.
Thanks for your help though. If you like, I can let you know what the
problem was if we ever manage to solve it.
Regards,
Mark
Karl Schultz skrev:
> On Wed, 11 Oct 2006 02:28:55 -0700, mark wrote:
>
>> The DOME card/monitor I have uses 8 bits per pixel grayscale - it's set
>> to a 256 level static grayscale and there is no option for this card to
>> increase the bit-depth.
>>
>> The other display programs I have used (that work fine with this card)
>> are ImageJ and Osiris, i.e. normal shareware display programs
>> downloaded from the web that are not at all specifically designed for
>> this card. I'm fairly sure that even Paintshop word work, though I
>> haven't installed and tested that.
>>
>> On this monitor, IDL is displaying the 8 bit images 5 bit, i.e. there
>> are only 32 discrete gray level values being displayed instead of 256.
>> That is why the image does not look smooth. I can't understand why this
>> is the case, but I will take your advice and forward a message to Tech
>> Support and see what they say.
>>
>>
>
> OK. We occasionally get a query about 12-bit DOME card support and I had
> incorrectly guessed that this was your problem.
>
> I don't know what's causing the problem. The IDL code isn't dealing with
> the greyscale aspect of this device quite correctly. I can't really tell
> without having the card here in front of me. I wish I could get a hold of
> one of these for a bit.
>
> Karl
|
|
|
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50559 is a reply to message #50557] |
Tue, 10 October 2006 08:12   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
On Tue, 10 Oct 2006 04:54:36 -0600, David Fanning wrote:
> Mark writes:
>
>> This image is a screen-capture using TVRD() of the same variable
>> displayed in IDL using either TV and TVSCL.
>>
>> http://hem.passagen.se/fysikern/idl/idl_display.tif
>>
>>
>> The monitor I have is a CRT high-resolution mammography monitor (around
>> 1500x2500 pixels)
>>
>> Any helpful hints?
>
> I can reproduce the "screwy" image on my display with the
> following commands:
>
>
> IDL> Loadct, 0, NColors=32
> IDL> TV,BytScl( BytScl(bindgen(256) # bindgen(256), Top=31))
>
> I'm not sure what this means (it's not even 5AM in the US
> at the moment!), but the problem seems to do with a restricted
> number of colors. Your monitor would appear to be top-notch.
> A graphics driver problem? I really don't know.
>
> What does HELP, /DEVICE have to say?
>
> Cheers,
>
> David
The problem is that this is a DOME card/monitor that uses 12 bits per
pixel greyscale.
His "other" display programs probably are written specifically for this
card, and that's why the image looks smooth.
IDL isn't leveraging the 12-bit per pixel feature of this device and needs
to be modified to do so.
Mark should forward a request to ITTVIS Tech support, asking that IDL
support this device in 12-bit.
Karl
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50561 is a reply to message #50559] |
Tue, 10 October 2006 05:55   |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
Hello,
This is how my !d system variable looks like (see below). Isn't it a
bit strange that the N_COLORS variable says 16.7 million whereas in
Windows systems settings, the graphic card is set to 8 bits? There is
another graphic card for a normal monitor, which is inactivated but may
this be influencing the idl settings..?
help, /structure, !d
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'WIN'
X_SIZE LONG 256
Y_SIZE LONG 256
X_VSIZE LONG 256
Y_VSIZE LONG 256
X_CH_SIZE LONG 7
Y_CH_SIZE LONG 10
X_PX_CM FLOAT 54.0000
Y_PX_CM FLOAT 96.0000
N_COLORS LONG 16777216
TABLE_SIZE LONG 256
FILL_DIST LONG 1
WINDOW LONG 3
UNIT LONG 0
FLAGS LONG 328124
ORIGIN LONG Array[2]
ZOOM LONG Array[2]
Jo Klein skrev:
> Hi Mark,
> This reminds me of colour allocation issues that were present in ancient
> UNIX environments, where the number of colours allocated to IDL was
> limited by a number of factors. I think Windows will reserve a number of
> colours on an 8 bit device for its own purposes, such as window
> decorations. Is there an option to increase the number of colours for
> your graphics card? What are the contents of the !d variable? In
> particular, !d.colors? What happens when you try to display a window
> with window,colors=256? Do you run your monitor as a dual-head display,
> or is it mirroring the contents of your primary monitor?
> Just a few wild guesses,
> Jo
>
> mark wrote:
>> Hi David,
>>
>> Here are how the images look. Both of these images are of the same
>> variable:
>> bytscl(bindgen(256) # bindgen(256))
>>
>> This first image is how it should look, and it does using other display
>> programs on my monitor:
>>
>> http://hem.passagen.se/fysikern/idl/normal_display.tif
>>
>> This image is a screen-capture using TVRD() of the same variable
>> displayed in IDL using either TV and TVSCL.
>>
>> http://hem.passagen.se/fysikern/idl/idl_display.tif
>>
>>
>> The monitor I have is a CRT high-resolution mammography monitor (around
>> 1500x2500 pixels)
>>
>> Any helpful hints?
>>
>>
>> Mark
>>
>>
>>
>> mark skrev:
>>
>>
>>> Hi David,
>>>
>>> Thanks for you responses yesterday but I still can't get the images
>>> displayed properly. I'm sorry for insuating that IDL was at fault! :-)
>>> I'm sure I'm not doing something right...
>>>
>>> In response to your suggestions yesterday:
>>> TV, bindgen(256) # bindgen(256) yields a strange looking image (as
>>> expected)
>>>
>>> TVSCL, bindgen(256) # bindgen(256) gives me an image of the type I've
>>> been getting: a gradient consisting of narrow bands (or
>>> tiles/contours). There are about 30 such distinct bands along the
>>> gradient. I'm not sure if that number is significant. It would help if
>>> I could send you a screen-dump or something to show you what I mean.
>>>
>>> TV, bytscl(bindgen(256) # bindgen(256)) gives the same result as above
>>> with the bands.
>>>
>>> Byte scaling my own images doesn't change anything (they're already in
>>> byte format).
>>>
>>> So I'm still in the same situation...
>>>
>>>
>>> David Fanning skrev:
>>>
>>>
>>>> mark writes:
>>>>
>>>>
>>>> >So, there is something not set up right in my IDL environment...
>>>> >and I have no idea what it is...
>>>>
>>>> I rather doubt this. :-)
>>>>
>>>> Can you humor me? Try these commands:
>>>>
>>>> IDL> Loadct, 0
>>>>
>>>> Is this what you are seeing:
>>>>
>>>> IDL> TV, bindgen(256) # bindgen(256)
>>>>
>>>> What about this?
>>>>
>>>> IDL> TVSCL, bindgen(256) # bindgen(256)
>>>>
>>>> What about if you scale your image before you display it:
>>>>
>>>> IDL> TV, BytScl(image)
>>>>
>>>> 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.")
>>
>>
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50562 is a reply to message #50561] |
Tue, 10 October 2006 03:58   |
Jo Klein
Messages: 54 Registered: January 2006
|
Member |
|
|
Hi Mark,
This reminds me of colour allocation issues that were present in ancient
UNIX environments, where the number of colours allocated to IDL was
limited by a number of factors. I think Windows will reserve a number of
colours on an 8 bit device for its own purposes, such as window
decorations. Is there an option to increase the number of colours for
your graphics card? What are the contents of the !d variable? In
particular, !d.colors? What happens when you try to display a window
with window,colors=256? Do you run your monitor as a dual-head display,
or is it mirroring the contents of your primary monitor?
Just a few wild guesses,
Jo
mark wrote:
> Hi David,
>
> Here are how the images look. Both of these images are of the same
> variable:
> bytscl(bindgen(256) # bindgen(256))
>
> This first image is how it should look, and it does using other display
> programs on my monitor:
>
> http://hem.passagen.se/fysikern/idl/normal_display.tif
>
> This image is a screen-capture using TVRD() of the same variable
> displayed in IDL using either TV and TVSCL.
>
> http://hem.passagen.se/fysikern/idl/idl_display.tif
>
>
> The monitor I have is a CRT high-resolution mammography monitor (around
> 1500x2500 pixels)
>
> Any helpful hints?
>
>
> Mark
>
>
>
> mark skrev:
>
>
>> Hi David,
>>
>> Thanks for you responses yesterday but I still can't get the images
>> displayed properly. I'm sorry for insuating that IDL was at fault! :-)
>> I'm sure I'm not doing something right...
>>
>> In response to your suggestions yesterday:
>> TV, bindgen(256) # bindgen(256) yields a strange looking image (as
>> expected)
>>
>> TVSCL, bindgen(256) # bindgen(256) gives me an image of the type I've
>> been getting: a gradient consisting of narrow bands (or
>> tiles/contours). There are about 30 such distinct bands along the
>> gradient. I'm not sure if that number is significant. It would help if
>> I could send you a screen-dump or something to show you what I mean.
>>
>> TV, bytscl(bindgen(256) # bindgen(256)) gives the same result as above
>> with the bands.
>>
>> Byte scaling my own images doesn't change anything (they're already in
>> byte format).
>>
>> So I'm still in the same situation...
>>
>>
>> David Fanning skrev:
>>
>>
>>> mark writes:
>>>
>>>
>>>> So, there is something not set up right in my IDL environment...
>>>> and I have no idea what it is...
>>>
>>> I rather doubt this. :-)
>>>
>>> Can you humor me? Try these commands:
>>>
>>> IDL> Loadct, 0
>>>
>>> Is this what you are seeing:
>>>
>>> IDL> TV, bindgen(256) # bindgen(256)
>>>
>>> What about this?
>>>
>>> IDL> TVSCL, bindgen(256) # bindgen(256)
>>>
>>> What about if you scale your image before you display it:
>>>
>>> IDL> TV, BytScl(image)
>>>
>>> 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.")
>
>
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50563 is a reply to message #50562] |
Tue, 10 October 2006 03:54   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark writes:
> This image is a screen-capture using TVRD() of the same variable
> displayed in IDL using either TV and TVSCL.
>
> http://hem.passagen.se/fysikern/idl/idl_display.tif
>
>
> The monitor I have is a CRT high-resolution mammography monitor (around
> 1500x2500 pixels)
>
> Any helpful hints?
I can reproduce the "screwy" image on my display with the
following commands:
IDL> Loadct, 0, NColors=32
IDL> TV,BytScl( BytScl(bindgen(256) # bindgen(256), Top=31))
I'm not sure what this means (it's not even 5AM in the US
at the moment!), but the problem seems to do with a restricted
number of colors. Your monitor would appear to be top-notch.
A graphics driver problem? I really don't know.
What does HELP, /DEVICE have to say?
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.")
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50564 is a reply to message #50563] |
Tue, 10 October 2006 03:35   |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
Hi David,
Here are how the images look. Both of these images are of the same
variable:
bytscl(bindgen(256) # bindgen(256))
This first image is how it should look, and it does using other display
programs on my monitor:
http://hem.passagen.se/fysikern/idl/normal_display.tif
This image is a screen-capture using TVRD() of the same variable
displayed in IDL using either TV and TVSCL.
http://hem.passagen.se/fysikern/idl/idl_display.tif
The monitor I have is a CRT high-resolution mammography monitor (around
1500x2500 pixels)
Any helpful hints?
Mark
mark skrev:
> Hi David,
>
> Thanks for you responses yesterday but I still can't get the images
> displayed properly. I'm sorry for insuating that IDL was at fault! :-)
> I'm sure I'm not doing something right...
>
> In response to your suggestions yesterday:
> TV, bindgen(256) # bindgen(256) yields a strange looking image (as
> expected)
>
> TVSCL, bindgen(256) # bindgen(256) gives me an image of the type I've
> been getting: a gradient consisting of narrow bands (or
> tiles/contours). There are about 30 such distinct bands along the
> gradient. I'm not sure if that number is significant. It would help if
> I could send you a screen-dump or something to show you what I mean.
>
> TV, bytscl(bindgen(256) # bindgen(256)) gives the same result as above
> with the bands.
>
> Byte scaling my own images doesn't change anything (they're already in
> byte format).
>
> So I'm still in the same situation...
>
>
> David Fanning skrev:
>
>> mark writes:
>>
>>> So, there is something not set up right in my IDL environment...
>>> and I have no idea what it is...
>>
>> I rather doubt this. :-)
>>
>> Can you humor me? Try these commands:
>>
>> IDL> Loadct, 0
>>
>> Is this what you are seeing:
>>
>> IDL> TV, bindgen(256) # bindgen(256)
>>
>> What about this?
>>
>> IDL> TVSCL, bindgen(256) # bindgen(256)
>>
>> What about if you scale your image before you display it:
>>
>> IDL> TV, BytScl(image)
>>
>> 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.")
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50565 is a reply to message #50564] |
Tue, 10 October 2006 02:10   |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
Hi David,
Thanks for you responses yesterday but I still can't get the images
displayed properly. I'm sorry for insuating that IDL was at fault! :-)
I'm sure I'm not doing something right...
In response to your suggestions yesterday:
TV, bindgen(256) # bindgen(256) yields a strange looking image (as
expected)
TVSCL, bindgen(256) # bindgen(256) gives me an image of the type I've
been getting: a gradient consisting of narrow bands (or
tiles/contours). There are about 30 such distinct bands along the
gradient. I'm not sure if that number is significant. It would help if
I could send you a screen-dump or something to show you what I mean.
TV, bytscl(bindgen(256) # bindgen(256)) gives the same result as above
with the bands.
Byte scaling my own images doesn't change anything (they're already in
byte format).
So I'm still in the same situation...
David Fanning skrev:
> mark writes:
>
>> So, there is something not set up right in my IDL environment...
>> and I have no idea what it is...
>
> I rather doubt this. :-)
>
> Can you humor me? Try these commands:
>
> IDL> Loadct, 0
>
> Is this what you are seeing:
>
> IDL> TV, bindgen(256) # bindgen(256)
>
> What about this?
>
> IDL> TVSCL, bindgen(256) # bindgen(256)
>
> What about if you scale your image before you display it:
>
> IDL> TV, BytScl(image)
>
> 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.")
|
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50574 is a reply to message #50573] |
Mon, 09 October 2006 15:08   |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
Hi David,
Yes to your questions except for the latest driver updates (I will
check that out).
As I mentioned, the exact same images opened up in another program
other than IDL are displayed perfectly smooth using the same monitor.
I've additionally tested this using indgen with 256 gray level
values... in IDL, it comes out looking like a series of bands. In all
other display programs it looks fine (smooth and continuous). So, there
is something not set up right in my IDL environment... and I have no
idea what it is...
Mark
David Fanning skrev:
> mark writes:
>
>> I should perhaps add that I'm using Windows XP and IDL 6.0.
>
> I suppose you have checked your monitor settings to be
> sure you are using 256 colors, and that you have installed
> the latest driver updates, huh? And you are sure the data
> is scaled into the range of 0 to 255 before you display it?
>
> 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.")
|
|
|
|
|
Re: Problem displaying images on 8 bit monitor [message #50741 is a reply to message #50546] |
Wed, 11 October 2006 13:28  |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
On Wed, 11 Oct 2006 11:46:52 -0700, mark wrote:
> Most (all??) modern DOME cards are 12-bit; this one is a bit older.
Thanks. I feel better now. :-)
> It's frustrating because even Windows' very own shoddy Paint program
> can display my 8-bit images correctly so I can't understand why IDL
> would have a problem.
I think it is a problem in IDL, and I can't tell what it is until I can
debug it. There are some other options that we could discuss.
Colors for image rendering and colors for other prims are handled very
differently by IDL.
What happens if you:
- create a 256x256 window
- draw 256 horizontal lines with PLOTS, specifying COLOR as 0, 1, ..., 255
for each horizontal line? (decomposed=0, color table 0 loaded)
Do you get a smooth gradient, or the same 32 shades?
> I'm in touch with ITTS about this. Not much progress thus far.
I think that the status quo here is that we don't support the 12-bit DOME
cards and I directed you there (to ITTVIS Tech Support) to add to the list
of people needing it.
But you have an 8-bit card. Tech Support can open and track the problem
for you, but we can't do much about it without a card.
If you want to work with me directly on it, we can take it up on email
(kschultz at ittvis dot com). I have some ideas.
Karl
|
|
|