Wednesday, November 20, 2013

What difference does it make? (part 2)

Let's see... where did I leave off in part 1?  Our hero, Albert Munsell left us with a posthumous challenge. He developed this wonderful color space -- a way of organizing crayons [1] -- which has for some strange reason become known as the Munsell Color System. This is one of the oddest things I have ever seen in science history, by the way. One of the basic rules in the history of science is that you never name something after the person who invented it!


The wonderful Munsell Color Space had this wonderful trait that it is "perceptually linear". Well at least mostly. The thing is, there was a lot of effort put into making sure that pairs of colors that are adjacent kinda felt like they were the same distance apart as any other pair of adjacent colors.

But, the Munsell color space is not measurable, that is, I can't just put a color meter on an object and have it tell me the position of that color in Munsell units. So, they invented CIELAB -- but it did not quite have that perceptual linearity that Munsell had bragging rights to. If you took a one unit step in any direction from a given point in CIELAB space (that is, from one color), it probably wouldn't look to be the same size as a one unit step away from some other color. Also, a step in one direction (like in the direction of higher chroma) may not look to be the same size as a step in another direction (like in the direction of a slightly different hue).

So, what's a color scientists to do!?!?!

Taming of the ΔE

As I write this, I am sitting in a hotel in Hong Kong, sipping on a Coke that I bought for the alarming sum of 32 dollars (Hong Kong dollars, mind you). My wife is currently back home. For the sake of the discussion, let's say that she is in a bar in Wisconsin, listening to reggae music [2]. Also for the sake of the discussion, let's say she is also drinking a Coke, for which she paid four dollars. And let's say that my buddy Dave, who lives in Sweden, is drinking a Coke that he paid three euros for. And let's say that my buddy, Steve, in England is also drinking a Coke that he got for 2.50 pounds. While the absolute numbers are different, for each of us, the perceived cost is about the same. All of us are getting equally ripped off for drinking carbonated sugar water. 

Such it is with the adjustment that has been done to color differences. I don't mean that we are getting ripped off when we order a color difference margarita, but that there is a local exchange rate that is used to convert between actual numbers and perceived cost.

Let me 'splain a bit more about the details of that local exchange rate.

Enter CMC

CIELAB came along with a method for determining the distance between two colors. It is called ΔE. Technically I should say that it was called ΔE. Now, it's called ΔEab to distinguish it from its antecessors, which we will enumerate shorthly. ΔEab is computed in the normal Pythagorean way with all those hypotenuses and square roots and all that. It's just the distance that you would measure with a tape measure, as if the colors were all laid out in a physical model of color space. Don't let anyone tell you it's more complicated than that. A ΔEab is defined as one step in any direction, and was originally intended to refer to one "just noticeable difference".

The error in ΔEab assessment of color difference can be generally characterized by saying that higher the chroma (richer color) the larger the overestimation of a color difference. R. McDonald noticed this in 1974, and proposed a fairly simple method to correct ΔE values. I don't know this for sure, but I believe McDonald worked for J P Coates Thread Company [3]. This work all lead to ΔEJCP79.

In Old McDonald's formula, the differences in L*, a*, and b* are first converted into ΔL, ΔC, and ΔH. These represent the difference in lightness, in chroma, and in hue. I show below ΔC in green, and ΔH in red.


This is where my Hong Kong dollar analogy comes in. These three differences are then scaled, each according to the position of the colors in CIELAB space. The scaling is shown below. I didn't bother to show how to compute SL, SC, and SH, mainly because I'm lazy. 

The ΔEJCP79 Color Difference Formula

This formula was from 1979. But that gosh darn McDonald kept working on this formula. He, along with Clarke and Rigg, published a modification in 1984. This modified version was standardized in 1986 by the Colour Measurement Committee of the Society of Dyers and Colourists. They named it after their own group: ΔECMC.

The formula embodied a few general ideas that are summarized in the artist's conception shown below. First, the collection of all colors that are viewed as being "too close to tell the difference between" are described by an ellipsoid in CIELAB. Second, those ellipsoids get more elongated as you move away from a neutral gray color. Third, all the ellipses are tilted about the neutral axis, that is, they point to a* = b* = 0.

Artists conception of CMC just noticeably difference ellipses

This color difference formula has been successful. According to a recent poll by IDEAlliance, ΔECMC is currently the most commonly used color difference formula in the print industry, with 45% of the respondents saying this was the formula they used to specify color tolerances.

The menu gets longer

The CMC formula was updated in 1987 by Luo and Rigg and called the BFD color difference formula. Don't ask what me what BFD stands for, cuz I don't know. But it's probably not what you are thinking. For some reason, BFD never took off. Maybe because people thought it was not a Big Friggen Deal?


Then came ΔE94, which was accepted as a trial standard by CIE in 1994. This color difference formula is a simpler version of the CMC formula with similar performance. The CIE, by the way, is a standards organization which fits under the ISO standards umbrella. The name stands for International Commission on Illumination. For those of you who noticed that "Illumination" does not start with the letter "E", note that the committee goes under the French name Commission Internationale de l'Eclairage.

