Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RGB to wavelength related problem

36 views
Skip to first unread message

Lord K.

unread,
Nov 29, 2009, 3:17:00 PM11/29/09
to
Hi,

I am aware that the "RGB to wavelength" question is widely covered on the
net, and I know that there is no way to perform such a conversion. But my
real need is very specific; maybe some good model can be used for
performing what I want.

My first goal was to perform some "black and white conversion" from a
color picture (I know that I am reinventing the wheel...). To be more
precise, I wanted to simulate some old films. I am aware of the
documentation that can be found on this topic, but here is what I did. I
had a look at the technical specifications of these old films. For
instance, you can find the well-known Tri-X at:
http://motion.kodak.com/US/en/motion/Products/Production/
Black_And_White_Films/7266/tech7266.htm
and the spectral sensitivity curve at:
http://motion.kodak.com/US/en/motion/Quicklinks/Curves/ti7266ss.htm

At that point I searched on the net and discovered that the "rgb to
wavelength" conversion can't be achieved. I found some links where people
describe some more-or-less good "models", but of course it was too much
complicated for my real need.

Suddenly I noticed that my favorite film has a very specific curve:
http://www.foma.cz/upload/foma/prilohy/F_pan_100_en.pdf
It looks like the curve is made of two straight lines; we could even say
it is made of a single straight line over the visible spectrum.

For that reason, the classical way of converting the RGB color to black
and light with the channel mixer (by giving some coefficient to the red,
green, and blue) is probably not bad. But can't we do better?

Do you see a good way (probably not perfect I know) of getting the gray-
level corresponding to this "spectral sensitivity curve" from the RGB
values? Would it be a good idea, for instance, to get the CYM (cyan,
yellow, magenta) of the color in order to have SIX values (rather than 3)?

Assuming the curve is a straight line, could something be done by
converting the RGB to HSV and get the Hue which can be mapped to the
wavelength?

I would be very happy to have some "scientifical" filter for this film?

Best regards,

Lord K.

Bob May

unread,
Nov 29, 2009, 7:18:03 PM11/29/09
to
Not too sure what you are meaning by "wavelength". There are many color
conversion systems available. RGB (red, green and blue lights producing a
fair spectrum of colors within a triangle of the color chart) to YuV, YIQ
amongst othrs. Probably the beest for convrsion to a wavelentgth number
is the YIQ as this is the luminance (B&W), I and Q (intensity and phase
angle of the color) for the partticular spot of the image. this is the
standard used by NTSC color broadcasting where the color info is transmitted
in a subcarrier in the image with the phas and amplitude of the signal
referenced to a color reference signal before the beginning of the image
line.,
Of course, working in the digital world will mean deecimation of the results
so you're not going to be getting to see subtlee shades of green (or any
othr color for that matter) but rather steps in the such.
HOpe this discussion helps you.

--
Bob May

rmay at nethere.com
http: slash /nav.to slash bobmay
http: slash /bobmay dot astronomy.net

Jeff Engel

unread,
Nov 29, 2009, 8:51:23 PM11/29/09
to
This wheel you just re-invented, is it round or square?

aruzinsky

unread,
Nov 30, 2009, 11:26:06 AM11/30/09
to

As I recall, the YCbCr transform was based on the spectral
distributions of television screen phosphors made in the 1950s. The Y
channel is grey level and is a weighted average of the RGB channels.
You should study its derivation.

Off the top of my head, it seems to me that you need the spectral
distribution for each R G and B channel on your monitor or other
output device. If I had this data, I might integrate the product of
spectral distributions (1. film, 2. CRT phosphor or LCD or plasma or
whatever equivalent) for each channel, normalize to one, and use these
three weights on the RGB channels. As a rough approximation, it may
suffice to take the heights at the spectral peaks in your monitor
phosphors (or LCD or Plasma or whatever equivalent) spectra for each
channel, multiply them by the heights in your BW film spectra at those
wavelenths, normalize, and then use them as weights for the RGB
channels. I have given small thought on whether the spectral
distributions of human eye cone sensitivities should be incorporated
and I suspect not but someone with more time might want to rethink
this.

