Measuring Perceptual Color Differences of Smartphone Photography

Zhihua Wang, Keshuo Xu, Yang Yang, Jianlei Dong, Shuhang Gu, Lihao Xu, Yuming Fang, Kede Ma

Abstract

Measuring perceptual color differences (CDs) is of great importance in modern smartphone photography. Despite the long history, most CD measures have been constrained by psychophysical data of homogeneous color patches or a limited number of simplistic natural photographic images. It is thus questionable whether existing CD measures generalize in the age of smartphone photography characterized by greater content complexities and learning-based image signal processors. In this paper, we put together so far the largest image dataset for perceptual CD assessment, in which the photographic images are 1) captured by six flagship smartphones, 2) altered by Photoshop, 3) post-processed by built-in filters of the smartphones, and 4) reproduced with incorrect color profiles. We then conduct a large-scale psychophysical experiment to gather perceptual CDs of 30,000 image pairs in a carefully controlled laboratory environment. Based on the newly established dataset, we make one of the first attempts to construct an end-to-end learnable CD formula based on a lightweight neural network, as a generalization of several previous metrics. Extensive experiments demonstrate that the optimized formula outperforms 33 existing CD measures by a large margin, offers reasonable local CD maps without the use of dense supervision, generalizes well to homogeneous color patch data, and empirically behaves as a proper metric in the mathematical sense.

Introduction

For decades, the measurement of color difference (CD) has relied on formulas like CIEDE2000, which were developed using simple, homogeneous color patches under strict laboratory conditions. While mathematically rigorous for their intended use, these traditional metrics often fail to translate to the complexities of modern smartphone photography. Today's mobile imaging involves sophisticated Image Signal Processors (ISPs), aggressive tone mapping, and AI-driven filters that introduce immense structural and color complexity.

A primary limitation of existing metrics is their failure to account for spatial context—the phenomenon where human perception of a color is influenced by its surrounding environment. Furthermore, the field has lacked a large-scale dataset of natural images with human-perceived color difference ground truth. This paper addresses these gaps by introducing the Smartphone Photography Color Difference (SPCD) dataset and a novel, learnable metric called CD-Net.

CD-Net: A Learnable Perceptual Metric

The researchers propose CD-Net, an end-to-end learnable model designed to mimic the two-step process of traditional color science while incorporating modern deep learning capabilities. CD-Net consists of two main components:

  1. Coordinate Transform: Instead of a fixed mathematical formula, CD-Net employs a lightweight Deep Neural Network (DNN) to transform RGB pixels into a perceptually uniform feature space. It utilizes a multi-scale front-end with 1x1 and 11x11 convolution kernels to capture both individual pixel colors and their surrounding spatial context.
  2. Distance Calculation: The difference between images is calculated using a learnable Mahalanobis distance. This allows the model to weight different dimensions of the feature space based on their relevance to human perception.

To ensure generalizability and avoid the "black box" pitfalls of larger models, CD-Net is intentionally lightweight, containing only approximately 14,500 parameters. This architecture encourages the model to learn fundamental rules of color perception rather than memorizing specific training samples.

The Smartphone Photography Color Difference (SPCD) Dataset

The foundation of this work is the SPCD dataset, currently the largest of its kind. It comprises 15,335 images forming 30,000 pairs. The images were captured using six flagship smartphones (including the iPhone 12 Pro and Samsung S21 Ultra) and subjected to various alterations, such as Photoshop simulations of ISP functions and built-in artistic filters.

Sample image variations from the SPCD dataset, illustrating different color profiles and ISP-like alterations.

To establish ground truth, the authors collected over 600,000 human ratings in a controlled laboratory environment using high-end, color-calibrated monitors. This rigorous process ensures that the dataset accurately reflects human perceptual judgments across a wide range of natural scenes.

Key Results and Insights

Extensive testing reveals that CD-Net significantly outperforms 33 existing metrics, including traditional CIE formulas and modern perceptual metrics like LPIPS and DISTS. Key findings include:

  • Importance of Spatial Context: Metrics that only consider individual pixels produce noisy local maps. By incorporating an 11x11 kernel, CD-Net effectively mirrors how human vision integrates local contrast.
  • Mathematical Rigor: Unlike many deep learning models, CD-Net behaves as a "proper metric," satisfying properties like the triangle inequality. This makes it highly reliable for downstream optimization tasks.
  • Intuitive Local CD Maps: Qualitatively, CD-Net produces smooth and intuitive local color difference maps. It accurately highlights significant color shifts—such as a sky becoming overly purple—without being distracted by fine structural details.
  • Generalization: Despite being trained on complex natural images, CD-Net maintains high performance on traditional color patch data (e.g., the COM dataset), demonstrating that it captures fundamental principles of color science.

Conclusion

CD-Net and the SPCD dataset represent a significant step forward in aligning automated color measurement with human perception in the context of mobile photography. While challenges like image misalignment remain, the model's robustness and lightweight architecture make it a promising tool for evaluating and optimizing next-generation Image Signal Processors. Future research may expand these metrics to account for varying viewing conditions and integrate them directly into the training of AI-driven imaging pipelines.

Summary updated

BibTeX
@article{wang2023measuring,
  author = {Zhihua Wang and Keshuo Xu and Yang Yang and Jianlei Dong and Shuhang Gu and Lihao Xu and Yuming Fang and Kede Ma},
  title = {{Measuring Perceptual Color Differences of Smartphone Photography}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  doi = {10.1109/tpami.2023.3262424},
}
Figure