[cairo] Subtractive API, part 0

Francois Robert frobert at atex.com
Mon Feb 1 03:20:15 PST 2010


ecir hana wrote:

> CMS is basically two things, one simple and one really difficult.

> There actually is one and only, true color space - LAB. 
Hmmm... There are "true" colorspaces that even predate "LAB" (CIE 1976 L*a*b* to be exact). CIE 1931 XYZ is one. (CIE 1976 L*a*b* is defined in terms of CIE 1931 XYZ, by the way...)

> When you also define the white balance what you get is 
> 4-dimensional space and if you pick a point there everyone
> in the whole world would precisely understand what color you
> are talking about. That's the easy one. 
I am afraid it is unfortunately more complicated than that and this is because what we call "color" is a subjective sensation that is the product of brain processing. It is subject to illusions. It differs from individual to individual: Some aspects of color may not be captured in today's biological / physical models...
The model we have (CIE 1931 XYZ) is based on spectral response curves of the human light color receptors (cones). The normal human eye has 3 types of cones, which differ by there response curves, peaking at different wavelenghts (short/blue, medium/green and long/red). Our color vision is therefore relying on 3 independent scalar signals and the underlying model is a 3D vectorial space, because it was empirically found that the stimuli are more or less linearly additive. By integrating the response curve accross all the visible spectrum for a determinate "stimulus" (light, defined by its entire spectral distristribution) then one can obtain those three values. XYZ is a linearly transformed, convenient way of presenting those values (usually called "tristimulus"). In 1931, the CIE has defined the 3 "standard" response curves (the "color matching functions") based on small number of individuals. How close is any individual from those curves is anybody's guess... In fact, those curves were revised in 1964 IIRC because the curves depends also on the angle underwhich the color patch is viewed... (the 1931 observer uses a 2° angle, the 1964 is 10°).
So Chris Murphy observation about the necessity of defining a "color" (a stimulus) by its spectral distribution may now make sense : It is the most robust way to store the stimulus values in a standard-independent way (independent in particular of the color matching functions).

However, the viewing conditions are an important factor in our subjective viewing of colors and XYZ does not take that into account. In 1976, the L*a*b* coordinates system was introduced to address this. Each of those 3 coordinates L*,a* and b* are defined relatively to a specified illuminant and obtained via non linear transformations from XYZ coordinates of the observed color AND the illuminant. The point is : a L*a*b* triple alone is incomplete: One must supply the illuminant used as well (by its XYZ coordinates for instance). The "*" in the name denotes that this coordinate system is relative to the illuminant, as is CIE L*u*v*, which explains another important remark of Chris Murphy about those pesky asterisks...
When you say "4-dimensional space", I suppose its because you assume that illuminants definitions are one-dimensional ? True, there is indeed a serie of standard CIE illuminants (D50 etc...) but really this hardly make them unidimensionnal in nature.
Now, some aspect of color perception are still not addressed by L*a*b* and other coordinate systems are being designed/refined to account for "color appearance". CIECAM97 and CIECAM02 are two of those, but I am unfortunately not familiar with them.

> The problem is that for purely technological reasons there
> is no device which can show LAB. All monitors, printers, 
> papers, scanners, cameras, ... are different. So what you do
> is you come up with a mapping which says this color on this
> device should be that color in LAB. This mapping is called ICC.
More exactly, the International Color Consortium (ICC) is an organization that standardized such a mapping (an "ICC profile"). And a single profile may contain more than one mapping too...

> You go from your monitor to LAB and from LAB to your printer 
> (i.e. two ICCs). And you know what? In one instance it in fact
> works - if you are able to control all the devices in your workflow.
> Say you are a huge magazine publisher. You know what monitors
> you use, what lamps there shine and what cameras you take picture
> with, you print all the time on the same paper with the same printer
> with the same dyes. You print a few test sheets, you measure the
> output and tweak a bit some of your profiles until it looks right.
> And then you don't touch it! 
It seems unfortunately unavoidable they do have to adjust it on a regular basis: Every batch of paper and dye may be different, print machines worn out, CRT or LCD color drift and need periodical calibration, etc... All of this are presumably part of QA procedures. Which incidently means that the computer-based part of color management -CMS- is potentially only one aspect of a company-wide thing, that may exists even in small print shop.

> The problem is, that you and I are not huge publishers. You come
> to some random printing house which gave you the best price, you
> demand some random paper which they never heard of and then you
> glue a protective foil over the final prints. Obviously, there
> is most certainly no right ICC because the numbers of possible 
> ICCs grows exponentially so no one cares. So what you do then is
> you make an assumption here, a generalization there. By the time
> your prints get out, the colors are so far from your original
> intend, that the portion which CMS contributes to the correctness
> of result is smaller that say, if you relayed on dot gain compensation
> or experience, for example. Not to mention that some printers simply
> refuse to take tagged sources, probably as they had bad experience with it.



More information about the cairo mailing list