aruzinsky

unread,
Dec 1, 2009, 11:06:45 AM12/1/09
to
On Nov 29, 2:17 pm, "Lord K." <k...@kax.org> wrote:

V in HSV is the maximum RGB value. The I in HSI is an average. Y in
YCbCr is a weighted average.

I believe that it would depend on the spectral curves of each RGB
channel on your output device, e.g., phosphors in a CRT. As I recall,
the weights for Y in YCbCr color space were determined using spectra
from 1950s color television screen phosphors. If I were you, I would
find similar weights to those in Y by integrating the product of such
spectra with those of the film. I am uncertain whether the spectral
curves for eye cone sensitivity need to be incorporated. I suspect
that they are already incorporated by the white point of the output
device, i.e., use the curves after their the areas are normalized to
white. Also, take due consideration of the units on the ordinates of
these spectral curves, e.g, if they are power or the square root of
power.

Bob May

unread,
Dec 1, 2009, 4:56:31 PM12/1/09
to
Might remind you that there is no conversion system that can do the entire
chromaticity diagram (produce all of the possible colors that the eye can
see) so whatever system you choose will only produce the colors within the
triangle of the colors selected.
Each luminance/color scheme uses a particular set of colors as the
refeerence points in the diagram and changing the color points arbitrarily
just changes the colors represented by some amount which usually meas that
the colors are actually warmer or cooler than what the numbers represent.
If you want to represent a 440micron light wavelength and the reference for
the blue end of the spectrum is 466micron, you just ain't gonna get there!
Remember that all of this is really only an appriximation of "reality".

aruzinsky

unread,
Dec 2, 2009, 10:45:36 AM12/2/09
to
On Nov 29, 2:17 pm, "Lord K." <k...@kax.org> wrote:

This is just a test. I previously replied to your post without
success.

aruzinsky

unread,
Dec 2, 2009, 12:46:57 PM12/2/09
to
On Nov 29, 2:17 pm, "Lord K." <k...@kax.org> wrote:

How is it that your post appears in Google Groups sci . image .
processing but my replies there don't appear there? If you are
causing this chaos, stop it.

Bob May

unread,
Dec 3, 2009, 4:20:37 PM12/3/09
to
Could be that the newsgroup list isn't complete on your post. I notice
only sci.optics for thiis thread. I'll also note that reposters like Google
and so forth sometimes get way behind on low postage frequency newsgroups
and you're looking vbefore the reeposter bothers to get your post.

Bo Schwarzstein

unread,
Dec 9, 2009, 7:45:56 AM12/9/09
to

In fact, I have tried some methods from papers before, and did not
find any perfect way to do this.

The conversion from RGB value to a fake SPD distribution depends on
orthogonal basis, such as fourier or gaussian.

As I know, the Houdini's Mantra and LuxRenderer could handle the
wavelet effect in rendering stage.

Maybe this could be matched your problem.

You may start from here
http://www.sidefx.com/index.php?option=com_content&task=view&id=1240&Itemid=310

and take a look at this paper "A SPECTRUM-BASED FRAMEWORK FOR
REALISTIC IMAGE SYNTHESIS"
ftp://fas.sfu.ca/pub/cs/TH/2000/YinlongSunPhD.pdf

12AX7

unread,
Dec 28, 2009, 1:05:54 AM12/28/09
to
You will need to deconstruct the image from the RGB values back through the
sensor to the actual scene. Then, using reflected light from the scene
cascade that with the spectral sensitivity of your film. Building a model
that goes back to the original scene should help you simulate what response
the film would have to the scene. You'll have to make some assumptions of
course, for example determining if the scene is illuminated with sunlight or
artificial lighting. I highly recommend a book Digital Color Management:
Encoding Solutions by Edward J. Giorgianni and Thomas E. Madden. In this
book you will find step by step procedures to go from digital data back to
the scene and then up some other imaging chain, such as camera film to a
print. Plug in your spectral response curve and you should be good to go.


"Lord K." <k...@kax.org> wrote in message
news:4b12d6bc$0$29346$426a...@news.free.fr...

0 new messages