Dong-Ho Kim wrote his PhD dissertation in 1997 on yet another color difference formula. Excuse me... I meant colour difference formula, since his work was done at the University of Leeds in England. The formula was known as LCD for Leeds Colour Difference.

Like BFD, Dr. Kim's formula never got taken to the prom. Perhaps he didn't have a good publicist? Or perhaps his work was overshadowed by the work of the ISO committee TC 1-47, which published CIE 142-2001. This document introduced ΔE00 which is also known by the euphonious name "CIEDE2000".

The CIE was a bit circumspect about this formula. The document describes a recommendation, and not a standard. "A period of use, testing, and reporting by the user community will precede a determination on whether to make the new method a standard."

Now, I don't want to say the formula for ΔE00 is ugly, but let's face it. When it was born, the doctor slapped it's mother. This formula gives Stephen King nightmares. Seriously, the formula is complicated enough that I have had two different people send me spreadsheets to debug. There is an oft referenced paper that provides a data set for testing implementations of the formula.

From the standpoint of an applied mathematician, I honestly worry about all the fitted parameters. To understand why this is a concern, have a look at my blog post on when regression goes bad. Still, the standards group in the printing industry, TC 130 (which I happen to be a member of) recently ratified this as the color difference formula of choice.

Remember how ΔECMC gave us ellipses for just noticeable difference, and that the ellipses all pointed toward the neutral point? CIEDE2000 gives us quasi-ellipses which sometimes don't quite point to neutral.

Quasi ellipses, shown in a*b*, all of which have radius of 2 ΔE00

To recap, we have ΔEabΔEJCP79ΔECMC, ΔEBFDΔE94, LCD, and ΔE00. Seven color difference formulas, arranged in chronological order, with every other one catching some users along the way. (I am guessing that the next ΔE formula won't be shopping for a prom dress any time soon!) Which one is best? Generally speaking, the last formula, despite it's distinct lack of pulchritude and parsimony, agrees better with psycho-physical testing. The CIE has gone from it's original stance of "suggested formula" to "standard formula".

What about a uniform color space?

Remember my analogy about Hong Kong dollars? Wouldn't it be nice if we had once single currency that applied to colors everywhere in color space? If we could somehow warp color space so as to match human perception, life would be so much easier. Or so I think.

One problem that would go away is the so called "which color do I use to define my ellipse" problem. I glossed over this problem when I introduced ΔECMC, but consider this: with ΔECMC, the color difference between color one and color two is generally not the same as the color difference between color two and color one. In this formula, the first color is always used to "calibrate the ruler" for measuring color difference. ΔE00 solved this problem by defining an imaginary color midway between the two colors you are comparing.

Another fall of the "which color do I use to define my ellipse" problem is that ΔE00 has a warranty of 5. It is not recommended for color differences greater than that.

Really, what we want is not a way to distort ΔL*, Δa*, and Δb* values for any particular color, but rather a way to distort the whole color space so that the whole Pythagorean thing works. Apparently, I am not the only person who had that thought. Here are some folks who have entered the sweepstakes for the best uniform color space:

Labmg (Colli, Gremmo, and Moniga, 1989)
ATD (Guth, 1994)
DCI-95 (Rohner and Rich, 1995)
LLAB (Luo, Lo, and Kuo, 1995)
??? (Tremeau and Laget, 1995)
CIECAM97 (CIE standard, 1997)
RLAB (Fairchild, 1998)
IPT (Ebner and Fairchild, 1998)
L*’a*’b*’ (Thomsen, 1999)
DIN99 (DIN standard 6176, 2000)
CIECAM02 (CIE standard, 2002)
QTD (Granger, 2008)
LEaEb(Berns, 2008)
LAB2000 (Lissner and Urban, 2010)

Wow. I think this just goes to show ya. People want this uniform color space, but it's not a simple task to come up with one. One can only hope that some dashing young math guy will one day come up with a simple equation that gives us a uniform color space. Just think of the fame and fortune that this guy will receive!

---------------------------
[1] Interesting point of history here: Munsell developed a set of crayons. The rights to these crayons were purchased by Binney and Smith in 1926 to augment their Crayola line of crayons. I assume that most of my readers have heard of these.

[2] For those who are not familiar with Wisconsin, this is one of the few states where there are more bars than churches. The majority of these bars will be featuring a reggae band. I may not have this exactly correct, but someone once told me that their brother heard that Wisconsin is known as the reggae capitol of the Midwest.

[3] A thread company? Really? It may seem odd that this guy is doing color science, but consider the importance of color when looking at thread, especially when it comes to accepting a batch of thread as being the correct color. This work all lead to JCP79.

2 comments:

  1. Thank you for this post. Where can I find more information on the magic number 5 and where is it coming from?

    ReplyDelete
  2. OVK - I don't know how the number 5.0 deltaE (as the warranty on DE2000) was derived, although it has to do with the fact that the scaling factors change throughout color space. If two colors are too far apart, then the scaling factors will be different.
    This warranty is mentioned in CIE 15-2004 and in ASTM D2244.

    ReplyDelete