Newsgroups: sci.image.processing
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!pipex!bbc!alanr
From: alanr@rd.bbc.co.uk (Alan Roberts)
Subject: Re: wavelength <-> RGB?
Message-ID: <D3MIqu.5pE@bbc.co.uk>
Sender: usenet@bbc.co.uk
Nntp-Posting-Host: sunf0.rd.bbc.co.uk
Organization: British Broadcasting Corporation, UK
X-Newsreader: TIN [version 1.2 PL0]
References: <1995Feb2.185009.7613@Princeton.EDU> <3h56oo$4d1@fbi-news.informatik.uni-dortmund.de>
Date: Tue, 7 Feb 1995 09:37:41 GMT
Lines: 82

Alexander Klaus LS7 (klaus@euklid.informatik.uni-dortmund.de) wrote:

: Hi Jason,

: first I assume that you are talking about "visual" wavelength, else it
: would make no sense to me. I guess you want to create a color corresponding
: to the sensual impression one gets when looking in light with the given 
: wavelength.

: There will be no exact solution as we are talking about human sensors. Each 
: human senses colors different, at least colors have different meanings to them.

: The human eye has to different types of sensors: 
: 	- greyscale for structure
: 	- RGB for color 

Not really, the rod cells are sensitive to bluish colours and work only in
low light conditions, the RGB cones provide ALL vision at higher lighting
levels.

: These three seperate RGB sensors detect the diffent ranges of light, eg
: the R-sensor has its maximum sensitivity for the color ("pure", "standard") red but 
: detects as well a shorter and longer wavelength but not so intensiv.
: Each of the 3 color sensors have these ranges (looks like a Gauss-histogram)
: of sensitivity which cross each other. 
: Get yourself a biology schoolbook, I remember a figure concerning this 
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That's very good advice.

: When you sample this figure you can easily create the RGB-set from wavelenght
: by simply looking up each "eye-RGB-histogram" at the given wavelength. 

: eye's sensitivity
: ^
: |  red     x   green
: |            x
: |  * *   x
: | *   *        x    # blue
: |       x              #
: |      *        x #      #
: |*    x   *  #      x     #
: -------------------------------------> wavelength
:    ^       ^        ^ maximum

This figure is the wrong way round, red is at long wavelengths, blue is
at short.    

: Notice that the three curves are not equal in height as biologically seen
: green is very important (plants) for living (remember your pre-human time)
: and blue is pretty unimportant (you wouldn't eat blue food, would you. 
: Its natural to assume blue stuff as uneatable)

These statements are all relative, as it depends on the colour of the
white to which the eye happens to be adapted at the time.

: The last point you have to take into account is that the computers RED is 
: might not be the human-eye RED. But as even monitors differ in their red
: and monitors and printers as well I think this algorithm might be a good
: first approval.

This is a common confusion. The eye's red is indeed not that of the vdu, or
of any other red, since the eye does not really have a red at all. What the
eye has is the colour-matching function of red, green and blue. These are
the visual matching functions of the eye to the full range of spectral
colours, using an arbitrary set of primaries just for the analysis.

: The other way round is tricky as a given RGB-set not necessarily equals
: a certain wavelenght (50,50,50 [grey] = ? nm ). But you could find out nearest
: neighbour-colors or even a mixture of pure wavelength-colors, depending on how 
: "important" this problem is for you.

I strongly recommend you read Charles Poynton's FAQ on colour as an
introduction to colorimetry. It goes far beyond the contents of any
school biology book and will lead you gently through the morass of
maths yopu need for a full understanding of your problem.

--
************* Alan Roberts **************
* BBC Research & Development Department *
* My views, not necessarily Auntie's    *
*    but they might be, you never know. *
*****************************************
