05 · Light

Lift the veil

Old-film blacks never reach true black, a hazy gray veil sits over the shadows and makes everything look washed out. We measure it and lift it, intelligently, per shot.

Fixes: milky blacks, flat tone Technique: measured black-point lift light.py

The important part is the measurement. We build a brightness histogram and read the value at the 0.5th percentile, "how dark are the darkest 0.5% of pixels, really?" That value is this shot's black floor. Then we map [floor → white] onto [0 → white], anchoring the blacks at zero. A hazy shot gets a big lift; a genuinely dark shot reads near zero and barely moves, so we never crush it.

The histogram floats off zero, that gap is the veil. The marker is the measured floor; the lift slides it to black. Switch to "full frame" and the black scan-border spike drags the floor to 0, so nothing lifts, which is why we measure a centre crop.
Two guardrails, both found tuning this film: old scans have pure-black borders, include them and the floor reads 0 and nothing ever lifts, so we crop the outer 15% before measuring. And we apply only a fraction of the measured floor (black_strength 0.55) capped at black_max 0.15: the full auto-lift looked harsh; 55% of it was the sweet spot.

The lift uses colorlevels applied identically to all channels, so colour balance is preserved, this stage only touches tone. It runs after denoise (so lifting shadows doesn't amplify grain) and before colour (so white balance lands on corrected tone).

Yossi's dials: auto: true, black_pct: 0.5, black_strength: 0.55, black_max: 0.15, contrast: 0.08.