Gamma correction
From Academic Kids

A gamma characteristic is a powerlaw 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 linearlyincreasing intensity (i.e., gammacorrected) scale and a scale with linearlyincreasing 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 encoding  V_{S} =  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 linearintensity 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 linearlyencoded scale, that has a nonlinearlyincreasing intensity, will show much more even steps in perceived brightness.
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.
GammaTest.png
Gamma test
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 V_{S} according to
 <math>I \sim V_{\rm S}{}^{\gamma}<math>
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 midgrey) 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 endtoend 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:
 <math>V_{\rm C} \sim V_{\rm S}{}^{(1/\gamma)}<math>
where V_{C} 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 V_{S} 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.
The gamma function, or its inverse, has a slope of infinity at zero. This leads to problems in converting from and to a gamma colorspace. For this reason most formally defined colorspaces such as sRGB will define a straightline segment near zero and add raising x+K (where K is a constant) to a power so the curve has continuous slope. This straight line does not represent what the CRT does, but does make the rest of the curve more closely match the effect of ambient light on the CRT. In such expressions the exponent is not the gamma, for instance the sRGB function uses a power of 2.4 in it, but more closely resembles the 2.2 gamma function.
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, in units of lux. Luminance, however, can mean several things:
 The apparent brightness of an object, taking into account the wavelengthdependent sensitivity of the human eye (in units of candela/meter^{2});
 The encoded video signal, i.e. similar to the signal voltage V_{S}.
Likewise, brightness can refer to the "amount of light" either before or after application of the gamma power law.
See also
External links
 Gamma tutorial (http://www.w3.org/TR/PNGGammaAppendix.html) (from the PNG specification)
 Frequently Asked Questions about Gamma (http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html)
 Measuring Gamma for Monitors (Gernot Hoffman) (http://www.fhoemden.de/~hoffmann/measgamma10022004.pdf)de:Gammakorrektur