<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Color Quantization and its Impact on Color Histogram Based Image Retrieval</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Khouloud Meskaldji</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Samia Boucherkha</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>et Salim Chikhi</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Meskaldji.khouloud@gmail.com</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>samchikhi@yahoo.com</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>slchikhi@yahoo.com</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>The comparison of color histograms is one of the most widely used techniques for Content-Based Image Retrieval. Before establishing a color histogram in a defined model (RGB, HSV or others), a process of quantization is often used to reduce the number of used colors. In this paper, we present the results of an experimental investigation studying the impact of this process on the accuracy of research results and thus will determine the number of intensities most appropriate for a color quantization for the best accuracy of research through tests applied on an image database of 500 color images.</p>
      </abstract>
      <kwd-group>
        <kwd>histogram-based image retrieval</kwd>
        <kwd>color quantization</kwd>
        <kwd>color model</kwd>
        <kwd>precision</kwd>
        <kwd>Histogram similarity measures</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Content-based image retrieval (CBIR) is a technique that uses visual attributes (such
as color, texture, shape) to search for images. These attributes are extracted directly
from the image using specific tools and then stored on storage media. The Search in
this case is based on a comparison process between the visual attributes of the image
request and those of the images of the base (Fig.1). This technique appeared as an
answer to an eminent need of techniques of automatic annotaion of images. Manual
annotation of images is an expensive, boring, subjective, sensitive to the context and
incomplete task.</p>
      <p>Color attributes are considered among the most used low-level features for image
search in large image databases. They have been used in several CBIR systems such
as QBIC [6] and Chabot [11]. The use of color in this area is justified by two factors.
First, the color is a powerful descriptor that facilitates the identification and
extraction of objects from a scene [3]. Second, humans can discern thousands of
shades and intensities of color, compared to about two dozen shades of gray [9].
However color quantization consists in reducing the number of used colors to
represent an image. The maximal number of colors used generally is 256 3. The
purpose of this process is to reduce the number of existing intensities in every
channel of a color model. This work is organized as follows: section 2 is dedicated
to the definition of color histogram, section 3 presents some color models, section 4
exposes color quantization, section 5 is dedicated to similarity measures between
histograms, section 6 for defining performance measures, section 7 for
experimentation and interpretation before giving a general conclusion and some
perspectives on this work.</p>
      <sec id="sec-1-1">
        <title>User</title>
      </sec>
      <sec id="sec-1-2">
        <title>Query formulation</title>
      </sec>
      <sec id="sec-1-3">
        <title>Visual content description</title>
      </sec>
      <sec id="sec-1-4">
        <title>Feature vector</title>
      </sec>
      <sec id="sec-1-5">
        <title>Output S</title>
      </sec>
      <sec id="sec-1-6">
        <title>Feature comparison</title>
      </sec>
      <sec id="sec-1-7">
        <title>Retrieval results</title>
      </sec>
      <sec id="sec-1-8">
        <title>Image Base</title>
      </sec>
      <sec id="sec-1-9">
        <title>Visual content description</title>
      </sec>
      <sec id="sec-1-10">
        <title>Feature vector Fig. 1. Framework of a CBIR system.</title>
        <p>The color histogram is a method for describing the color content of an image, it
counts the number of occurrences of each color in an image [8] (Fig. 2).</p>
        <p>The color histogram of an image is rotation, translation, and scale-invariant [3];
therefore, it is very suitable for color-based CBIR: content-based image retrieval
using solely global color features of images. However the main drawback of their
use is that they do not take account of space information concerning the color. This
can lead to unexpected errors (Fig. 3).</p>
        <p>Several alternatives were proposed in the literature to include space information
by using the space relations between the pixels (such as color moments [5], color
constants [7], color signatures [4]). These methods are concerned with optimizing
color matching techniques on a spatial level; i.e., utilizing the spatial relations
between pixels, in relation to their colors. According to Venn den [3] a larger
attention must be attracted towards the way in which a search engine based on the
color handles (codes or categorizes) a color.
3</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Color models</title>
      <p>Color model describes colors in a formal way according to a certain specification.
Usually color models represent a color in the form of tuples (generally of three). For
example, according to RGB (Red, Green, Blue), white color is represented by the
tuple (0, 0, 0) and the black color is represented by (255,255,255). The purpose of a
color model is to facilitate the specification of colors in a certain way and common
standard [10]. Color models lend themselves to (in principle) reproducible
representations of color, particularly in digital representations, such as digital
printing or digital electronic display [3].
3.1</p>
      <sec id="sec-2-1">
        <title>RGB (Red, Green, Blue) color model</title>
        <p>
          RGB color model (RGB: Red, Green, Blue) is the most used color model for
