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

Home » Public Forums » archive » Re: COLOR_QUAN question
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: COLOR_QUAN question [message #16778 is a reply to message #16763] Wed, 18 August 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Daniel Peduzzi (peduzzi@mediaone.net) writes:

> My question concerns the R, G, and B arrays returned by the COLOR_QUAN
> function. I've noticed that I don't receive the same RGB values if I call the function
> multiple times with the same input arguments. This isn't very noticeable upon visual
> inspection of the resulting images, unless the differences are exaggerated by color map
> operations such as histogram equalization.

Oh, oh. Hold on here. I think we may be fooling ourselves
a bit. First of all, in the examples that matter (Step 1
and Step 3) the first 31 colors are the gray scale colors
of the images. They appear to be identical in both color
tables. (I used my CINDEX program to view the color tables
after I loaded them.) Moreover, the resulting 2D images
only have values between 0 and 31, and *they* are
identical.

http://www.dfanning.com/programs/cindex.pro

Notice that your differences start *above* the values
that are really used in the images.

Although I can't really explain the differences that
*don't* matter, I do note that the algorithm is a
statistical method. To me this suggests some randomization
may be involved to get some kind of "seed" or something.
(I'm making this up, but I bet I'm right.)

Using a histogram equalization will certainly lead
to strange results, because the color tables returned
from COLOR_QUAN are *never* continuous in color. A pixel
value is assigned a particular color, but that color may
be COMPLETELY different from the pixel with an adjacent
value. There is no requirement, I don't think, that the
same value be assigned the same color in two different
instances. Only that the pixel values and the colors
fairly represent the colors in the 3D image.

> If I include the /MAP_ALL keyword with each call to COLOR_QUAN, the discrepancies
> disappear. However, the documentation indicates that /MAP_ALL should be used
> only if /GET_TRANSLATION is also present (which I don't think I need.)
>
> Should I expect to see the differences above, and is it safe to use the /MAP_ALL
> keyword to eliminate those differences?

I really think the differences are a non-issue. Forget about
the MAP_ALL keyword and cheerfully use COLOR_QUAN. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interfacing (was Re: COLOR_QUAN)
Next Topic: IDL 5.2.1L for Red Hat Linux 6.0

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

Current Time: Wed Oct 08 19:03:48 PDT 2025

Total time taken to generate the page: 0.00450 seconds