Abstract
In image recognition, it is often assumed that the method used to convert color images to grayscale has little impact on recognition performance. We compare thirteen different grayscale algorithms with four types of image descriptors and demonstrate that this assumption is wrong: not all color-to-grayscale algorithms work equally well, even when using descriptors that are robust to changes in illumination. These methods are tested using a modern descriptor-based image recognition framework on face, object, and texture datasets with relatively few training instances. We identify a simple method that generally works best for face and object recognition, and two that work well for recognizing textures.
Introduction
In computer vision, descriptor-based systems (such as SIFT or SURF) typically operate on grayscale images to reduce computational complexity and avoid the high dimensionality of color data. A common assumption among researchers is that because these descriptors are designed to be robust to illumination changes, the specific grayscale conversion method is an innocuous preprocessing choice. However, there is no single standard for converting color to gray; methods range from simple channel averaging to complex contrast-preserving algorithms. This study investigates whether this choice creates a performance bottleneck, particularly when training data is limited.
Methods and Materials
The researchers conducted a comprehensive evaluation of 13 grayscale algorithms across four distinct domains: the AR Face Dataset, CUReT (textures), the Barnard object dataset, and Caltech 101.
Grayscale Algorithms
The tested methods included:
- Intensity: A simple average of color channels.
- Perceptual Models: Luminance, Luma, and Lightness, which mimic human vision.
- Color-Space Channels: Value (from HSV) and Luster (from HLS).
- Contrast-Preserving: Decolorize, designed to maintain chromatic contrast.
- Gamma Correction: Several methods were tested with and without gamma-corrected inputs.
Recognition Framework
To ensure the results were not descriptor-specific, the study utilized four popular features: SIFT, SURF, Geometric Blur (GB), and Local Binary Patterns (LBP). These were evaluated using the Naive Bayes Nearest Neighbor (NBNN) classifier. NBNN is ideal for this study as it relies on the direct discriminative power of the descriptors rather than a complex learning phase that might compensate for poor preprocessing.
Key Insights and Results
The Superiority of Gamma Correction
A primary finding is that methods incorporating gamma correction consistently outperformed those that did not. Specifically, Gleam (averaging gamma-corrected color channels) and Intensity' (gamma-corrected intensity) achieved the highest mean rank across all datasets and descriptors. Gamma correction non-linearly transforms pixel values, which appears to help descriptors better capture edge and gradient information in darker image regions.
Machine vs. Human Vision
Standard industry defaults like MATLAB’s rgb2gray (Luminance) are designed to match human perception. However, the study found that what looks "right" to a human is not always the most informative for a computer. While Gleam was superior for faces and objects, textures (CUReT) were an exception; for these, perceptual methods like Luminance and Luma performed better by preserving subtle shading patterns.
The "Value" Pitfall
The "Value" channel from the HSV color space—frequently used in computer vision—performed the worst across nearly all tests. Its high sensitivity to changes in a single color channel makes it extremely brittle under varying illumination conditions.
Conclusion
The choice of color-to-grayscale conversion is a significant, often hidden variable in image recognition performance. The performance gap can be substantial; on the AR Face Dataset, the best method (Gleam) was significantly more accurate than the worst (Value), proving that even "robust" descriptors cannot overcome poor preprocessing. The authors recommend that researchers always report their specific grayscale conversion method and suggest that future systems might benefit from learning optimal task-specific transformations.
Summary updated