Showing posts with label CIEDE2000. Show all posts
Showing posts with label CIEDE2000. Show all posts

Tuesday, July 18, 2017

How big is a deltaE?

Every once in a while, someone in the audience calls on me to ask a question that I know the answer to. That just happened to me, and I am soooo happy!


This is the second blog post in a series about the actual meaning of color differences. I blogged previously about the origin of the DE, in particular, the DE00. I came to the preposterous notion that "the size of a DE color difference is based on the Munsell Color System, which is all about uniform spacing of colors. 1.0 DE00 is one of 76 perceptually equal steps between pure black and pure white."

Today, I want to correct that silly idea. Contrary to what certain bloggers have said previously, the color difference DE00  is a unit of measure which is used for industrial color-difference evaluation. This color difference equation is officially defined in the document Improvement to Industrial Colour Difference Evaluation (CIE 142-2001). The summary of this document starts out with  the sentence "Recommended practice for industrial colour-difference evaluation is presented." (The italics are mine, added strictly to heighten the excitement.)

The question that sparked this series of blog posts

Here is the question that I got from my good buddy, Larry Goldberg. As you will see from his question, he is eloquent, piquant, and just a tad irreverent; three qualities I appreciate in a friend. He works for a little company called Beta Industries, where you can get microscopes and print measurement devices and a variety of other devices for the print industry.

Here is his question:

I'm looking for The Idiot's Guide to delta E, converting scientifically rigorous results to Foolproof Rule o'Thumbs.  Or the more linguistically acceptable Rules of Thumb. Or until the new, improved Fool is released.

Something in simple tabular form such as;

delta E 2000  |  Rule O'Thumb
======================
0                         Deadnuts!
1                         Just Noticeable Difference, depending on who's asking and how much they drank for lunch
2                         Winner Winner Chicken Dinner!
3                         Good commercial color match, Kwitcher belly-achin', looks good to me!
4                         It'll be perfect when you add a little more snap to the magenta.
5                         Whaddya expect on this crappy paper?
6                       TWICE as good as commercial color match, no?  No. The buyer needs another dinner and round of drinks.
7 - 10                Roses are red, violets are blue, the grass is green the sky is blue.  Run it, they'll be wrapping the fish in it tomorrow.
>10                     This is a lot better than when they printed black and white...

If you have a dissertation, or a link, or a suggestion, it would be greatly appreciated.

Boy, have I got a technical paper for you!

The Committee for Graphic Arts Technologies Standards (CGATS) has been feverishly working on a standard that ties numerical color difference to lexical color difference. The title of the standard is "Graphic technology — Printing Tolerance and Conformity Assessment". Those of us in the biz affectionately know it as TR 016. The technical report is free, by the way. Just click on the link in the sentence before the sentence before this one.


This technical report is all about making that critical decision about whether a printed product has conformed to tolerances for color. Yes, this is the stuff of which contracts are made. Come to think of it, citing this document in a contract could simplify an agreement between print buyer and printer. I wonder if the folks on the CGATS committee ever thought about that? I'll hafta mention it during the next meeting I attend.

TR 016 defines four levels of acceptance, with explanations for when these levels are appropriate. Each of the levels has an associated tolerance for color difference (in DE00), and states that 95% of the production samples must have a color difference less than the number. In other words, most of the measurements must be within this tolerance.

Here are the levels:

    Level 1 - "the most color critical applications, e.g., proofing" - 2.0 DE00
    Level 2 - "color critical applications, e.g., commercial printing" - 3.0 DE00
    Level 3 - "utility process color printing" - 4.5 DE00
    Level 4 - "pleasing color" - 6.0 DE00

So, there you have it. The size of a DE color difference is all about tolerances in the industry. For print work, 2.0 DE00 is considered pretty darn good, and 6.0 DE00 is merely "pleasing". Within printing, it is expected that the ink will be kept to a higher tolerance than the print using that ink, and the printing of a proof must also be tighter than the printing of the final product. Kinda makes sense. The variation in the color of the stuff coming out of the print shop can't be any better than the variation of what goes in.

Other industries may have tighter or looser tolerances for color. Please add to the comments below if you know about color tolerances in other industries!

Pondering

Consider this: The tolerances for color are based on a scheme for equal steps of color, which is where the DE came from. Somehow it seems a bit odd to put those two together. But one big benefit of this scheme is that it is based on our perception of color. That's a good thing, since our perception is certainly not linear with reflectance. Another big benefit is that our perception of the size of a DE00 is largely independent of the color that you are looking at. That is, we don't need different tolerances for different colors or directions of color change.

On the other hand, I would argue that our acceptance of a difference in color between two samples is not necessarily the same as our perception of the gradations of color, especially when those two samples are not side-by-side. We are much more discriminating when we see two bags of potato chips sitting next to each other on the shelf.

A color that is slightly off will sit on the shelf until expiration date

And when the colors are not side-by-side? I would argue (without much data to support this) that our brain is much more forgiving of color changes that are strictly changes in lightness or chroma than they our of changes in hue. I would also argue (again without a grain of evidence) that we tolerate differences much better if the whole image has that same sort of shift. And once again without anything to support this, I claim that the brain is much more forgiving of colors in busy images with lots of fine detail.

Comparison of a health food drink ad in a glossy magazine and on newsprint
(Images courtesy of JMG Design Services)

There is a committee in the CIE (TC8-16) that is currently working on trying to quantify Consistent Colour Appearance -- what is it that makes our brain accept the two images above as being "kinda the same", versus if those two images were shifted in hue? There are some bright and knowledgeable minds working on this committee. And then there is one dim-witted slacker who just sits around and writes self-important blog posts all day.

