Color Space Math

Inverse Technical Mapping: Dynamic Range Recovery

Deconstruct the mathematical equations of opto-electronic transfer functions to perform dynamic range recovery and degraded image recovery. Learn how to execute a color space reverse transform and restore dynamic range look to standard images.

Decompressing the Display-Referred OETF (Opto-Electronic Transfer Function)

A camera's OETF defines how incoming light at the sensor is encoded into digital pixel numbers. When standard images are exported, they are formatted for standard Rec.709 displays, which compress the original highlights and crush shadow levels to fit the display limits. Inverse Technical Mapping is the system of reversing these steps. By decompressing the display-referred OETF, we expand the contrast range, transforming restricted display signals back into linear scene values that match the physical light of the original scene.

Mathematical Formulations for Highlights and Shoulder Roll-Off

Highlight recovery is the most mathematically complex phase of inverse mapping. Display curves use a "shoulder" (a soft compression of bright highlights) to prevent harsh clipping. To reverse this, we apply logarithmic functions or high-order polynomial curves. These equations extend the highlights, mapping the compressed values back onto an emulated high-dynamic-range scale. While it cannot recreate details in areas of total white clipping, it ensures that soft highlight transitions roll off naturally without forming gray rings.

Maintaining Color Gamut Consistency During Reconstruction

Expanding the luminance range of an image without altering the chromaticity causes severe color distortion, often shifting skin tones toward orange or yellow. To prevent this, our inverse mapping equations isolate luminance from chrominance. We convert the RGB coordinates into a decoupled color space (like ICtCp or YCbCr), expand the luminance channel (Y) mathematically, and then scale the color channels (Cb/Cr) proportionally. Re-translating this back to RGB maintains perfect color consistency.