Restore distant contrast
Atmospheric haze adds pale light and reduces contrast, especially in distant parts of a scene. The dark-channel estimate measures low RGB values in each pixel neighborhood and uses them to approximate transmission through the haze: hazy regions have no truly dark pixels, and that absence maps the veil.
Strength controls how much of that estimate is removed. Haze depth changes the assumed transmission loss, while Contrast expands the recovered tonal range. Warmth corrects the blue or gray cast that can remain after removal.
Why dark pixels reveal haze
In a clear scene, almost every neighborhood contains something dark: a shadow, a doorway, dense foliage. Haze lifts those minimums toward the sky color in proportion to distance. Measuring how far the darkest local values have risen therefore gives a per-region haze map without needing depth data, which is the idea behind dark-channel prior dehazing from computational photography research.
The same logic explains the failure cases: snow, white walls, and bright sand have no dark pixels even when clear, so the estimate can overcorrect them.
Example: hazy mountain ridge
For a landscape where far ridges fade into gray, set Strength near 60 and leave Haze depth at its default. The farthest ridge should regain an edge while the foreground barely changes. Add Contrast in small steps, around 20, and finish with Warmth near 10 to counter the cool shift. If the sky starts banding, back off Contrast first; the gradient there is the most fragile part of the frame.
Dehaze limits
Fog, smoke, flare, and an overexposed sky can look similar but do not contain the same information. Heavy settings may reveal JPEG blocks or sensor noise without revealing real scene detail. Stop when distant edges become readable, before shadows turn brittle or colors clip.