But on the third hand, industrial tolerances with DE00 are amenable to measurement with existing technology. What good is a unit of measure if you can't find a ruler?


That's all for part 2 of this trilogy of blog posts. Stay tuned for part 3, where I revisit the phrase just noticeable difference, and admit that the first two parts of this series were nothing but lies!

Wednesday, December 18, 2013

76 shades of gray, part 1

The book got it wrong. E. L. James missed 26 of the shades of gray. And the CIE?  You know, the International Commission on Illumination, the good folks who brought you CIELAB? They got too many shades. In 1976, they said that there are 100 shades of gray. The truth lies somewhere in the middle, almost exactly in the middle. There are 76 shades of gray.

The book that everyone has read, but none will admit to reading
The plot

I am gonna do a little gedanken here. Gedanken is the German word for "thought", which is something Germans are pretty good at. When I use this word, I refer to a "thought experiment". Thought experiments are ones that occur just inside your head. Generally, gedankens are cheaper than super-colliders and NASA probes.

Suppose I were to start with a bucket of white paint and a bucket of black paint. Let's just pretend that the white paint is absolutely the purest, brightest white that is possible. Driven snow and all that. And let's just say that the black paint is panther-drinking-double-espresso-in-a-coal-mine-at-midnight black. Remember, this is a gedanken so I am allowed to use paints made of non-obtanium.

I start by painting one little tile with the white paint, and another with the black paint. Oh, did I mention? I also have an unlimited stock of little tiles along with my impossibly white and black paint.

Next I fill a cup with the black paint and add one tiny drop of white paint. I mix this up, and use it to paint another tile. Can I tell the difference between the black tile and the one-drop-of-white black tile? Probably not. But with the infinite patience that I am only capable of in a thought experiment, I do this exercise one drop of white paint at a time until I can just barely tell the difference between the black and the slightly contaminated black. I discard all the in between tiles, so that I now have three tiles: pure white, pure black, and almost pure black.

Now, with the infinity squared patience that I am only capable of imagining in a gedanken, I continuing adding white paint, one drop at a time, saving out those tiles that are just noticeably different from the ones I already have. When I reach the stage of a tile that is so white as to be indistiguishable from the pure-as-the-driven-snow white, I stretch my back and put away my paints. After all this, how many tiles do I have? In other words, how many shades of gray are there?

A few of the gray tiles from my collection

I did this, and came up with 76 shades, including pure white and pure black. Well, I didn't actually do the physical experiment. To be perfectly honest, I got bored before I even finished the gedanken. I asked my computer to do that for me. It didn't seem to mind. Of course, I did notice that my computer didn't get me a birthday present this year. Maybe I'm just reading too much into that. I'm sure that there will be a great big package under the Christmas tree with a tag signed "With love from John's Laptop".

Details please?

Let me put a little more meat on that turkey. The CIEDE2000 [1] color difference between L*a*b* = {0, 0, 0} and (1, 0, 0) is 0.575. That means if I add just enough white to my pure black to bring the L* up to 1, then the color difference is 57.5% of a "just noticeable difference". It would follow, then, that I need a bit larger jump to make it noticeable, like almost twice as big. As a second guess, I take 1 / 0.575, which is 1.739, and that comes out pretty close. A few more interations, and I get L* = 1.734. If I believe in CIEDE2000, then this L* value is just noticeably lighter than pure black.

I can repeat this process. L* = 3.442 is just noticeably lighter than L* of 1.734. The sequence goes: 0.000, 1.734, 3.442, 5.124, 6.782, 8.814, ...

Plot of the 76 just noticeably different gray values

The plot above is getting dangerously close to something that is dangerously interesting. If we look at it correctly, it is one dimension of a uniform color space (UCS). To explain what that means, let me start by giving an example of a not-so-uniform color space: CIELAB. As I explained in my post What difference does it make, the perceptible size of a unit step in CIELAB varies depending on where you are.

Here's what we have to do to make a UCS from the plot above. In the graph above, the y axis is the L* values, going from 0 to 100. The x axis is just the count, that is, the first L* value in the list, the second L* value, the third, and so on. Let's give the x axis a name: L00, meaning an L* like thingie that is based on CIEDE2000.

What do I mean when I say it is based on CIEDE2000?  By definition, the difference between L00 of 47 and L00 of 48 is 1.0 ΔE00. By extension, the difference between L00 of 43 and L00 of 53 is 10.0 ΔE00. Once you have created the magic look up table, the complicated formula for computing CIEDE2000 is gone.

I have zoomed in on the graph above to illustrate finding L00 and computing a color difference. We can determine the L00 value of 35, by tracing along the red line from the y xis at 35, over to the curve, and then down to the x axis to get an L00 of approximately 24. Similarly the blue line tells us that an L* of 41 is about an L00 value of 29.

If I want to compute the color difference between the two L* values 35 and 42, then you take the difference between their respective L00 values: 29 in 24 is 5 ΔE00.

Computing CIEDE2000 with a nomograph

This provides a way to compute CIEDE2000 without going to the ugly formula [2]. This in itself is perhaps convenient, but not really all that exciting. The thing that is a tiny bit exciting is that this method allows us to get around the warranty for calculation of CIEDE2000. We can compute the color difference when  ΔEab is greater than 5.0.

I know that you are excited, and are fixing to send me an email to ask for a spreadsheet with this lookup table, but hold off until the second part of this post, in which I unveil a simple formula to do the L* part of the CIEDE2000 calculation.

---------------------
[1] Wondering about CIEDE2000? Visit a previous post of mine.

[2] Caveat - this only takes the L* value into account. This simple method will not work when a* and b* are involved!