Optimized $k$-means color quantization of digital images in machine-based and human perception-based colorspaces
Ranjan Maitra
TL;DR
This work investigates whether color quantization via $k$-means should be performed in machine-based RGB or human perception-based XYZ/LUV (HCL) spaces. It conducts a large-scale evaluation on $148$ diverse digital images across multiple quantization levels using Visual Information Fidelity (VIF) as a perceptual metric, and it couples this with detailed hue, chromaticity, and luminance distribution descriptors analyzed by circular and linear statistics. The authors employ multivariate regression trees (MVRT) and multivariate random forests (MVRF) to relate image-descriptor features to cross-space performance, finding that RGB is best in about half the cases, XYZ dominates at higher $k$, and LUV offers benefits for some low-$k$ cases; these findings are interpreted via data-driven rules linking image characteristics to colorspace choice. The results provide practical guidance for color quantization and contribute a richly described image dataset with distributional descriptors to support future work on perceptual color processing and color-space selection.
Abstract
Color quantization represents an image using a fraction of its original number of colors while only minimally losing its visual quality. The $k$-means algorithm is commonly used in this context, but has mostly been applied in the machine-based RGB colorspace composed of the three primary colors. However, some recent studies have indicated its improved performance in human perception-based colorspaces. We investigated the performance of $k$-means color quantization at four quantization levels in the RGB, CIE-XYZ, and CIE-LUV/CIE-HCL colorspaces, on 148 varied digital images spanning a wide range of scenes, subjects and settings. The Visual Information Fidelity (VIF) measure numerically assessed the quality of the quantized images, and showed that in about half of the cases, $k$-means color quantization is best in the RGB space, while at other times, and especially for higher quantization levels ($k$), the CIE-XYZ colorspace is where it usually does better. There are also some cases, especially at lower $k$, where the best performance is obtained in the CIE-LUV colorspace. Further analysis of the performances in terms of the distributions of the hue, chromaticity and luminance in an image presents a nuanced perspective and characterization of the images for which each colorspace is better for $k$-means color quantization.
