Fast Color Constancy with Patch-wise Bright Pixels

Yiyao Shi, Jian Wang, Xiangyang XuearXiv 2019

Abstract

The researchers propose Patch-wise Bright Pixels (PBP), a learning-free color constancy algorithm that estimates a scene's illuminant in under 2 milliseconds for a 1080p image. By intelligently sampling bright pixels across spatial patches rather than globally, PBP achieves state-of-the-art accuracy among learning-free methods and even rivals complex learning-based models, all while being hundreds of times faster.

Introduction

Color constancy is the ability of a vision system to perceive the "true" colors of objects regardless of the lighting conditions. In computer vision, this involves estimating the color of the light source (the illuminant) and "undoing" its cast. Current solutions are typically split into two categories: learning-based methods, which are accurate but computationally heavy and sensor-specific, and learning-free methods, which are fast but often less robust. A common learning-free approach, the "Bright Pixels" (BP) method, often fails when large, colored objects dominate the brightest areas of an image. The PBP method aims to bridge this gap by providing a solution that is both fast and robust.

Methodology

The PBP algorithm follows a streamlined three-step pipeline designed for speed and accuracy:

  1. Smart Downsampling: The authors demonstrate that spatial resolution is less critical than global color distribution for learning-free methods. Equidistant downsampling is used to reduce pixel count significantly without sacrificing accuracy.
  2. Patch-wise Selection: To avoid being biased by single large colored objects, the image is divided into a grid of patches. A "modified brightness" is calculated for each patch, and a proportional number of bright pixels are selected from each. This ensures spatial dispersion of sampled pixels, making the estimate more robust to local "distractors."
  3. Illuminant Estimation: Standard statistical methods, such as Gray World (GW) or Shades of Gray (SoG), are applied to the selected pixels to calculate the final illuminant vector.
Visual demonstration of the PBP algorithm's pixel selection and color correction.

Key Insights: The Efficiency of Downsampling

A central finding of this research is that downsampling is often a "free lunch" for color constancy. As shown in Figure 3, increasing the downsampling interval exponentially decreases computation time while the mean and median angular errors remain remarkably stable across various algorithms. In some cases, like the "White Patch" method, downsampling even improves accuracy by filtering out single saturated pixels that might otherwise mislead the estimator.

Impact of downsampling on computation time and angular error across various color constancy methods.

Experimental Results

The authors evaluated PBP on the NUS 8-Camera and Gehler-Shi datasets. Key results include:

  • Speed: Processing a 1080p image takes less than 2ms, making it 40x faster than traditional Gray World and hundreds of times faster than high-performance learning-free methods like Gray Index (GI).
  • Accuracy: PBP outperformed all other learning-free methods on the NUS 8-Camera dataset and surpassed several well-known learning-based models in median angular error.
  • Hardware Compatibility: Its lightweight nature makes it ideal for real-time applications on mobile hardware, including under-display camera systems where the screen acts as a colored filter.

Conclusion and Future Work

While PBP is highly effective, it can struggle in scenes lacking neutral surfaces or in extreme lighting conditions where the brightest pixels are noisy. Future work involves applying PBP to the challenge of under-display cameras to dynamically remove the screen's color cast in real-time video.

Summary updated

BibTeX
@misc{shi2019fast,
  author = {Yiyao Shi and Jian Wang and Xiangyang Xue},
  title = {{Fast Color Constancy with Patch-wise Bright Pixels}},
  year = {2019},
  eprint = {1911.07177},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.07177},
}
Figure