How does gamma encoding preserve shadow detail if the display applies gamma again?
Asked 2/17/2021
6 views
2 answers
0
I’m trying to understand gamma encoding, shadow detail, and bit allocation.
My confusion is this: with a linear signal, more code values seem to be used for highlights, so fewer are available in the shadows. A camera or video system can apply an OETF/inverse gamma to redistribute code values so shadows get more tonal precision.
But when that gamma-encoded signal is shown on a monitor, the display chain applies the corresponding decoding/display gamma. Wouldn’t that just “undo” the redistribution and put us back where shadows have poor precision again?
In other words, after tonal values are encoded nonlinearly, do those code values still preserve the extra shadow precision after decoding for display, or is that benefit lost when the signal is converted back for viewing?
I’m also unsure whether I’m mixing up image encoding/decoding with gamma adjustments used for image editing.
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
5y ago
2 Answers
0
Generated from our catalog & community — verify before relying on it.
The key is that you’re mixing up two different things: encoding/decoding versus editing.
Gamma encoding is used to store/transmit image data more efficiently. It assigns more digital code values to darker tones, where human vision is more sensitive, and fewer to bright tones. That means shadow gradations are recorded with finer precision.
When the image is later decoded for display, the display pipeline reverses that encoding so the light output looks correct. But the precision is not lost. The code values were already allocated nonlinearly during storage, so shadows still benefited from finer quantization.
So yes, the encoding and decoding largely cancel in terms of overall tone mapping, but they do not cancel the advantage of having used the available bit depth more perceptually efficiently.
Also, gamma correction used for editing an image’s appearance is a separate issue from gamma used for image encoding (such as sRGB-style storage and display behavior). The first changes the look; the second is mainly about efficient representation and accurate reconstruction in the display chain.
Recommended products
UniqueBot
AI5y ago
0
You have to distinguish between several basic sources of gamma-transformation:
Gamma-compression to store digital images in a certain (non-linear) colorspace, such as sRGB.
Gamma-decompression to retrieve the actual linear value of light intensity from a gamma-compressed value.
Gamma-correction or adjustment to change the appearance of an image.
Basically ## 1 and 2 cancel each other out, are handled by your software and hardware, and as a beginner you need not be concerned about them. Nor need you worry about #3 jangling with #2, because they are totally independent. The technical operations of comporession and decompression are designed to match each other, their only purpose efficient storage of raster images. You can safely forget about them as a potential source of tonal distoriton and focus on the gamma-correction and other curves transformatios in your raster editor.
The simple answer to your question is that the gamma encoding and decoding are fixed, and match and cancel each other our, so that your own gamma-adjustments do stay there and are preserved, and you may test yourself by the following experiment:
- open an image in a raster editor,
- make a gamma adjustments using the Curves tool its analog,
- save the result in a different file,
- visually compare the original and ajusted files in an image viewer.
Originally by user112045. Source · Licensed CC BY-SA 4.0
user112045
2y ago
Your Answer
Related Questions
Does 8-bit pixel depth limit a raw image to 8 EV of dynamic range?
What’s the difference between Sony S-Log, Panasonic V-Log, and V-Log L?
What is gamma correction for on modern displays, and why are images stored in gamma-encoded spaces like sRGB?
How can I approximate a monochromatic wavelength on a calibrated sRGB monitor?
How many stops are there between middle gray and white, and how does RGB/gamma affect that?