Color Quantization via Spatial Resolution Reduction
Giuliana Ramella and Gabriella Sanniti di Baja
Institute of Cybernetics "E.Caianiello", CNR, Via Campi Flegrei 34, Pozzuoli, Naples, Italy
Keywords: Color Quantization, Image Scaling, Voronoi Diagram.
Abstract: A color quantization algorithm is presented, which is based on the reduction of the spatial resolution of the
input image. The maximum number of colors n
f
desired for the output image is used to fix the proper spatial
resolution reduction factor. This is used to build a lower resolution version of the input image with size n
f
.
Colors found in the lower resolution image constitute the palette for the output image. The three
components of each color of the palette are interpreted as the coordinates of a voxel in the 3D discrete
space. The Voronoi Diagram of the set of voxels corresponding to the colors of the palette is computed and
is used for color mapping of the input image.
1 INTRODUCTION
Color quantization is a process that reduces the
number of distinct colors present in an input image
in such a way to originate a transformed image with
a noticeably smaller number of colors and at the
same time still visually similar to the input image.
One of the main applications of color quantization is
for image compression, especially when dealing
with the transmission of multimedia data files. These
files may have rather large size, so that their
transmission may result difficult due to the
bandwidth restrictions of computer networks. Other
applications of color quantization are for image
display, and for color based indexing and retrieval
from image databases.
Color quantization methods can be roughly
divided in image independent and image dependent
methods, see (Brun and Trémeau, 2002), (Celebi,
2011). The former methods, e. g., (Paeth, 1990),
(Mojsilovic and Soljanin, 2001), are generally
efficient, but produce poor results since the
distribution of colors in the input image is not taken
into account. Image dependent methods generally
provide good results, but are a bit more expensive.
Image dependent methods can be divided in pre-
clustering methods, e.g., (Heckbert, 1982),
(Gervautz and Purgathofer, 1990), (Wu, 1992),
(Kanjanawanishkul and Uyyanonvara, 2005), and
post-clustering methods, e.g., (Ozdemir and Akarun,
2002), (Bing et al., 2004), (Kim and Kehtarnavaz,
2005), (Atsalakis and Papamarkos, 2006), (Chen et
al., 2008), (Ramella and Sanniti di Baja, 2010),
(Rasti et al., 2011), (Celebi 2011). Pre-clustering
methods determine only once the color palette by
using features derived from the image at hand. Post-
clustering methods define an initial palette and then
improve it by resorting to an iterative process.
Color quantization can be interpreted as a
clustering problem in the 3D space, where the three
axes are the three color channels and the points are
the colors of the input image. To perform
quantization, points are suitably grouped into
clusters. Then, for each cluster a representative color
is selected, which is obtained e.g., as the average of
the points in the cluster. The number of clusters, i.e.,
the number of quantized colors, is generally fixed a
priori.
In principle, for a 24-bit true color image I the
number of possible colors may reach 16 millions.
However, the maximum number of colors actually
present in an image consisting of r rows and c
columns is rc. For example, consider an image I
with size 10241024. For such an image, at most
1.048.576 different colors are possible. In general, a
considerably smaller number of colors exists, since
the same color is likely to appear more than just
once in the image. On the other hand, if the spatial
resolution of I is reduced, say to 256256, a
maximum of 65.536 colors will be possible for its
pixels.
By taking into account the above considerations,
we here present a new image dependent technique
for color quantization that can be framed among the
78
Ramella G. and Sanniti di Baja G..
Color Quantization via Spatial Resolution Reduction.
DOI: 10.5220/0004272100780083
In Proceedings of the International Conference on Computer Vision Theory and Applications (VISAPP-2013), pages 78-83
ISBN: 978-989-8565-47-1
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)