Full glossary

Gamma correction

Graphic depicting perceived linear brightness vs. physical linear brightness

What is gamma correction?

Gamma correction is a nonlinear operation for encoding and decoding luminance in video or digital images. It's used to properly display brightness on computer (and other digital display) screens. Gamma correction includes gamma encoding and gamma decoding. Gamma encoding optimizes bits used when encoding video or images, by taking advantage of how humans see luma (brightness) and chroma (color). Gamma decoding is about how to correct stored video and images to represent tones appropriately on your display screen of choice.

How the camera sees vs how you see

When a camera records video or a digital image, it's more sensitive to the light coming in than humans are. If twice as many photons hit the camera sensor as usual, the camera registers twice as many photons. It has a linear relationship to the brightness coming in. However humans do not. When we see, if our eyes received twice as many photons, we'd perceive a much smaller increase in brightness. Our eyes catch more detail when it's less bright. The reason our eyes are set up this way, is it allows us to see a broader range of brightness. Notice that cameras, while they can capture more brightness detail, often have to have the aperature adjusted so images aren't blasted out or too dark. We don't have this option. Without our non-linear way of detecting brightness, we'd routinely be overwhelmed by the range of brightnesses around us.

While it's great that cameras capture more detail regarding brightness, because the human eye isn't very good at seeing it, we don't need to save or transmit all of it when we store or transmit video or a digital image. Cameras also over-emphasize brightness and under-emphasize darkness. The end result is that without correction, too many bits are devoted to brightness we can't see, and not enough to darkness and shadows we can see. Gamma correction accounts for this by redistributing tones to match how we see them. Interestingly, not only can we not see all the information captured by a camera, but neither can most video screens or photographic paper. Gamma correction requires careful thinking to decide what to keep in a representation and what to remove. Keep in mind that different displays may interpret information differently, and gamma correction needs to account for this as well.