Color Quantization Luc Brun ´ Equipe Traitement Num´erique des Images -Laboratoire LERI Universit´e de Reims Champagne Ardenne - France E-Mail:
[email protected] Alain Tr´emeau ´ Equipe Ing´enierie de la Vision - Laboratoire LIGIV Universit´e Jean Monnet de Saint-Etienne - France E-Mail:
[email protected]
2
Contents 1 Color Quantization 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Image independent quantization methods . . . . . . . . . . . . . . . . . . . . 1.3 Preprocessing steps of image dependent quantization methods . . . . . . . . . 1.3.1 Pre-quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Histogram calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Clustering Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 3x1D quantization methods . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 3D Splitting methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Grouping methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.4 Merge methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.5 Popularity methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Quantization algorithms based on weighted errors . . . . . . . . . . . . . . . . 1.6 Post clustering methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.1 The LBG and k-means algorithms . . . . . . . . . . . . . . . . . . . . 1.6.2 The NeuQuant Neural-Net image quantization algorithm . . . . . . . 1.6.3 The local k-means algorithm. . . . . . . . . . . . . . . . . . . . . . . . 1.7 Mapping methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7.1 Improvements of the trivial inverse colormap method . . . . . . . . . . 1.7.2 Inverse colormap algorithms devoted to a specific quantization method 1.7.3 Inverse colormap operations using k − d trees . . . . . . . . . . . . . . 1.7.4 The locally sorted search algorithm . . . . . . . . . . . . . . . . . . . . 1.7.5 Inverse colormap operation using a 3D Vorono¨ı diagram . . . . . . . . 1.7.6 Inverse colormap operation by a 2D Vorono¨ı diagram . . . . . . . . . . 1.8 Dithering methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.8.1 The Error diffusion methods . . . . . . . . . . . . . . . . . . . . . . . 1.8.2 The Ordered dither methods . . . . . . . . . . . . . . . . . . . . . . . 1.8.3 Vector dither methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.8.4 Joint quantization and dithering methods . . . . . . . . . . . . . . . . 1.9 Conclusion and perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.10 List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
5 5 6 7 8 8 9 12 13 17 20 21 22 26 26 27 27 28 28 29 29 30 31 31 33 33 35 35 36 37 44
4
CONTENTS
Chapter 1
Color Quantization 1.1
Introduction
Color image quantization is used to reduce the number of colors of a digital image with a minimal visual distortion. Color quantization can also be defined as a lossy image compression operation. Until lately, quantization was used to reproduce 24 bit images on graphics hardware with a limited number of simultaneous colors (e.g frame buffer displays with 4 or 8 bit colormaps). Even though 24 bit graphics hardware is becoming more common, color quantization still maintains its practical value. It lessens space requirements for storage of image data and reduces transmission band width requirements in multimedia applications. Given a color image I, let us denote by C I the set of its colors and by M the cardinality of C I . The quantization of I into K colors, with K < M (and usually K