Gamma and Display Values
The restored picture looks too dark on one display.
Gamma and Display Values explained visually
The restored picture looks too dark on one display. English captions are optional and start off. The complete transcript follows the written lesson.
What you will learn
The restored picture looks too dark on one display.
A practical question
A middle-gray number on the screen doesn't necessarily mean half as much light as white. That can surprise us when we try to brighten a digitized photograph. Many images store display-encoded values using a nonlinear relationship to light. A simple arithmetic operation on those stored numbers may therefore behave differently from the same operation on linear-light measurements.
The useful idea
This is where gamma and transfer functions come in. An encoding may give more numerical room to darker visible differences. To perform a calculation that assumes values proportional to physical light, first decode the data with the appropriate transfer function. After the calculation, encode it for display again. The exact rule depends on the file's color encoding; guessing the rule from appearance can cause errors.
Work through the example
Compare a midrange encoded value with an actual exposure at half the light. Don't assume the two values match. When you inspect the result on another display, also check the display settings before blaming the image-processing pipeline. Keep a record of whether each step used sensor values, linear values, or display values.
Limits and next step
For our archive, this distinction helps us make repeatable adjustments without confusing a viewing code with a physical measurement. Next, we'll display a high-bit-depth scan without throwing away its original range.
Worked example
Compare a middle encoded value with half the physical light level rather than assuming they are equal.
Quick check: test your understanding
Try it yourself: In the situation described above, explain the method and one reason its output might be misleading.
Check the reasoning
Gamma encoding changes the relationship between stored display values and light intensity. Linear-light calculations and display-encoded values require different handling.
What is the main idea behind gamma and display values?
Gamma encoding changes the relationship between stored display values and light intensity.
How is it used in the example?
Compare a middle encoded value with half the physical light level rather than assuming they are equal.
What limitation should be checked?
Linear-light calculations and display-encoded values require different handling.
Further reading
Digital Image Processing, 4th edition — Rafael C. Gonzalez and Richard E. Woods.
Original ToolsInVision teaching examples. Editorial approach · Suggest a correction
Accessible referenceLesson 23 transcript205 words · Video transcript · Matches the published narration and captionsOpen transcript
A middle-gray number on the screen doesn't necessarily mean half as much light as white. That can surprise us when we try to brighten a digitized photograph. Many images store display-encoded values using a nonlinear relationship to light. A simple arithmetic operation on those stored numbers may therefore behave differently from the same operation on linear-light measurements.
This is where gamma and transfer functions come in. An encoding may give more numerical room to darker visible differences. To perform a calculation that assumes values proportional to physical light, first decode the data with the appropriate transfer function. After the calculation, encode it for display again. The exact rule depends on the file's color encoding; guessing the rule from appearance can cause errors.
Compare a midrange encoded value with an actual exposure at half the light. Don't assume the two values match. When you inspect the result on another display, also check the display settings before blaming the image-processing pipeline. Keep a record of whether each step used sensor values, linear values, or display values.
For our archive, this distinction helps us make repeatable adjustments without confusing a viewing code with a physical measurement. Next, we'll display a high-bit-depth scan without throwing away its original range.