or Connect
AVS › AVS Forum › Display Devices › Display Calibration › The link between gamma, greyscale and gamut
New Posts  All Forums:Forum Nav:

The link between gamma, greyscale and gamut

post #1 of 10
Thread Starter 
Hello guys,

Personally, this one confuses me a very great deal. I thought perhaps it would be useful to make a thread on this subject as I hope it could become a useful reference for fellow calibration starters like myself.
So, here goes.

Grey scale
1) Calibrating Grey scale (setting the color of white) is all about obtaining a neutral shade of grey for each step of the grey scale for the gamut you are targeting. You need to do this for the darkest shade of gray up to full white. It needs to be correct for each level of stimulus up to 100% grey, which is in fact full white. Thus, you are adjusting the x,y coordinates for white to obtain the D65 color temperature for every step of the grey scale. The coordinates for Rec.709 white are x= 0.3127; y= 0.3290.

The ratio between red green and blue must be equal to obtain your goal. However, you still need to get Y (luminance) correct.

Gamma
2) This leads me to gamma. Gamma is about getting the brightness (luminance) correct for each step of the grey scale. Each step should get brighter by the same amount as the previous step. Adding green to green for instance, will increase the luminance of green. Gamma is then about the amount of red, green and blue.

It goes without saying that adjusting the amount of R, G or B will also adjust its ratio, and vice verse. In many Color Management Systems there is a separate control for Y. This is a control that will adjust the ratio and amount at the same time (if it works well). Otherwise, adjusting gamma (the amount) might yield an unequal ratio between R, G and B, thereby invalidating your grey scale.

Gamut

3) The part of the story that is still unclear to me, is how this all links to the Rec. 709 gamut. Primary and secondary colors also have x,y coordinates and also have a luminance that needs to be correct. Obviously, gamma will also affect the luminance of these colors and will therefore indirectly affect their hue and saturation. Thus when you use a CMS to get the x,y coordinates for the colors correct, and also set luminance correct, setting gamma might mess up the hue, saturation or luminance of the colors.

Only for 100% and 0% stimulus this is not an issue because 0% and 100% do not have "gamma". ALL other stimulus levels for a given primary or secondary color, regardless of the saturation, will have "gamma". I know that Lightspace CMS separates gamut profiling from gamut calibration but I would really enjoy understanding this last part of the puzzle.

edit: so my question is rather. Why do we adjust gamma as a last step AFTER we do the CMS work? It seems that, since gamma influences the color, it should be the other way around?

Thanks for reading:-)
Edited by Jeroen1000 - 12/5/12 at 7:38am
post #2 of 10
So here is how all the math works.

You start with an RGB triplet, lets say 191,128,137.

You break each code out individually and convert it to a stimulus percent.
(191-16)/219 = 79.9% R
(128 - 16)/219 = 51.1% G
(137 -16)/219 = 55.2% B

Then you degamma the value so you have linear light, this is also known as the EOTF (Electro optical transfer function).
.799^2.2 = .6103
.511^2.2 = .228
.552^2.2 = .271

Then you run the linear RGB values through a matrix for a given set of primaries and white
.6103 R = XYZ 0.251, 0.129, 0.011
.2287 G = XYZ 0.081, 0.163, 0.027
.2711 B = XYZ 0.489, 0.019, 0.257
summed
XYZ = 0.382, 0.312, 0.296

Then XYZ can be converted into x,y, the Y value from XYZ is the Y in x,y,Y.
x 0.3855, y 0.3154, Y 0.312

So you can see on the step when you convert the Stimulus percentage to linear light, the gamma formula effects not just the total light output but the ratio of linear RGB. It's linear light that's used in all the derived formulas. We use gamma as a means to perceptually encode linear light since 8 bits isn't enough to store linear light, although it origin dates back to CRT's response to voltage.

But in regards to your original question, it's about that ratio of RGB in linear light. When all non-zero gamma encoded values are the same, you have white, a primary or a secondary, and changing the gamma exponent only changes the luminance. When all three values are non-zero and two values are the same, the gamma only effects saturation and luminance, When all three triplets are different the change in gamma effects hue, saturation and luminance.
Edited by sotti - 12/5/12 at 11:14am
post #3 of 10
Wow Joel! That is kind of like Einstein explaining what "fast" is!eek.gifbiggrin.gifwink.gif
post #4 of 10
Quote:
Originally Posted by Jeroen1000 View Post

edit: so my question is rather. Why do we adjust gamma as a last step AFTER we do the CMS work? It seems that, since gamma influences the color, it should be the other way around?

You should do Gamma with the grayscale, and that should happen first.

I don't see any reason to separate, the calibration of the gamma response and grayscale since they are both concerned with getting the input RGB values to output the correct amount of linear light on the other side. When each channel is correct for gamma, they will also be correct for grayscale. The only time it makes sense to look at them separately is when you are adjusting controls that only effect on or the other.
post #5 of 10
Quote:
Originally Posted by sotti View Post

You should do Gamma with the grayscale, and that should happen first.

Although in some very specific cases, it doesn't really matter if you retouch gamma after doing the CMS. wink.gif

For the record, I fully agree with Joel's order, if one is starting a new calibration from scratch. ... Just to clear up any lingering confusion from that other thread. smile.gif
post #6 of 10
Thread Starter 
Truly an excellent reply Joel and well laid out. One small "remark"
Quote:
When two values are non zero and the same, the gamma only effects saturation and luminance

Say we have 235,235,16 (yellow), two values are non zero and the same but is it not so that only the hue (and luminance) have changed here?

@HDTVChallenged I read that thread you are referring too. I'm a victim of that lingering confusion smile.gif
post #7 of 10
Quote:
Originally Posted by Jeroen1000 View Post

Truly an excellent reply Joel and well laid out. One small "remark"
Say we have 235,235,16 (yellow), two values are non zero and the same but is it not so that only the hue (and luminance) have changed here?
@HDTVChallenged I read that thread you are referring too. I'm a victim of that lingering confusion smile.gif

I edited my above statement to read "When all non-zero gamma encoded values are the same, you have white, a primary or a secondary, and changing the gamma exponent only changes the luminance."

That should clear it up.

So your case of 100% stim, 100% saturated yellow falls into the luminance only case, since we have 100%, 100%, 0%. If you had some form of yellow that was 75%, 75%, 20% then we would see a saturation change, but not a hue shift.
Edited by sotti - 12/5/12 at 11:13am
post #8 of 10
Here's help to visualize the relationship vs using the way normally seen in calibration reports

.
post #9 of 10
It is important to do the grayscale/gamma prior to color management if for no other reason than the white point will affect the position of the secondaries. If you do color first, you will end up chasing your tail going back and forth multiple times to get the grayscale and color both the way you want it. This is true even if you are not calibrating inside the gamut. If you are calibrating inside the gamut, then the selected gamma will affect both color and grayscale.

It is also important to do gamma right after grayscale and then grayscale again, because changing the gamma will almost always affect the measured white point.
post #10 of 10
Thread Starter 
Thanks everyone. It's all clear now. My RS232 to USB cable has arrived which will make calibration a lot easier with an Iscan DUO. It also seems that its standard window patterns (those accessible using the remote) are at a whooping 50% of screen area. Yes, I've used them to calibrate :rolleyes.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Display Calibration
AVS › AVS Forum › Display Devices › Display Calibration › The link between gamma, greyscale and gamut