computer graphics. It is an additive color model: the lights red, green, and blue are
combined to create other colors. It is not perceptually uniform [3] i.e the same
variation of the value of the components is not always perceived as the same
variation of color. In other words, this means that the measure of the variation
perceived by a human is different from the mathematical distance. The RGB color
model can be visualized in the form of a cube, as illustrated in Fig. 4.
HSV (HSL, HSB) models are much closer to human eye perception of color [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], but
are perceptually not uniform [2]. The components of these models are: Hue,
Saturation, and Value (lightness or brightness). The hue represents the chromatic
component in this model and it is the definition of a color by the combination of the
primary colors. Saturation refers to the predominance of a particular hue in a color.
The value of a color refers to the intensity (the lightness or the darkness of the color)
(figure 5).
        </p>
        <p>In order to use a good color model for a specific application, conversion between
color models is necessary. A good color model for an image retrieval system should
preserve the perceived differences in color.</p>
        <p>= cos
[min(R, G, B)] 
= (R + G + B)
3.4</p>
      </sec>
      <sec id="sec-2-2">
        <title>CIE XYZ color model</title>
        <p>(1)
(2)
(3)

The first color model developed by CIE (Commission Internationale de l’Eclairage)
is XYZ color model. The Y component is the luminance component defined by the
weighted sums of R (0.212671), G (0.715160), and B (0.072169). X and Z are the
chromatic components. The XYZ color model is not perceptually uniform [3]. The
transition from RGB to CIE XYZ is a simple linear transformation, which means that
XYZ model is proportional to RGB color model. XYZ model is only an RGB model
like another. We find the same notation of colors by triplets. The chromaticity plan is
materialized by the Maxwell triangle (Fig. 6).
In order to produce color histogram, color quantization is often applied. Color
quantization is the process to reduce the number of colors employed to represent an
image. A quantization scheme is determined by the color model and the
segmentation (i.e., split up) of the color model used. As we said before, usually color
models represent a color in the form of tuples (generally of three) .By applying a
standard quantization scheme to a color model, each axis is divided into a certain
number of fractions. When the axes are divided into k, l, and m parts, number (n) of
the colors used to represent an image will be: n= k.l.m.</p>
        <p>A quantization of color model in n colors is often referred to as a n-bins
quantization scheme. Fig. 7 illustrates the effect of color quantization of an image.
The segmentation of each axis depends on the used color [3].</p>
        <p>(a)
(b)
An image can be represented by a color histogram, defined by a quantization scheme
of color applied to a color model. In order to express the similarity of two histograms
in a digital asset, a metric distance is employed In literature, a wide variety of
distance measures between histograms can be found, the most commonly used and
which we have therefore used are the following.
(h, g) = ∑ ∑ ∑ (h(a, b, c) − g(a, b, c)) 
(4)
Where a, b, c are color components (in the case of RGB a=r, b=g, c=b).</p>
        <p>In this formula there is only comparison between the identical bins in the
respective histograms. Two different bins may represent perceptually similar colors
but are not compared crosswise.
5.2</p>
      </sec>
      <sec id="sec-2-3">
        <title>Intersection distance</title>
        <p>The color histogram intersection distance between two histograms is given by:
d(h, g) =
∑ ∑ ∑
( ( , , ), ( , , ))
(| |,| |)
| h | and | g |: denote the number of samples used for the construction of the
histogram.
6</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Performance measure</title>
      <p>To evaluate the performance of a CBIR system, two measures, namely, the recall and
the precision [9], were borrowed from traditional information retrieval. Let A be the
set of images in the base which are appropriate to the image request q, and B the set
of returned images as result for that query. Sets a, b, c and d are given in Fig. 8.
In Fig. 8, a represents returned appropriate images, b represents inappropriate
returned images, c appropriate but not returned images and d inappropriate and not
returned images.</p>
      <p>Recall and precision can be defined as follows:
=
|
| |
|
|
(5)
(6)
(7)</p>
    </sec>
    <sec id="sec-4">
      <title>Experimentation</title>
      <p>7.1</p>
      <sec id="sec-4-1">
        <title>Image database</title>
        <p>The used base of images comprises 500 color images. It was downloaded from
http://wang1.ist.psu.edu/. The original image database comprises 1000 images
divided into 10 classes. We chose the use of 500 images and 5 classes for calculation
reasons. Each class represents a definite topic: African and villages, beach, buildings,
bus and dinosaurs. A sample of the base is presented in Fig. 9.
Our prototype has been developed for the purpose of studying the impact of color
quantization on the accuracy (precision) of CBIR. Precision represents in a retrieval
process the chance of obtaining images which are similar to the image request among
a group of n returned images. In our case we have calculated the precision of the top
25 of returned images. This number is approximately the number of the first returned
images by a retrieval system as thumbnails.</p>
        <p>The working principle of our prototype can be described in Fig. 10.</p>
        <p>Loading images
from image base</p>
        <p>Calculation of
histograms according to
quantization scheme
(i, i, i), Such as</p>
        <p>i ≤
maxquantization
If i &lt; max-quantization increment i</p>
        <p>Performing a
search for 10 (15.20)
image queries and
calculate the average
accuracy of top 25 of
returned images
Displaying graphs</p>
        <p>y = f (x) as:
X: quantization</p>
        <p>scheme</p>
        <p>Y: average precision</p>
        <p>Fig. 10.A diagram describing experimentation process</p>
        <p>As described above, the first step consists of loading images from the image base.
In the second step, color histograms are calculated according to a quantization
scheme (i, i, i) such as i ≤ max-quantization. The third step consists of performing a
search for 10 (15, 20) images. We have to note that those images have been
randomly chosen from the base but with one condition; the different classes must
participate by the same number of images ( if we take 5 images from the first class,
we have to take 5 from the second class and the third and so on). If max-quantization
is reached the process stops and graph y= f(x) is displayed such as: x is the
quantization scheme, y is obtained precision.
7.3</p>
      </sec>
      <sec id="sec-4-2">
        <title>Results and interpretations</title>
        <p>RGB model. We initially carried out tests on the quantization schemes from 2 to 256
with step of 8(2, 10, 18, 26…). The first tests showed that the optimum is situated in
the first fifteen values of the quantization schemes. Then we reduced the traversed
interval of quantization to the first fifteen quantization schemes for better locating the
optimum. Obtained results are presented in Fig. 11.</p>
        <p>As we can notice it, the optimal precision is reached when the used quantization
scheme is of (12, 12, and 12). This value also depends on used distance but with tiny
variations (about +/- 2). We can also notice that the use of quantization schemes with
greater values does not necessarily lead to a better precision. On the contrary it leads
to a much less efficient search. Then the choice of a quantization scheme or another
is a decision which must be taken after a meticulous study.</p>
        <p>HSV model. Obtained results for this model are described by Fig. 12</p>
        <p>As the figures show it above, there is a light difference between the results
obtained of the two distances. The quantization scheme which leads to an optimal
precision is located between the scheme of 10 and that of 15. In order to be able to
determine the exact value a thorough study of this model must be established.
XYZ model. The results obtained of this model are described by Fig. 13.</p>
        <p>We can notice that the results obtained of both distances are almost identical. The
quantization scheme which leads to an optimal precision in this case is that of (8, 8,
8).</p>
        <p>Obtained results showed image search precision depends indeed on the used
quantization scheme. Thus the used scheme must be selected after a meticulous
study. According to the tests carried out the difference of the precision between the
optimal scheme and the maximum scheme can go up to 20% of returned images. So
the use of a vector of size 256 is not necessary, rather it is inadvisable since it leads
to less efficient search. In other words, in one hand, the use of a quantization scheme
of very great values allow us to describe the images in a more detailed way, and in
the other hand, it increases the distance between images. We cannot say that the
optimal schemes obtained with these tests can be generalized on all the bases of
images because they also depend on the type of images used.</p>
        <p>Suppose we want to classify the various models according to their strength of
description (by strength of description we denote the optimal quantization scheme);
for example in our case XYZ color model is classified in first because its optimal
quantization scheme is the smallest, which means that this model makes it possible
to describe the images in a significant way compared with both others. However the
best results among all the tests carried out are those of model HSV with the
intersection distance. In this case, we suggest studying thoroughly color models and
finding measurements which enable us to compare them according to their
quantization and their search performance.
8</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and perspectives</title>
      <p>In this work we have been able to show in the first place the need of a quantization
