Integral Fast Fourier Color Constancy

Wei Wu, Yanlin Qian, Huaian Chen, Jun Dai, Yi Jin

Abstract

Traditional auto white balance (AWB) algorithms typically assume a single global illuminant source, which leads to color distortions in multi-illuminant scenes. While recent neural network-based methods have shown excellent accuracy in such scenarios, their high parameter count and computational demands limit their practicality for real-time video applications. The Fast Fourier Color Constancy (FFCC) algorithm was proposed for single-illuminant-source scenes, predicting a global illuminant source with high efficiency. However, it cannot be directly applied to multi-illuminant scenarios unless specifically modified. To address this, we propose Integral Fast Fourier Color Constancy (IFFCC), an extension of FFCC tailored for multi-illuminant scenes. IFFCC leverages the proposed integral UV histogram to accelerate histogram computations across all possible regions in Cartesian space and parallelizes Fourier-based convolution operations, resulting in a spatially-smooth illumination map. This approach enables high-accuracy, real-time AWB in multi-illuminant scenes. Extensive experiments show that IFFCC achieves accuracy that is on par with or surpasses that of pixel-level neural networks, while reducing the parameter count by over $400\times$ and processing speed by 20 - $100\times$ faster than network-based approaches.

What Problem Does This Paper Address?

Most Auto White Balance (AWB) algorithms assume a single, global light source. In reality, scenes are often "multi-illuminant"—think of a room lit by warm indoor lamps on one side and cool blue daylight from a window on the other.

While deep learning models (like U-Nets) can predict pixel-level illumination maps for these complex scenes, they are computationally expensive, memory-heavy, and often too slow for real-time video on mobile devices. Conversely, the existing Fast Fourier Color Constancy (FFCC) algorithm is incredibly efficient but was designed only for single-source scenes. The authors aim to bridge this gap: providing the spatial precision of deep learning with the blistering speed of Fourier-based methods.

Comparison between the original FFCC (top) and the proposed IFFCC (bottom) architectures.

Methods

The authors introduce IFFCC, which extends the FFCC framework into the spatial domain through three key innovations:

1. Integral UV Histogram

This is the core innovation. Inspired by the concept of "integral images" (used in classic face detection), the authors precompute a cumulative histogram in log-chromaticity (UV) space. Once this integral histogram is built, the histogram for any rectangular sub-region of the image can be calculated in constant time ($O(1)$) using just a few additions and subtractions ($h_p = h_1 - h_2 + h_3 - h_4$). This eliminates the need to re-scan pixels for every local window, drastically reducing computational overhead.

The integral UV histogram allows for constant-time calculation of local histograms for any image region.

2. Parallelized Local Prediction

Instead of one global prediction, IFFCC uses an overlapping grid. It extracts local histograms for these regions and runs Fourier-based convolutions in parallel to estimate local light sources.

3. Spatial Smoothing & Guided Filtering

To avoid "blocky" transitions between local estimates, the paper employs linear interpolation followed by Guided Filtering. This ensures the final illumination map is spatially smooth while still respecting the structural edges of the original image.

Datasets and Results

The researchers evaluated IFFCC on two major multi-illuminant benchmarks: the LSMI (Large Scale Multi-Illuminant) Dataset and the Shadow Dataset.

Key findings include:

  • Speed: IFFCC is 20–100× faster than state-of-the-art neural networks, achieving a runtime of approximately 5.8ms for a 64×48 preview image on a standard CPU.
  • Model Size: It reduces the parameter count by over 400× compared to pixel-level networks.
  • Accuracy: On the Shadow dataset, IFFCC achieved a mean angular error of 2.19, outperforming several deep learning models (like Bianco et al. and HypNet) and performing on par with the most advanced, heavier models.
  • Generalization: Unlike many CNN-based methods that overfit to specific camera sensors, IFFCC models chromaticity distributions directly, allowing it to generalize better across different camera hardware without extensive retraining.

Limitations and Future Work

While Guided Filtering helps preserve edges, the authors note that interpolation can occasionally blur local details in regions with extremely sharp light transitions. Future work could explore adaptive window sizes that change based on scene complexity or depth information. Additionally, the "integral histogram" approach could be applied to other Image Signal Processing (ISP) tasks beyond white balance.

Summary updated

Abstract

Traditional auto white balance (AWB) algorithms typically assume a single global illuminant source, which leads to color distortions in multi-illuminant scenes. While recent neural network-based methods have shown excellent accuracy in such scenarios, their high parameter count and computational demands limit their practicality for real-time video applications. The Fast Fourier Color Constancy (FFCC) algorithm was proposed for single-illuminant-source scenes, predicting a global illuminant source with high efficiency. However, it cannot be directly applied to multi-illuminant scenarios unless specifically modified. To address this, we propose Integral Fast Fourier Color Constancy (IFFCC), an extension of FFCC tailored for multi-illuminant scenes. IFFCC leverages the proposed integral UV histogram to accelerate histogram computations across all possible regions in Cartesian space and parallelizes Fourier-based convolution operations, resulting in a spatially-smooth illumination map. This approach enables high-accuracy, real-time AWB in multi-illuminant scenes. Extensive experiments show that IFFCC achieves accuracy that is on par with or surpasses that of pixel-level neural networks, while reducing the parameter count by over $400\times$ and processing speed by 20 - $100\times$ faster than network-based approaches.
BibTeX
@inproceedings{wu2025integral,
  author = {Wei Wu and Yanlin Qian and Huaian Chen and Jun Dai and Yi Jin},
  title = {{Integral Fast Fourier Color Constancy}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02460},
}
Figure