Help needed on explaining gray point behavior in levels or curves..

H
Posted By
H._Teeuwen
Aug 6, 2004
Views
585
Replies
15
Status
Closed
In an attempt to explain the levels command to a colleague of mine, I tried this little experiment.

I created 3 squares and filled them with RGB(5,5,5) RGB(128,128,128) and RGB(250,250,250). I then used they eyedropper to set the black point to RGB(0,0,0), the white point to (255,255,255). As expected, it also shows that the value of 50% gray remains unchanged during this operation.

Next, I tried to demonstrate the use of levels to remove a (reddish) color cast. I used the same 3 squares and filled them with RGB(10,5,5)
RGB(132,128,128) and RGB(250,245,245).
The black and white eyedropper in the levels dialog works just as expected and set the black point to RGB(0,0,0) and the white point to RGB(255,255,255).
The gray point eyedropper however sets the gray point to RGB(131,131,131) instead of the expected value of RGB(128,128,128).

Blatner and Fraser write in ‘Real World Adobe Photoshop’ about the gray eyedropper: "… it adjusts the gamma values for each channel in an attempt to map the source color you click on in the image to a color with the same hue and saturation as the target color, but with the luminance of the source color. It’s trying to adjust the color without affecting the tone".

So, I looked at the HSB values of the swatches above, and the middle gray went from HSB(0,3,52) to HSB(0,0,51)

Is this why the levels dialog doesn’t target for RGB(128,128,128), and is the Brightness change from 52% to 51% just a rounding
difference?

Thanks in advance.

Herman

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

GA
George_Austin
Aug 7, 2004
Herman,

Check your PS Color Settings. Under Working Spaces, is Gray set to Gray Gamma 2.2? If not reset to it to Gray Gamma 2.2 and then recheck the gray value you get with the Levels gray point eyedropper.

George
TL
Tim_Lookingbill
Aug 7, 2004
Check out the auto color settings for controling neutrals using the color picker in the curves and levels dialog box.

Very interesting:

< http://www.creativepro.com:80/printerfriendly/story/17164.ht ml>
H
H._Teeuwen
Aug 7, 2004
Gray is set to Gray Gamma 2.2.
I know this article by Fraser; it doesn’t answer my question.
GA
George_Austin
Aug 7, 2004
Herman,

I Don’t have B&F’s RWAP. The preserved "Luminance" is defined how? If it were luminosity (0.3R +0.59G +0.11B), your 132/128/128 patch would have become 129/129/129 rather than 131/131/131. If it were the Lab luminance channel, then the Lab L value would have been unchanged, but it jumps fropm 51 to 54. And it’s not the L value in Hue, Saturation and "Lightness".

George
H
H._Teeuwen
Aug 8, 2004
I agree George,

For RGB(132,128,128):
Brightness = 128 (1B)
Lightness = 130 (0.5R+0.5B)
Intensity = 129 (0.3333R+0.3333G+0.3333B)
Luminance = 129 (0.2125R+0.7154G+0.0721B)
Luminosity = 129 (0.3R+0.59G+0.11B) As used in Photoshop.

In Lab, Luminosity goes from Lab(54,2,1) to Lab(55,0,0)
In HSB, Brightness goes from HSB(0,3,52) to HSB(0,0,51)

In all cases no 131.

Herman
GA
George_Austin
Aug 8, 2004
Herman,

I haven’t seen those formulations for Lightness and Luminance before. What is your source for them?

Brightness in Photoshop is the value of the highest channel normalized to the 0-100 range. That makes it 52 for 132/128/128.

George
H
H._Teeuwen
Aug 8, 2004
George,

Source:
The 123 of digital imaging by Vincent Bockaert. Excellent and unique E-book!

See <http://www.123di.com/default.htm>

Herman
TL
Tim_Lookingbill
Aug 8, 2004
I guess you all realize the differences in the numbers described here have a DeltaE in at least luminance that’s undetectable by the eye on output.

I believe these differences exist due to a combination of rounding errors and maybe the fact the Adobe’s working space is a linear environment. All the color editing tools are at least.
GA
George_Austin
Aug 8, 2004
Tim,

Yes, these specific differences are inconsequential and may well be attributable to rounding. Or digitization of analog quantities may contribute to the minor discrepancies. Then again, in other situations. the differences may have more import. For me right now, the question is of academic—not practical—interest. If rounding or digitization or similar approximations account for the observed values, where did 131 come from when 129 would be expected?

George
TL
Tim_Lookingbill
Aug 8, 2004
I guess Adobe’s ACE engine and color management system hardwired into PS is expecting the users to rely on the preview more than the numbers, now.

The mystery behind the number oddities may only be answered by Adobe, maybe.

Only guessing.
H
H._Teeuwen
Aug 9, 2004
Pete Bauer from NAPP writes that it targets for the closest perceptual neutral.
GA
George_Austin
Aug 9, 2004
Herman,

Great! Now just what is a "perceptual neutral"? 🙂

George
GA
George_Austin
Aug 9, 2004
Herman,

Come to think of it, lacking any other opinion, I would guess the perceptual neutral would be obtained by holding luminosity (.30R +.59G + .11B) constant, since the RGB channel weighting factors assigned for luminosity are chosen to account (crudely, but as well as can be done) for perceived brightness differences for the same color values in the 3 RGB channels.

So targeting the "closest perceptual neutral" seems to me to be going with constant luminosity.

George
TL
Tim_Lookingbill
Aug 10, 2004
To get an idea of what I think might explain what’s happening internaly with PS’s numbers might be understood on page 16 of this pdf. You may have to open pg16 in PS to be able to get middle gray readings:

<http://www.fho-emden.de/~hoffmann/swatch22112002.pdf>

It shows a reasonable facsimile of a progressive change in perceived luminosity as it’s tide to gamma. If you drew a line straight in the middle and measured what you would think is middle gray mathematicly (128RGB) in the same spot on each bar, you’ld get a progressively different reading from each one even though it’s considered middle gray.

Which one is the correct look, the correct gamma number to represent your preview? Examine linear 1.0 and 2.2. PS’s numbers are based on a linear looking environment but it’s working space is 2.2 which must mean that 2.2 is a perfect corrective curve that acheives a linear look to the meaning of PS’s numbers.

Does your monitor have the linear look or the 2.2 look on screen when viewing a by the numbers grayramp? A lot of monitors and other RGB capture devices are not perfectly linear and the 2.2 gamma corrective curve downloaded to the graphics card doesn’t always yield a perfectly linear preview. A lot of RGB devices creat images in this not so perfect environment and when edited in PS’s linear state may get unexpected number readings of what you’ld think should be middle gray.

This is my own theory and understanding on this and I invite a correction if I’m wrong.
GA
George_Austin
Aug 10, 2004
Tim,

I see what you’re getting at, but I think the algoritm presumes linearity has been achieved (perfect system gamma correction)—giving 128 as mid gray. For imperfect linearization, the offset from midgray at 128 would be measureable with a colorimeter or spectrophotometer but, unless your eye has superhuman tonal discrimination or the deviation from linearity is inordinately large, you are not going to notice that 128 misses the mark. Nor is the system going to recognize 128 is not quite there—With no luminosity measurement, there is no basis for correcting 128 to another value. Then again, if the system has been calibrated and profiled vs an intensity-merasuring device, automated corrections are plausible.

George

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections