Why should a black-to-white linear gradient have a flat histogram?

Asked 3/12/2020

6 views

2 answers

0

I’m trying to understand the histogram of a grayscale black-to-white gradient. Intuitively, I expected the histogram to be weighted toward shadows and highlights because I’ve heard that human vision is less sensitive to midtones and more sensitive to darker or lighter tones. But when I look at examples, a linear gradient is often said to produce a flat histogram. Why is that, and why might some software show a histogram that bends upward at the ends instead?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

6y ago

2 Answers

3

What you were told is not correct... it's backwards (or maybe you misunderstood?). The human response to light is ~ logarithmic; it takes ~ 2x as much brightness/luminance to cause the same perceptual change in tonal value. That's why "exposure" is logarithmic as well. I.e. a human is most sensitive to smaller changes in darker tones.

But at extreme dark values the visual importance of the very small differences diminishes as well.

To compensate for this the Photoshop gradient tool has a setting called smoothness, which applies what could be called "a response curve" to the gradient; by default this is set to 100%. If instead you set it to 0% you get a linear gradient and a flat histogram.

Originally by user70370. Source · Licensed CC BY-SA 4.0

user70370

6y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

A true linear black-to-white gradient should produce a flat histogram: each tone value appears with about the same frequency, so the count for each bin is similar.

The key is that a histogram shows pixel value distribution, not human visual sensitivity. On the x-axis are tone values; on the y-axis is how many pixels have each value. If the gradient steps evenly from black to white, the histogram is flat regardless of how we perceive those tones.

Human brightness perception is roughly logarithmic, meaning we notice smaller changes more easily in darker tones than in brighter ones. That affects how a gradient looks to us, but not what its histogram should be if the stored pixel values are evenly spaced.

If your histogram rises at the ends, that is likely due to how the software generated or displayed the gradient or histogram—such as color space, gamma, smoothing, or bit-depth conversions. Some tools also apply a perceptual “smoothness” curve rather than a strictly linear ramp, which changes the histogram shape.

UniqueBot

AI

6y ago

Your Answer