Bayesian Color Constancy with Non-Gaussian Models

Charles R. Rosenberg, Thomas P. Minka, Alok LadsariyaNeurIPS 2003

Introduction

Color constancy is the ability of a vision system—whether human or machine—to perceive the "true" color of an object regardless of the light source illuminating it. For example, a white piece of paper looks white to us whether it is under a blue sky or a yellow lightbulb. For computers, this is an ill-posed problem: the sensor only records the product of the light and the surface reflectance, meaning infinitely many combinations of light and surface could produce the exact same pixel value.

Historically, researchers have tackled this using two main approaches: constraint-based methods (like Gamut Mapping), which assume certain colors cannot exist under specific lights, and statistical methods (like Gray-World), which assume the average color in a scene is gray. While statistical methods offer more flexibility, they have traditionally relied on oversimplified Gaussian models that fail to capture the messy reality of natural scenes. Consequently, constraint-based methods have often outperformed statistical ones on real-world images.

This paper introduces a Bayesian framework for color constancy that moves beyond simple Gaussian assumptions by utilizing non-parametric, non-Gaussian models of surface reflectance. By learning these complex distributions from uncalibrated web images through bootstrapping, the authors developed an algorithm that significantly outperforms the then-state-of-the-art gamut mapping techniques on real-world datasets.

Methods

The authors propose a principled Bayesian approach grounded in a sophisticated imaging model. They utilize the standard diagonal lighting model ($y = Lx$), where $y$ is the observed pixel, $L$ is the illuminant, and $x$ is the surface reflectance.

Instead of assuming reflectances follow a simple bell curve, the researchers quantize the reflectance space into $32 \times 32 \times 32$ bins. They treat the reflectances as "exchangeable," meaning the probability depends on the histogram of colors in the image rather than their specific spatial locations.

Visualization of the learned non-Gaussian reflectance distribution

To learn what "real world" colors look like without requiring a perfectly calibrated lab, the authors employed a bootstrapping technique. They ran a simple "Scale-by-Max" algorithm on approximately 2,300 random JPEG images scraped from news and sports websites. This allowed them to build a rich, non-parametric prior distribution of reflectances from noisy, uncalibrated data.

A key mathematical contribution of this work is the "normalized count" innovation. The authors found that standard multinomial models (which count color occurrences) or clipped models (which merely check if a color is present, as seen in "Color by Correlation" methods) introduced biases, often preferring images with very few colors. Their normalized count modification distributes probability equally over all reflectances present in an image, effectively removing this bias and making statistical color constancy much more robust.

Datasets

The models were developed and evaluated using three distinct datasets:

  • Bootstrapping Set: ~2,300 randomly selected uncalibrated JPEG images from the web.
  • Tuning Set: A subset of 20 images (10 objects under 2 illuminants) from a known model dataset, used to select algorithmic parameters like bin size and thresholds.
  • Test Set: A publicly available real-world dataset consisting of 321 images of 30 different scenes captured under 11 different light sources, complete with ground-truth illuminant data.

Results and Key Insights

The performance of the algorithms was measured using RMS error in chromaticity space, where a lower score indicates better performance.

Algorithm RMS Error (Full Set) RMS Error (Hull Set)
Bayes (Tuning Set Model) 0.0344 0.0317
Bayes (Bootstrap Model) 0.0442 0.0351
Gamut Mapping (with segmentation) 0.0426 0.0393
Scale by Max (Baseline) 0.0584 0.0584
Comparison of RMS errors across different color constancy algorithms

The Bayesian approach utilizing the tuning set model achieved a significant lead over Gamut Mapping. Remarkably, even the version trained on "dirty" web images (the Bootstrap Model) performed competitively with the best-segmented Gamut Mapping.

A crucial insight from the study is that the learned reflectance distribution is highly structured. This inherent structure is exactly what allows the Bayesian model to disambiguate between potential light sources that a simpler Gaussian model would find equally likely.

Furthermore, the authors discovered that the errors made by the Bayesian method and Gamut Mapping were almost completely uncorrelated ($r = -0.04$). This indicates that the two algorithms fail on entirely different types of images because they exploit different properties of light and matter.

Limitations and Future Work

While highly effective, the proposed Bayesian model has limitations that present opportunities for future research:

  • Spatial Information: The current model treats pixels as a "bag of colors" due to its exchangeability assumption. It ignores the spatial reality that adjacent pixels are highly likely to belong to the same object.
  • Segmentation: Gamut mapping benefits significantly from image segmentation (grouping pixels into objects), which acts as a noise filter. The Bayesian model does not currently utilize segmentation, and incorporating it could yield further improvements.
  • The "Ideal" Hybrid: Because the errors of the Bayesian approach and Gamut Mapping are uncorrelated, the authors suggest that a "joint model" combining both could potentially reach an RMS error as low as 0.019, nearly doubling the accuracy of the current best method.

Summary updated

BibTeX
@inproceedings{rosenberg2003bayesian,
  author = {Charles R. Rosenberg and Thomas P. Minka and Alok Ladsariya},
  title = {{Bayesian Color Constancy with Non-Gaussian Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2003},
}
Figure