ArticleslgStudy

science

Gamma correction

Gamma correction is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gamma correction rather than just read about it. In short: Gamma correction or gamma is a nonlinear operation used to encode and decode luminance in video or images. Gamma correction is, in the simplest cases, defined by the following power-law expression: Vout=AVinγ, where the non-negative real input value Vin is raised to the power γ and multiplied by the constant A to get the output value Vout.

Gamma correction — main illustration
Gamma correction — illustration

Key takeaways

  • Gamma correction belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gamma correction to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gamma correction from memory before moving on to harder problems.

Reference excerpt

Gamma correction or gamma is a nonlinear operation used to encode and decode luminance in video or images. Gamma correction is, in the simplest cases, defined by the following power-law expression:

Vout=AVinγ, where the non-negative real input value Vin is raised to the power γ and multiplied by the constant A to get the output value Vout. In the common case of A = 1, inputs and outputs are typically in the range 0–1. A gamma value γ<1 is sometimes called an encoding gamma, and the process of encoding with this compressive power-law nonlinearity is called gamma compression; conversely, a gamma value γ>1 is called a decoding gamma, and the application of the expansive power-law nonlinearity is called gamma expansion.

Explanation Gamma encoding of images is used to optimize the usage of bits when encoding an image, or bandwidth used to transport an image, by taking advantage of the non-linear manner in which humans perceive light and color. The human perception of brightness (lightness), under common illumination conditions (neither pitch black nor blindingly bright), follows an approximate power function (which has no relation to the gamma function), with greater sensitivity to relative differences between darker tones than between lighter tones, consistent with the Stevens' power law for brightness perception. If images are not gamma-encoded, they allocate too many bits or too much bandwidth to highlights that humans cannot differentiate, and too few bits or too little bandwidth to shadow values that humans are sensitive to and would require more bits/bandwidth to maintain the same visual quality. Gamma encoding of floating-point images is not required (and may be counterproductive), because the floating-point format already provides a piecewise linear approximation of a logarithmic curve. Although gamma encoding was developed originally to compensate for the brightness characteristics of cathode-ray tube (CRT) displays, that is not its main purpose or advantage in modern systems. In CRT displays, the light intensity varies nonlinearly with the electron-gun voltage. Altering the input signal by gamma compression can cancel this nonlinearity, such that the output picture has the intended luminance. However, the gamma characteristics of the display device do not play a factor in the gamma encoding of images and video. They need gamma encoding to maximize the visual quality of the signal, regardless of the gamma characteristics of the display device. The similarity of CRT physics to the inverse of gamma encoding needed for video transmission was a combination of coincidence and engineering, which simplified the electronics in early television sets. Photographic film has a much greater ability to record fine differences in shade than can be reproduced on printed paper. Similarly, most video screens are not capable of displaying the range of brightnesses (dynamic range) that can be captured by typical electronic cameras. For this reason, considerable artistic effort is invested in choosing the reduced form in which the original image should be presented. The gamma correction, or contrast selection, is part of the photographic repertoire used to adjust the reproduced image. Analogously, digital cameras record light using electronic sensors that usually respond linearly. In the process of rendering linear raw data to conventional RGB data (e.g. for storage into JPEG image format), color space transformations and rendering transformations will be performed. In particular, almost all standard RGB color spaces and file formats use a non-linear encoding (a gamma compression) of the intended intensities of the primary colors of the photographic reproduction. In addition, the intended reproduction is almost always nonlinearly related to the measured scene intensities, via a tone reproduction nonlinearity.

Generalized gamma The concept of gamma can be applied to any nonlinear relationship. For the power-law relationship Vout=Vinγ, the curve on a log–log plot is a straight line, with slope everywhere equal to gamma (slope is represented here by the derivative operator):

γ=dlog⁡(Vout)dlog⁡(Vin). That is, gamma can be visualized as the slope of the input–output curve when plotted on logarithmic axes. For a power-law curve, this slope is constant, but the idea can be extended to any type of curve, in which case gamma (strictly speaking, "point gamma") is defined as the slope of the curve in any particular region.

Film photography

When a photographic film is exposed to light, the result of the exposure can be represented on a graph showing log of exposure on the horizontal axis, and density, or negative log of transmittance, on the vertical axis. For a given film formulation and processing method, this curve is its characteristic or Hurter–Driffield curve. Since both axes use logarithmic units, the slope of the linear section of the curve is called the gamma of the film. Negative film typically has a gamma less than 1; positive film (slide film, reversal film) typically has a gamma with absolute value greater than 1.

Standard gammas

Analog TV Output to CRT-based television receivers and monitors does not usually require further gamma correction. The standard video signals that are transmitted or stored in image files incorporate gamma compression matching the gamma expansion of the CRT (although it is not the exact inverse). For television signals, gamma values are fixed and defined by the analog video standards. CCIR System M, associated with NTSC color, use gamma 2.2; systems B/G, H, I, D/K, K1, L, M, and N, associated with PAL or SECAM color use gamma 2.8.

Computer displays

In most computer display systems, images are encoded with a gamma of about 0.45 and decoded with the reciprocal gamma of 2.2. A notable exception, until the release of Mac OS X 10.6 (Snow Leopard) in September 2009, were Macintosh computers, which encoded with a gamma of 0.55 and decoded with a gamma of 1.8. In any case, binary data in still image files (such as JPEG) are explicitly encoded (that is, they carry gamma-encoded values, not linear intensities), as are motion picture files (such as MPEG). The system can optionally further manage both cases, through color management, if a better match to the output device gamma is required.

… excerpt ends here. Continue reading the full article.

Illustrations

Gamma correction: Characteristic curve of a photographic film. The slope of its linear section is called the gamma of the film.
Characteristic curve of a photographic film. The slope of its linear section is called the gamma of the film.
Gamma correction: Plot of the sRGB standard gamma-expansion nonlinearity in red, and its local gamma value (slope in log–log space) in blue. The local gamma rises from 1 to about 2.2.
Plot of the sRGB standard gamma-expansion nonlinearity in red, and its local gamma value (slope in log–log space) in blue. The local gamma rises from 1 to about 2.2.
Gamma correction: Gamma correction test image. Only valid at browser zoom = 100%.
Gamma correction test image. Only valid at browser zoom = 100%.

Worked examples

Example 1 — a first encounter with Gamma correction

Start with the simplest possible case. Write down what Gamma correction claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gamma correction before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gamma correction ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gamma correction

In research
Gamma correction appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gamma correction in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gamma correction is common in secondary-school and first-year university syllabi. It links to neighbouring topics Display technology, Photometry, Power laws, so understanding it makes those chapters shorter.
In everyday life
Look for Gamma correction outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gamma correction” →

How to study Gamma correction in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gamma correction means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gamma correction out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gamma correction in simple terms?

Gamma correction or gamma is a nonlinear operation used to encode and decode luminance in video or images. Gamma correction is, in the simplest cases, defined by the following power-law expression: Vout=AVinγ, where the non-negative real input value Vin is raised to the power γ and multiplied by th…

Why does Gamma correction matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gamma correction?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gamma correction.

Tags

  • Display technology
  • Photometry
  • Power laws
  • Science of photography

Keep exploring