Entropic HDR
An algorithm that acts like the optimal filter for a camera, live in OBS today.
What it does
A camera spends the same 256 steps per channel on every scene, and most scenes waste them. A sky takes a broad band of blues and shows almost nothing in it, while shadowed rock, water and foliage are crowded into a few steps each. Entropic HDR measures where the picture actually carries information and respends its color, brightness and contrast there, the way an ideal filter tuned to this exact scene would. Faint color in shade and texture in mid-tones come apart, nothing is invented, and as the scene changes the correction follows it.
How it decides
Several times a second the filter reads a sparse lattice of points straight from the source, a tiny fraction of each frame. It breaks the lattice into small blocks and measures the Shannon entropy of the colors in each, damped near the noise floor so that grain does not count as detail. Each block's entropy is credited to the color family it came from, so the filter learns which colors in this scene sit in busy places.
Two adjustments follow from that measurement. The first is a decorrelation stretch, the technique NASA developed for satellite images and that DStretch made famous on faded rock art: red, green and blue usually rise and fall together, and gently widening the directions in which they differ makes small color distinctions visible. The second is the allocation. For each channel the filter builds a curve that climbs steeply through busy colors and slowly through empty ones, with a floor and a cap so that no range disappears and none takes over. Family entropy is weighted against family size, so a large flat area cannot win by area alone.
Both adjustments are baked into one color table, so the correction costs almost nothing per pixel and the analysis barely registers. The table moves toward each new estimate at a capped rate, so a cut or a camera pan never makes the picture flicker.
Settings
The defaults, decorrelation 0.09 and allocation 0.11, seem to be the right starting point for most scenes.
- Strength
- Mixes the whole effect with the source. Zero is an exact bypass.
- Decorrelation
- How far correlated color is pulled apart. This is the setting that can shift hue.
- Allocation
- How strongly the range follows entropy. This is the tone-mapping part.
- Adaptation and maximum change
- How quickly the table follows the scene, and how far it may move in a second.
- Lattice and updates
- The analysis width, from 32 to 256 points, and how many analyses run per second.
- Noise floor and maximum gain
- Keep sensor grain and nearly flat color from being amplified.
- Freeze
- Holds the current table, for a fixed look across a scene.
Chains
Chains adds two more stages after the color one. One brightens or darkens the whole picture; the other applies the same entropy rule to brightness alone, opening the tones where detail lives. They can run in any of six orders. Below, both are added at 0.15 after the color stage.
Download
Entropic HDR 1.0 is its own module for OBS Studio 32.2.1.
The source archive and checksums cover every package. Close OBS first. On Windows, extract the module folder into C:\ProgramData\obs-studio\plugins\; on macOS, place the .plugin bundle in ~/Library/Application Support/obs-studio/plugins/; on Linux, extract it into ~/.config/obs-studio/plugins/. Then add Entropic HDR to a source from its Filters window. Scenes saved with the earlier Realtime Vector FX filter open unchanged, and macOS may ask you to approve the module once.
References
- A. R. Gillespie, A. B. Kahle and R. E. Walker, “Color enhancement of highly correlated images. I. Decorrelation and HSI contrast stretches,” Remote Sensing of Environment 20 (1986).
- J. Harman, DStretch algorithm description.
- G. Ward Larson, H. Rushmeier and C. Piatko, “A visibility matching tone reproduction operator for high dynamic range scenes,” IEEE Transactions on Visualization and Computer Graphics 3 (1997).