The Gamma correction reference article from the English Wikipedia on 24-Jul-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

Gamma correction

Videos show Africa through the eyes of children

A gamma characteristic is a power-law relationship that approximates the relationship between the encoded luminance in a television system and the actual desired image brightness. With this nonlinear relationship, equal steps in encoded luminance correspond to subjectively approximately equal steps in brightness. Computer graphics systems that require a linear relationship between these quantities use gamma correction. The following illustration shows the difference between a scale with linearly-increasing intensity (i.e., gamma-corrected) scale and a scale with linearly-increasing encoded luminance signal.

Linear intensity I 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Linear encodingVS =   0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

On most displays (i.e., those with a standard gamma of 2.5), one can observe that the linear-intensity scale has a large jump in perceived brightness between the intensity values 0.0 and 0.1, while the steps at the higher end of the scale are hardly perceptible. The linearly-encoded scale, that has a nonlinearly-increasing intensity, will show much more even steps in perceived brightness.

These two squares should appear equally bright
On a monitor with an analogue input, the limited signal bandwidth may cause vertical black and white stripes to have a different brightness than horizontal black and white stripes. This problem will cause the squares on the image on the left to appear at different brightnesses.
Gamma test
your browser does not gamma correct images, then you can read your combined video card and monitor gamma on the image at the right, at the point where the stripes match in brightness.

A cathode ray tube (CRT), for example, converts a video signal to light in a nonlinear way, because the electron gun it contains is a nonlinear device. The light intensity I is related to the source voltage VS according to

where γ is the Greek letter gamma. For a CRT, γ is about 2.5. By coincidence, this results in the perceptually homogeneous scale as shown in the diagram on the top of this page.

For simplicity, consider the example of a monochrome CRT. In this case, when a video signal of 0.5 (representing mid-grey) is fed to the display, the intensity or brightness is about 0.21 (resulting in a dark grey). Pure black (0.0) and pure white (1.0) are the only shades that are unaffected by gamma.

To compensate for this effect, the inverse transfer function (gamma correction) is sometimes applied to the video signal so that the end-to-end response is linear. In other words, the transmitted signal is deliberately distorted so that, after it has been distorted again by the display device, the viewer sees the correct brightness. The inverse of the function above is:

where '\'VC is the corrected voltage and V''S is the source voltage (e.g. from a camera or VCR). In our CRT example 1/γ is 1/2.5 or 0.4.

A colour CRT receives three video signals (red, green and blue) and in general each colour has its own value of gamma, denoted γR, γG or γB. However, in simple display systems, a single value of γ is used for all three colours.

Other display devices have different values of gammas: for example, a Game Boy Advance display has a gamma between 3 and 4 depending on lighting conditions. In LCD displays such as those on laptop computers, the relation between the signal voltage VS and the intensity I is very nonlinear and cannot be described with gamma value. However, such displays apply a correction onto the signal voltage in order to approximately get a standard γ=2.5 behaviour. In NTSC television recording, γ is 2.2.

Terminology

The names of the various quantities are somewhat confusing. The term Intensity refers strictly to the amount of light energy that is emitted per unit of time and per unit of surface. Luminance, however, can mean several things:

  1. The intensity, corrected for the wavelength-dependent sensitivity of the human eye (in units of lux);
  2. The encoded video signal, i.e. similar to the signal voltage VS.
Likewise, brightness can refer to the "amount of light" either before or after application of the gamma power law.

External links

For a tutorial on gamma characteristics in computer graphics, see http://www.w3.org/TR/PNG-GammaAppendix.html .

A more in-depth explanation: http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html