ASAAR <> wrote:
>On Sat, 29 Jul 2006 06:09:45 +0000 (UTC), Randy Berbaum wrote:
>
>> As I understand the terms Brightness is the adjustment of how intense
>> White is. This would be like dimming a light bulb. White would still be
>> white but the intensity of that white is higher. Gamma is more a measure
>> of how intense the colors are in relation to eachother.
Yes.
>> . . .
>> If you have experience with older TVs you may have had to play with the
>> controls and had to adjust the "color" knob. That is Gamma.
The "color" knob on an old TV was saturation, not gamma. It
adjusted gain for the chroma signal while the luminance level
remained constant. The "contrast" control adjusted both
luminance and chroma levels at the same time.
> I don't know about that. Based on very limited experience with
>only one program, Gamma seems more of a complex brightness control
>that doesn't affect the color relationship.
True.
>if when the Brightness is increased, each intensity level in the
>image is increased by the same absolute amount, resulting in both
>light and dark areas becoming overly bright with small increases of
>the slider's position. When the Gamma value is increased, it's as
>if the intensity level of each pixel is increased by an amount
>that's a function of the pixel's intensity level, irrespective of
>its color. So by increasing the Gamma, overall brightness can be
>increased, but the darker shadow areas, while brightening somewhat,
>don't brighten nearly as rapidly.
Gamma applies an exponential adjustment to levels.
One problem is that you'll see various different scales for
"gamma", and it is hard to relate them to each other. The
monitor screen is supposedly adjusted for "gamma 2.2". In some
programs whatever "normal" is, is 1 (or maybe 0). And in some
programs "normal" is 0.45 instead. Heres the reason:
gamma_adjusted_value = l ^ (1 / g)
Where l is the uncorrected value, and g is gamma (where the
"normal" value for a monitor screen is 2.2 (or perhaps 1.8 for
an Apple system).
When 1 (or 0) is "normal", that is just normalized to provide a
default that is an unknown value, but where you can scale
increases or decreases by the number.
The "(1 / g)" part of the expression just happens to be 0.454545
if g is equal to 2.2, hence when you see a "normal" value of
0.45, the number is actually the exponent part of the
expression.
How does it work? Well consider an image that has been
converted to digital, where we have a "value" for each intensity
level. In an "uncorrected" or "linear" file it takes 12 bits to
provide a useful range of at least 8 fstops. When "gamma
correction" is applied (the "l" in the above formula is
transformed to the "gamma_adjusted_value"), an 8 bit value can be
used to provide 8 fstops of range.
Here is a chart, that shows the values.
Levels Normalized Pixel Levels
Fstop | 12 Bit Levels 8 Bit 8 Bit JPEG
Range | Linear Linear Gam.Cor. Gam.Cor. Gamma Corr
------|---------------------------------------------------------
1 | 2048 1.0 1.0 255 69
2 | 1024 0.5 0.72974 186 50
3 | 512 0.25 0.53252 136 37
4 | 256 0.125 0.38860 99 27
5 | 128 0.0625 0.28358 72 20
6 | 64 0.03125 0.20694 53 14
7 | 32 0.015625 0.15101 38 10
8 | 16 0.007812 0.11020 28 8
9 | 8 0.003906 0.08042 21 6
10 | 4 0.001953 0.05868 15 4
11 | 2 0.0009765 0.04282 11 3
12 | 1 0.0004883 0.03125 8 2
13 | 0.0002415 0.02269 6 2
"Levels" is the number of values within that f/stop range. I
am arbitrarily designating 8 levels as the least number that is
useful. By that definition the dynamic range of a 12 bit linear
data set is 9 fstops, while a 2.2 gamma corrected data set is
8 fstops.
Note that graphing the "Normalized Pixel Levels" would show what
"gamma" changes, but you can sort of see it just from the data.
At the brightest level, normalized 1.0, gamma *makes* *no*
*difference*.
But the brightness level falls off more slowly as the gamma
correction is increased. With 2.2 gamma (or an exponent of
0.45) the brightest level in the actual scene is 1.0 and a level
two fstops lower would be 0.25, but the corrected levels are 1.0
and 0.53 (which means tones that were 2 fstops down (1/4 as
bright) are going to be displayed at 1 fstop down (1/2 as
bright). The same basic relationship (two fstop drop in actual
brightness is displayed at 1 fstop lower) is true for the entire
range. (It would actually be exactly 2:1 if the gamma was 2.0,
but with a 2.2 gamma it is close.)
Gamma changes the contrast! Which is confusing, because most
monitors have a control labeled "contrast", but it actually
controls "brightness", not contrast. The control labeled
"brightness" actually controls the black level, hence it takes
adjusting both of them to control actual contrast. That is
a holdover from the days of analog monitors. With digital
monitors it is just as easy to actually have an individual
control for brightness, contrast, and black level, but changing
the labels would confuse everyone.
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)