>
>I have a gray version of a speech spectrogram (in my case, float numbers that
are represented by a gray-level image) and I need to convert it to a colorful
version. I found some related information in the Java2D list archive and I think
I can quantize the samples to 12 bits (for example) and split the bits into 3
channels (4 bits/channel). Is there a more efficient way ? Suggestions are
welcome.
>
This is the typical pseudo-color mapping situation. Your best bet is probably
to map the input gray levels to colors by creating an IndexColorModel.
The IndexColorModel can map input values of up to 16 bits to RGB triplets.
You select whatever color mapping you want.
One way to do this is to map out your color path in a pure hue
space like the hue component of HSV and then convert those values to RGB.
Or you can spiral through the space, increasing brightness (value) and
saturation as you move. This will give you more color transitions.
Link Perry
_______________________________________________________________________
Lincoln Perry Computer Systems Imaging Technology Group
Sun Microsytems, Inc Phone: (650) 786-0117 (80117 internal)
901 San Antonio Rd. UMPK27-302 Fax: (650) 786-5852
Palo Alto, CA 94303-4900 [EMAIL PROTECTED]
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".