Light Transportation

Gamma Correction

The Problem: Human Vision vs. Linear Light

  1. Human Vision: Our eyes are more sensitive to changes in darker tones than in brighter tones. This means we can distinguish between different shades of gray more easily in dark areas than in light areas.
  1. Linear Light Representation: If we were to store light intensities in a purely linear way (e.g., in an HDR image), we'd be treating all changes in brightness equally. But since our eyes aren't equally sensitive to all brightness levels, storing light linearly would waste a lot of data on bright areas where we can't perceive much difference.

The Solution: Gamma Correction

  1. Non-Linear Encoding: Gamma correction is a way to "bend" the linear light curve so that it matches more closely with how our eyes perceive light. Specifically, gamma correction compresses the bright parts of the image (where our eyes aren't as sensitive) and expands the dark parts (where we are more sensitive).
  1. Gamma Curve: Mathematically, this is done by applying a power function to the linear light values. For an image, each pixel's value \( V \) is adjusted using a gamma curve, typically of the form:
where is typically around 2.2. This makes dark areas more detailed and bright areas less detailed, matching our perception.

Intuitive Example:

  • Linear Light (No Gamma Correction): Imagine you're in a room with a dim light bulb. If the light gradually gets brighter, the first few steps will seem very noticeable to you. But as the bulb gets very bright, further increases in brightness won't make as much of a difference to your eyes, even though the actual light intensity is increasing linearly.
  • Gamma Correction: Gamma correction accounts for this by "stretching" the dark areas (where small changes are noticeable) and "compressing" the bright areas (where changes aren't as noticeable). The result is an image that looks more natural to our eyes when displayed on a screen.

Why Itā€™s Important

  • Efficient Use of Data: By applying gamma correction, we can store more information where it matters (in the dark areas) and less where it doesnā€™t (in the bright areas). This is especially important in formats like JPEG, where we're limited to 8 bits per channel.
  • Display Devices: Most monitors and TVs are designed to display gamma-corrected images, so the correction is crucial to ensure that images look right when displayed.

Summary

  • Without Gamma Correction: Images might look too dark or too bright because they donā€™t account for human visionā€™s non-linear sensitivity.
  • With Gamma Correction: Images are adjusted to match our eyes' sensitivity, making them look more natural and detailed where it matters most.
Ā