Camera white balance tries to remove the color tint of the light source so that a white wall looks white under candlelight and under noon sun. From a single image this is fundamentally ambiguous: a red wall under white light and a white wall under red light produce the same pixel values. Video models get around the ambiguity by pooling evidence over many frames. That pooling has a cost when someone walks from a tungsten-lit room into daylight. The model's memory still holds the old light, so the image stays wrong-tinted for an unmeasured number of frames. The obvious fix is to reset the memory whenever the colors change sharply, but that runs into the same ambiguity at a coarser scale. If the camera pans onto a red wall, the frame's color statistics change as abruptly as they would under a new light, and a naive reset makes the error worse.
This proposal separates the two kinds of change using surfaces that stay in view between consecutive frames. When the light changes, every surface still visible from the previous frame shifts its color by the same per-channel multiplier. When the content changes, the old surfaces keep their colors and only new pixels differ. We fit that shared multiplier on motion-registered pixels that overlap between frames. The fit gives two things. First, it is a change detector that is largely unaffected by new content. Second, it is a correction for the illuminant that is available at the very next frame. The central claim is that white balance can keep the accuracy of temporal pooling while cutting the lag after a sudden light change to one or two frames, without falsely resetting when the scene content changes.
Where the Two Directions Meet
Work on adaptation latency breaks a system's delay after a shift into three parts: detecting the shift, waiting for feedback, and gathering enough post-shift data to update. Early Concept Drift Detection via Prediction Uncertainty reduces detection delay with an uncertainty index that moves before the error rate does, but that index needs true labels. Protected Test-Time Adaptation via Online Entropy Matching (POEM) detects shift without labels using a betting martingale, a running wager whose wealth grows only when the data stop looking like the reference distribution. POEM's statistic, however, is classification entropy, which has no counterpart in regressing a continuous illuminant. Diagnostic Runtime Monitoring with Martingales places martingales at several points in a pipeline to diagnose why a shift happened, and flags a brightness change without estimating any light. These papers supply our detection machinery. None of them faces a setting where the most obvious monitored signal, the color statistics of the frame, is confounded by an unobservable nuisance variable, here the scene reflectance.
Temporal color constancy has the reverse gap. Recurrent Color Constancy runs a ConvLSTM over the preceding five frames. A Benchmark for Temporal Color Constancy introduces TCC-Net and 600 raw viewfinder sequences, but scores only the final shot. Neither detects regime changes or measures how long recovery takes. Single-image methods such as Cross-Camera Convolutional Color Constancy (C5) adapt transductively to a sensor, which is a fixed property of the camera, not to a light that changes over time. White-Balance First, Adjust Later iterates twenty vision-language passes over a single still, which is far too slow for streaming. Time-Aware Auto White Balance in Mobile Photography uses the capture timestamp only as a lookup for sun position. None of this work measures adaptation latency, and none asks what a sharp color change actually means.
The physical idea we build on is the classical diagonal (von Kries) model underlying Gray-World and gamut methods (Generalized Gamut Mapping using Image Derivative Structures; Corrected-Moment Illuminant Estimation). In that model, a change of light acts on raw pixel values as one per-channel gain. We use the model on pairs of frames rather than to explain a single image. The between-frame version is much better conditioned. For a surface that stays in view, reflectance cancels out of the ratio of its colors across the two frames.
Core Mechanism
Let $I_t(p)$ be the raw RGB value at pixel $p$ in frame $t$. Let $W$ be a motion warp from frame $t-1$ to frame $t$, estimated from luminance gradients, which are nearly unaffected by chromatic change. Let $\Omega_t$ be the set of pixels that are well registered, unsaturated, and not newly revealed. We estimate a chromatic gain $g_t$ in log-chroma space (log of green/red and green/blue):
$$ \hat g_t = \arg\min_{g} \sum_{p \in \Omega_t} \rho\big(c(I_t(p)) - c(I_{t-1}(W^{-1}p)) - g\big), $$
where $c(\cdot)$ maps RGB to 2D log-chroma and $\rho$ is a robust loss. Working in log-chroma removes uniform exposure changes, so auto-exposure does not register as a light change. The robust loss lets locally changing content, such as a person entering the frame, act as outliers rather than bias the fit.
Under the diagonal model, the illuminant in log-chroma satisfies $\ell_t = \ell_{t-1} + g_t$. New content leaves $g_t \approx 0$ whenever enough old surfaces remain visible.
We turn the size of $\hat g_t$, relative to its fit residual, into a p-value. The p-value is calibrated on frame pairs where the illuminant is known to be constant. These p-values feed a betting martingale in the style of POEM. When the martingale fires, the system does not wait for a temporal model to relearn. It immediately moves the illuminant estimate by $\hat g_t$ and resets the temporal memory. When the martingale is quiet, a small filter fuses the chained relative estimate with an absolute single-frame estimate $a_t$ from C5 or FFCC:
$$ \hat\ell_t = (1-\kappa_t)(\hat\ell_{t-1} + \hat g_t) + \kappa_t\, a_t . $$
Here $\kappa_t$ is a gain set by the two estimates' uncertainties. It rises briefly after a detected change so that the absolute estimator re-anchors the chain, and falls during stable periods so that temporal pooling can suppress flicker. Chaining alone would drift over time. The absolute term prevents that, and the relative term provides the immediate response.
The design says in advance where it should fail. If a cut or a fast pan leaves too few overlapping pixels, $\Omega_t$ collapses and the method falls back to the absolute estimator. Under mixed lighting, the fit residuals will be spatially structured rather than scattered. We treat that structure as a diagnostic, not as something the method solves.
Research Program
The first deliverable is a streaming benchmark, because none exists. The TCC benchmark provides real viewfinder motion under one illuminant per sequence. Using raw-domain illuminant swapping, the augmentation CLCC uses to relight raw images, we impose known illuminant trajectories on these sequences. The trajectories include abrupt switches at random frames, slow ramps, and constant-light controls. We then add content confounders: real pans onto saturated surfaces, and splices of a different scene under the same light. This makes the key failure, a false reset on a content change, measurable. For real rather than synthetic changes, the SFU Gray Ball videos carry per-frame illuminant ground truth from the gray sphere in view and include real indoor–outdoor transitions. We mask the sphere and its surroundings for all methods so it cannot leak the answer.
The second deliverable is the estimator with its detector, run at viewfinder rates. We aim for a budget comparable to TCC-Net's reported 6 ms per frame. The warp and the robust fit are cheap relative to a CNN.
The third deliverable is an analysis of when the between-frame fit is identifiable. It asks how much overlap and how much chromatic diversity among the overlapping surfaces are needed for $\hat g_t$ to beat the absolute estimator. This connects to the sample-sufficiency question posed by When to Retrain after Drift. That work's distance-based test fails on raw pixels. Our overlap statistic is a low-dimensional sufficiency signal suited to images.
Baselines
The naive reference point runs a strong single-frame estimator (C5) independently on each frame. It has essentially zero adaptation lag by construction, but it has no temporal pooling and so should flicker more and be less accurate during stable periods. C5 reports 1.77° mean angular error on NUS-8 (Cross-Camera Convolutional Color Constancy). We retrain it on the same TCC training split used by every method.
The strongest existing temporal method is TCC-Net, which reports 1.99° mean and 1.21° median angular error on the final shot of the TCC benchmark (A Benchmark for Temporal Color Constancy). On real video, RCC-Net reports 2.9° median angular error on SFU Gray Ball (Recurrent Color Constancy). We found no reported result on Lacuna for the adaptation latency, or the post-switch error, of any white-balance method. Establishing these numbers is part of the contribution. TCC-Net is run in two versions. The first is the published model applied in sliding windows. The second is retrained on our switching augmentations with the same data and the same hyperparameter-search budget as our model. This is the fairest version of the competitor, because it lets a recurrent network learn to reset itself.
We also include a POEM-style change detector that runs a betting martingale on the frame's global log-chroma histogram and resets an exponential moving average when it fires. This matches our system in every respect except that its monitored signal is confounded by content.
The key ablation replaces our overlap-constrained gain with that global histogram shift inside our own filter. It isolates whether restricting the fit to persistent surfaces is what matters.
We count ourselves as beating the field if three results hold together. First, median frames-to-recover after an abrupt switch must be substantially lower than retrained TCC-Net's. Second, steady-state error must be no worse than TCC-Net's. Third, the false-reset rate on content-only confounders must be well below the histogram-martingale detector's.
Why not just…?
Why not just run a good single-frame estimator on every frame? It has no lag, so it is the real threat on latency. Its weakness is steady-state accuracy and flicker. TCC-Net's reported margin over single-frame and earlier temporal methods on the TCC final shot suggests pooling helps. The experiment settles this directly. If per-frame C5 matches our stable-period error and flicker, temporal pooling is not worth having, and we will report that.
Why not just reset the temporal model whenever colors jump? Because a pan onto a red wall is a color jump too. The histogram-martingale baseline is exactly this idea done carefully, and the content-confounder sequences measure how often it resets wrongly. If it rarely does, then the overlap constraint adds little and the ablation will show it.
Why not just train TCC-Net on sequences with light switches and let it learn to reset? This is the most serious alternative, and we run it as a baseline. A recurrent network sees each frame's statistics but has no explicit way to know which pixels are the same surface across frames. Registration is exactly the information that separates light changes from content changes. If retrained TCC-Net nonetheless matches our latency and false-reset rate, the honest conclusion is that the benchmark, not the mechanism, is the contribution. We would then test feeding $\hat g_t$ to the network as an extra input.
Why not just threshold the gain instead of using a martingale? A tuned threshold may perform just as well on average. The martingale offers a false-alarm rate that is controlled under the no-change calibration. We compare against the best threshold selected on validation data and report both false-reset rate and delay.
Decisive Checks
We measure per-frame angular error, median frames-to-recover (the frames until error returns within 1° of its pre-switch level), false-reset rate on content-only confounders, frame-to-frame flicker of the estimate under constant light, and milliseconds per frame. Everything is reported separately for synthetic TCC trajectories and real SFU Gray Ball transitions.
The single most informative plot is error versus frames since switch, overlaid for all methods, alongside the same plot for content-only cuts. Our method should drop within one or two frames after a light switch and stay flat after a content cut. The histogram detector should spike after content cuts, and TCC-Net should decay slowly after light switches.
A second check correlates the size of the overlap set with the error of $\hat g_t$ to confirm the predicted failure regime. The last check asks whether spatially structured residuals flag the mixed-illuminant SFU clips.
References
- Early Concept Drift Detection via Prediction Uncertainty
- Protected Test-Time Adaptation via Online Entropy Matching: A Betting Approach
- Diagnostic Runtime Monitoring with Martingales
- Recurrent Color Constancy
- A Benchmark for Temporal Color Constancy
- Cross-Camera Convolutional Color Constancy
- White-Balance First, Adjust Later: Cross-Camera Color Constancy via Vision-Language Evaluation
- Time-Aware Auto White Balance in Mobile Photography
- Generalized Gamut Mapping using Image Derivative Structures for Color Constancy
- Corrected-Moment Illuminant Estimation
- CLCC: Contrastive Learning for Color Constancy
- When to Retrain after Drift: A Data-Only Test of Post-Drift Data Size Sufficiency