process in CBIR system using color histograms. We have also demonstrated that the
use of a quantization scheme of great values does not necessarily lead to an optimal
precision of search. On the contrary it can lead to less efficient search. Then a
thorough study must be established in order to be able to determine the best
parameters of quantization for a better search for all color models. This implies the
use of this process on other image bases as well as on other color models. In
perspective we will study the impact of quantization on the recall of search.
9</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1 2
          <string-name>
            <surname>A. M. W. Smeulders</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Worring</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Santini</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Gupta</surname>
            , and
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Jain</surname>
          </string-name>
          ,
          <article-title>"Contentbased image retrieval at the end of the early years, "</article-title>
          <source>IEEE Trans. on Pattern Analysis and Machine Intelligence</source>
          , Vol.
          <volume>22</volume>
          , No.
          <volume>12</volume>
          , pp.
          <fpage>1349</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          -
          <fpage>1380</fpage>
          , Dec.
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>A.</given-names>
            <surname>Vailaya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A. G.</given-names>
            <surname>Figueiredo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Jain</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H. J.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <article-title>"Image classification for content-based indexing,"</article-title>
          <source>IEEE Trans. on Image Processing</source>
          , Vol.
          <volume>10</volume>
          , No.1,
          <string-name>
            <surname>Jan</surname>
          </string-name>
          . 2001
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Broek</surname>
            ,
            <given-names>E. L. van den</given-names>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>Human-Centered Content-Based Image Retrieval</article-title>
          .
          <source>PhD-thesis Nijmegen Institute for Cognition and Information (NICI)</source>
          , Radboud University Nijmegen, The Netherlands - Nijmegen.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>J.</given-names>
            <surname>Kender</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Yeo</surname>
          </string-name>
          .
          <article-title>Video scene segmentation via continuous video coherence</article-title>
          .
          <source>In Proceedings of IEEE Computer Vision and Pattern Recognition</source>
          , pages
          <fpage>367</fpage>
          .373,
          <string-name>
            <surname>Santa</surname>
            <given-names>Barbara</given-names>
          </string-name>
          , CA, june
          <year>1998</year>
          . IEEE Computer Society.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>K.</given-names>
            <surname>Ravishankar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Prasad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gupta</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Biswas</surname>
          </string-name>
          .
          <article-title>Dominant color region based indexing for cbir</article-title>
          . In V.
          <string-name>
            <surname>Roberto</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Cantoni</surname>
          </string-name>
          , and S. Levialdi, editors,
          <source>Proceedings of the International Conference on Image Analysis and Processing</source>
          , pages
          <fpage>887</fpage>
          -
          <lpage>892</lpage>
          .
          <article-title>Italian Chapter of the International Association for Pattern Recognition (IAPRIC</article-title>
          ),
          <year>september 1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Flickner</surname>
          </string-name>
          and al.
          <article-title>Query by image and video content: The QBIC system</article-title>
          .
          <source>IEEE Computer</source>
          ,
          <volume>28</volume>
          (
          <issue>9</issue>
          ):
          <volume>23</volume>
          {
          <fpage>32</fpage>
          ,
          <year>September 1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Flickner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Sawhney</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Niblack</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Ashley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Dom</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gorkani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hafner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Petkovic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Steele</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Yanker</surname>
          </string-name>
          .
          <article-title>Query by Image and Video Content: The QBIC system</article-title>
          .
          <source>IEEE Computer</source>
          ,
          <volume>28</volume>
          (
          <issue>9</issue>
          ):
          <fpage>23</fpage>
          .32,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Worring</surname>
          </string-name>
          and
          <string-name>
            <surname>Th. Gevers.</surname>
          </string-name>
          <article-title>Interactive retrieval of color images</article-title>
          .
          <source>International Journal of Image and Graphics</source>
          ,
          <volume>1</volume>
          (
          <issue>3</issue>
          ):
          <fpage>387</fpage>
          .414,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <given-names>R. C.</given-names>
            <surname>Gonzales</surname>
          </string-name>
          and
          <string-name>
            <surname>R. E. Woods.</surname>
          </string-name>
          <article-title>Digital image processing</article-title>
          . Prentice-Hall, Inc.,
          <source>New Jersey, 2nd edition</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <given-names>Virginia</given-names>
            <surname>Ogle</surname>
          </string-name>
          and
          <string-name>
            <given-names>Michael</given-names>
            <surname>Stonebraker</surname>
          </string-name>
          .
          <article-title>Chabot: Retrieval from a relational database of images</article-title>
          .
          <source>IEEE Computer</source>
          ,
          <volume>28</volume>
          (
          <issue>9</issue>
          ):
          <volume>40</volume>
          {
          <fpage>48</fpage>
          ,
          <year>September 1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <given-names>W. Y.</given-names>
            <surname>Ma</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B. S.</given-names>
            <surname>Manjunath</surname>
          </string-name>
          ,
          <article-title>"Edge flow: a framework of boundary detection and image segmentation,"</article-title>
          <source>IEEE Int. Conf. on Computer Vision and Pattern Recognition</source>
          , pages
          <fpage>744</fpage>
          -
          <lpage>749</lpage>
          ,
          <string-name>
            <surname>Puerto</surname>
            <given-names>Rico</given-names>
          </string-name>
          ,
          <year>June 1997</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>