<!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>Automatic System for Extraction of Content-Based Characteristics from Digital Images</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gonzalo Len</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>JosØ Luis Delgado</string-name>
          <email>jdelgado@lsi.uned.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Covadonga Rodrigo</string-name>
          <email>covadonga@lsi.uned.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fernando Lpez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Valentn Sama</string-name>
          <email>vsama@lsi.uned.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Algorithms</institution>
          ,
          <addr-line>Experimentation, Measurement, Performance, Verication</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>CBIR</institution>
          ,
          <addr-line>Calibration, Validation, JAI</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Dpto. Lenguajes y Sistemas InformÆticos - E.T.S.I. InformÆtica - U.N.E.D</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we expose the development of a CBIR system (Content-based Image Retrieval) that is able to retrieve images from a corpus based upon the image content. In order to obtain such functionality, the system establishes a set of characteristics which will be automatically generated. This allows the system to univocally identify each image from the collection. The sort of characteristics is diverse and they are related to concepts such as entropy, Gabor lters and image size. After the calculation of characteristics of each image, a calibration process is performed whereby the system estimates the best weight for each characteristic. This estimation makes use of a calibration algorithm and a set of experiments, and the result is the inuence of each characteristic in the main function that is used for the retrieval process. The calibration process starts in an equally balanced situation (all the characteristics have the same inuence in the main function), and after several iterations the weight for each characteristic is xed. The following task is the image validation, where the modications to the main function are veried so as to ensure that the new function is better than the previous one. Finally, the image retrieval process is performed according to the ImageCLEFmed rules. The retrieval results have not been the expected ones, but we must say they are a good starting point that makes us establish several work lines for the future.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Focused on the second way and, more specically in the context of digital images, the work
entails the extraction of signicant data from these images, being this collection of attributes
sucient for identifying the images. This signicant data (from now on we will call them only
characteristics) is a set of short-scope attributes, allowing the identication, or at least the
characterisation, within a certain group. The sort of characteristics is very diverse, covering the range
from the properties such as height and width until the statistical data of the transformed image.
The reason for extracting the characteristics instead of working with the original images lies in
the big size that images usually have, and implies a very high time-consuming task that cannot
be aorded. Besides, the characteristic has to be a tiny piece of information since its usefulness
lies in the ability of making very often comparisons with other equivalent characteristics within
the same image or from other ones.</p>
      <p>Currently there are several image processing systems which pursue this aim. For instance, the
GIFT (GNU Image-Finding Tool ) is an image retrieval system based upon the content (a.k.a.
CBIR Content-based Image Retrieval ). Given a certain image, the system returns the most
similar images ordered by relevance. GIFT is intended as a client-server application.</p>
      <p>This work is aimed at developing a system that is able to extract, from collection of images, a
set of characteristics from each of them which will be further used for cataloguing and comparing
purposes. The characteristics are only based upon the image content and not upon other data
(textual metadata).
2</p>
    </sec>
    <sec id="sec-2">
      <title>An approach to the system</title>
      <p>
        In the previous section we introduced the concept of characteristic as an attribute that allows,
alone or in combination with other attributes, establishing the membership of an image to a certain
group. Obtaining characteristics and its later use in the images identication has been applied in
many elds, mainly in the biometric identication as it is exposed in [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ], with great sucessful
results.
      </p>
      <p>The rst question that appears when developing the system is to know which the best option
is amongst all the possibilities, and what has already been developed for this aim. Consequently
there is a need in investigating the characteristics which are likely to be extracted from an image,
and to what extent they are suitable for their comparison.</p>
      <p>Another goal is to plan the system in a scalable way in terms of the characteristics
extraction software. The system should not have a close architecture when the purpose is to add new
characteristics. On the contrary, the addition of new characteristics should be easy as far as
possible, avoiding the modication of the code since while developing the system, the goodness of the
characteristics’ results developed will be unknown.</p>
      <p>In the same way, the system that is going to be developed should be able to:
Store a collection of images ( corpus ) and their related characteristics.</p>
      <p>Store a collection of classes/groups or characteristics which can be applied to images and
their inuence in later comparisons.</p>
      <p>Compare the image’s characteristics with those belonging to the images within the corpus.
Combine the comparison’s results provided by the dierent characteristics when obtaining
a unied measure of similarity, for its later sorting.</p>
      <p>Amongst all the existing options when developing our system, we have chosen a Java
development starting from scratch, using the Java 1.5 Standard Edition (J2SE), focused on the program
execution in dierent platforms (operating systems), with no need for recompiling, making the
application to be executed in several places only moving the les from one machine to another.</p>
      <p>A further reason justifying this choice is the great number of libraries which are available for
Java, covering many dierent elds like digital image processing. In this sense, we can nd JAI
(Java Advanced Imaging), that is an optional library (not included in the standard distribution
J2SE) allowing the reading and processing of images for extracting their characteristics.
Furthermore, the use of the concurrent paradigm by means of threads was also considered to choose Java
as the selected technology.</p>
    </sec>
    <sec id="sec-3">
      <title>Selection of characteristics</title>
      <p>The number and source/nature of the characteristics available for this study was very diverse,
so there are some characteristics more connected to the image’s source (for instance, the number
of bits describing the color depth per pixel), that allow a direct mathematical and easier
management, whereas there are some other characteristic obtained through a mathematical algorithm
(for instance, Gabor Filters) upon the image and its later processing requires a better
knowledge and produces an indirect application. Hence it is necessary to perform an analysis of these
characteristics and evaluate whether they are useful or not, through a justied selection.</p>
      <p>On the other hand it seems to be a logical thought the fact that the inuence of these
characteristics is not the the same in the nal result. A priori, characteristics related to the image’s
dimension (for instance, height and width) should have a lower weight than other characteristics,
such as the image’s average power; nevertheless, this needs to be accepted in a relative way. For
this reason a calibration process is required to ensure to what extent each characteristic impacts
in the nal value of the comparison. The calibration process will be described in Section 4.</p>
      <p>
        After performing some experimental assessments and addressing some indications shown in
several articles (see [
        <xref ref-type="bibr" rid="ref1 ref4 ref5">7, 5, 1, 4</xref>
        ]), the nal number of characteristics was reduced to 9. The
comparison procedure to be used is the one giving a value of 0 for those images with a very low similarity,
whereas it gives a value close to 1 when the similarity is higher. In all the cases, the JAI (Java
Advanced Imaging ) library has been used for the image reading and other related information. The
dierent characteristics, grouped by the method to extract them, are shown in the next subsection.
      </p>
      <sec id="sec-3-1">
        <title>Characteristics related to the Histogram</title>
        <sec id="sec-3-1-1">
          <title>Euclidean distance between two histograms</title>
          <p>Given the histograms from two images, one measure of the similarity between the images
could be the Euclidean distance between both histograms, transforming these histograms in a
n-dimensional vector, where n is the number of colours. Let x and y be the histograms from the
two images. The euclidean distance is dened as:</p>
          <p>vu n
D = utX (xi
i=0
yi)2</p>
          <p>However, there is a problem in directly applying this formule. The chances for the pixel value
in images with dierent sizes can be very variable and, at last, they can be the same image (if
the images are not normalised in their size). For this reason the comparison is not performed
with that value but the weight of such value. It is used the probability for such value, i.e. the
numer of chances of each pixel’s value divided by the total number of pixels. Since the similarity
between images is inversely proportional to the euclidean distance, it is provided as the value for
the similarity: 1 D.</p>
          <p>The histogram presents a problem while working with images in a grey-scale or a colour-scale.
The source of this problem lies in the number of histograms required to dene the image. In
the grey-scale images only one histogram is needed whereas the colour-scale images need three
histograms (one per band colour: red, green and blue). In this way, what it is executed is a
comparison between histograms in a colour-scale image and, if a comparison between grey and
colour images is performed, rstly there is a transformation of the colour histograms into a
greyscale one, so that the comparison can be established at the same level.</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Arithmetic average from the Histogram</title>
          <p>Another interesting value to be considered is the arithmetic average of the pixels’ values, easily
calculated from the histogram. The value for the similarity between two images is obtained through
the next formule 1 jx1 x2j=x1+x2, where j x1 x2 jis the absolute value of the dierence between
both averages.</p>
          <p>There is another characteristic related to the histogram and obtained from it, named entropy.
It is dened as follows:</p>
          <p>H =
n
X p(xi) log2 p(xi)
i=1
SH = 1
j E1 E2 j</p>
          <p>E1 + E2
where n is the number of dierent values that each pixel can have, and p(xi) is the chance for
the value at the position i. The entropy returns a unique real value for each image. In order to
compare two images, the similarity value comes from the next formule:
where E1 y E2 are the entropies of each image. As it can be stated, the result returned by the
formule, the less dierence between the images, the closer value to 1. However, this formule does
not take into account the case of entropies with dierent sign, leading to a non signicant value,
since the addition of both entropies is not the addition of their magnitudes. To avoid this problem,
in case of a negative entropy, the less value of both entropies is added to the negative one. This
makes one of them to get the value of 0 while the other is necessarily positive.</p>
        </sec>
        <sec id="sec-3-1-3">
          <title>Local entropy</title>
          <p>Since the entropy is a unique valor for the entire image, there is a lack of local information
about the image, i.e. it does not dene the image in its dierent areas. To be more accurate at
this point, a new characteristic was added, named " local entropy ". The procedure involves the
division of the image in 36 areas of the same size, and the calculation of the entropy for each of
these areas. The result is a vector used as a characteristic of the digital image.</p>
          <p>To calculate the similarity between two local entropies vectors, the process consists of getting
the local entropies for the same area within the two images, calculated as 1 x=V M, wherexis the
dierence between the entropies and V M is the maxium value. Empirically was set to 10. Finally
the arithmetic average of the similarities was selected as the similarity between the two images.</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Characteristics related to the Gabor’s lters</title>
        <p>
          Gabor’s lters are used in a digitalised image and provide information about its texture. They
are commonly parametrised with the orientation and the spatial frequency, as it is stated in [
          <xref ref-type="bibr" rid="ref6">8</xref>
          ].
        </p>
        <p>This transformation lies in the application of a kernel created from the Gabor’s function
described over the digital image. For our purposes it is convenient to study the image in dierent
orientations, wave lengths and dierences. Eight orientations have been used, from 0 to (7=8) ,
with variations of (1=8) . For the wave lengths four options were selected: 2:73, 5:47, 8:20, 10:93.
For the dierences, two options were taken into account: 0 and (1=2) . From each transformed
image, the arithmetic average is obtained as well as the typical deviation; they are two dierent
characteristics.</p>
        <p>The whole similarity between two vectors (both arithmetic averages as well as typical
deviations) is calculated through the arithmetic average (in absolute value) between the elements at
each vector’s position. The similarity S1 is calculated as 1 x=V M, where x is the arithmetic average
of the dierences and V M is the maximum value empirically set to 100.</p>
        <p>The nal similarity value is calculated as 0:1 S1 + 0:9 S2, where 0:1 and 0:9 are the selected
values coming from several experiments which were carried out about this lter.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Other characteristics</title>
        <p>Other easier characteristics have been included in the system and are described as follows:
Colour Bits : Number of bits used to represent the image. In general, 8 and 16 bits are used for
images in grey-scale and 24 bits for the full-colour images. The similarity is 1 jbc1 bc2j=bc1 bc2,
where bc1 y bc2 are the bits of the rst and second images respectively.</p>
        <p>Aspect Ratio : Proportion between the width and the height of each image. The similarity
value is 1 ja1 a2j=max(a1;a2), where a1 and a2 are the aspect ratios for the rst and the
second images respectively.</p>
        <p>Tiny Image : Direct comparison between images reduced to a size of 40x30 pixels. This
characteristic, despite of being very simple, is highly eective when comparing images with
a similar shape, as it is stated in [6]. The similarity value is calculated by the formule
1 De=V M, where De is the euclidean distance and V M is the maximum value set to 12000.
Size : This is the number of pixels. The similarity is returned by the next formule min(t1;t2)=max(t1;t2),
where t1 and t2 are the sizes for the rst and the second images respectively.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Calibration and Validation</title>
      <p>As we forementioned in the previous sections, the calibration process was the one that leads
to the modication of each characteristics’ weight so as to increase the hit ratio in the group’s
prediction. It is possible for one characteristic to be better than any other one to classify an image,
but this could not happen when working with any other dierent image. For this reason there is a
need in nding an average weight of inuence in terms of nal similarity that allows an appropriate
clasication for the greater number of images.</p>
      <p>The calibration process is a non trivial task. It can be supposed that, through the entire
collection of working images, it is selected a better weight that improves our classication process
for the same collection of images. This could be understood like cheating and distortioning the
results since the perfect classication is used in advance. In other words, if the weights are modied
to let the Image X, that is known in advance it belongs to the Group Y, to be classied within the
Group Y, it would not be honest to state that the classication has been carried out in the right
way (the information to solve the problem has been used in advance and it should be unkown
at that moment). This could be compared to asking someone to foretell a card that has been
previously shown.</p>
      <p>For this reason, the calibration requires a later process named validation. The validation allows
the system to decide whether the modication of the weights enclosed in the calibration enhances
or not the results. To achieve this goal, the validation process utilises a collection of images not
used in the calibration, and a sort of validity is obtained for the weights calculated in the previous
step.</p>
      <p>To carry out the calibration process it was used the ImageCLEF information from the previous
years. Specically the database used was casimage (http://pubimage.hcuge.ch) that was divided
in disjoint groups. A total of 27 groups were extracted from the 57, discarding those with a few
number of images or those very similar to existing ones.</p>
      <p>The goal was to obtain the characteristics’ weights that make the similiraty value, for each
image within the a group, as high as possible. As a secondary objective, the similarity value for
a certain image belonging to a group should be as low as possible when comparing to images
belonging to other groups; this objective prevents the system classifying in a wrong way. These goals
were achieved comparing all the images within the corpus amongst them, obtaining a collection of
sorted descendant lists by similarity. For each list, it was calculated the prediction capacity to the
group it belonged to, having the greatest capacity prediction those located in the rst positions of
the list. If it was possible to infere, from such value for the prediction, that an image belonged to
the group it really belonged to, then it was asserted that there had been a hit in the prediction.</p>
      <p>At this point of the process, the weight of a characteristic was slightly increased and the step
above was performed again. If the number of hits was stable or increased, the characteristic’s
weight was increased as well and the number of hits was re-calculated. If the number of hits
decreased, the previous weight was restored and the process tried to increase the weight of other
characteristic. This process was executing until covering the whole set of characteristics. We call
this Calibration Algorithm .</p>
      <p>The calibration algorithm is a very time-consuming task. Considering a corpus that consists
of 5000 images, the system took 5 days in executing the algorithm. However, the algorithm has
demonstrated to be the most suitable to obtain the best results compared to other algorithms
evaluated. For a collection of images outside the corpus to calibrate the system, the hit ratio was
increased from the 56% (that gave the same weight to all the characteristics) to the 86% with the
weights coming from the algorithm.</p>
      <p>In any case, and even being the computational cost very high, the calibration process is required
since it is reasonable that the system improves future classications when the weights for the right
classifcations are previously extracted (feedback). To start the study of the calibration process,
some initial analysis were carried out taking as inputs the results of the comparisons between a
group of images and the images within the repository (corpus). To manage this, the similarity
values were extracted in order to include them in a database with the objective of graphically
displaying this result. Figure 1 shows the similarity distribution between images within the same
group and images belonging to dierent groups, for the characteristic of local entropy.</p>
      <p>It should be visually noted that the similarity amongst images within the same group (Groups
1-57) are placed, in average, above the similarities amongst dierent groups. This is a logical
circumstance because it asserts that the similarity amongst images within the same group is
higher than the one coming from dierent groups.</p>
      <p>Table 1 illustrates the values obtained for the similarities once the algorithm was executed
through several iterations:
5</p>
    </sec>
    <sec id="sec-5">
      <title>Analysis of the results and conclusions</title>
      <p>In our rst participation with the ImageCLEF we can say we have not achieved the expected
results. Compared to the rest of the groups, and analysing the metrics provided by the organisation,
we have got the last position in most of the cases. The reason for this position lies on the number
of extracted images for each topic, always under the number of images provided by the rest of
participants (we have provided dozens while some other teams have provided thounsands).</p>
      <sec id="sec-5-1">
        <title>Characteristics Euclidean Distance between Histograms Entropy Local Entropy</title>
        <p>Tiny Image
Colour Bits
Aspect Ratio</p>
        <p>Size</p>
        <p>Typical Desviation of Gabor Transform (0)
Typical Desviation of Gabor Transform ( (1=2) )</p>
        <p>Arithmetic Averages of Gabor Transform (0)
Arithmetic Averages of Gabor Transform ( (1=2) )</p>
        <p>Arithmetic Averages of the Histogram</p>
        <p>This fact can be explained from the point of view of our system. We dened some criteria to
decide whether an image was relevant or not, by means of a procedure that is described as follows:
for each topic, a list of images from the corpus was generated, ltered by similarity and sorted
descendantly. Afterwards, for each image within the list, the typical deviation of each image and its
previous ten similar ones was calculated. When this value was under 0;01, i.e. when the similarity
of this image with the previous ten was very close, the list was "cut" in that point, and the images
provided were the previous ones. The reason for selecting this method lies on the observation of
the similarities in such ordered list and the fact that the similarity within the images at the rst
position decreased signicantly, and after these rst position the way it decreased was softer.</p>
        <p>Probably the use of a lower value would have been more suitable. Above all, perhaps we have
not taken account of a very important factor, like the fact of that some "good" images, due to
the calibration, may fall to the latest position of the list and be discarded. Besides, it seems to be
logical that scanning the entire list, the number of images retrieved would be bigger; this possibility
was discarded due to the lack of eciency and speed of the overall system. In any case, it will be
a very relevant issue to consider for the future.</p>
        <p>In the same way, the characteristics that have been used in the development should be revised
(probably the addition of anyone else should be desirable and even required), as well as a signicant
improvement of the eciency in the calibration process so as to get the best ts in less time; and
nally, to make the process to be adapted depending on the source of the images, making the
algoritm execute in a dierent and optimum fashion.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>X.</given-names>
            <surname>Wei D. Raccoceanu D. Le Thi Hoang R. Teodorescu N. Vuillemot</surname>
          </string-name>
          <string-name>
            <given-names>C.</given-names>
            <surname>Lacoste</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lim</surname>
          </string-name>
          .
          <article-title>Ipal knowledge-base medical image retrieval in imageclefmed 2006</article-title>
          .
          <string-name>
            <given-names>IPAL</given-names>
            <surname>French-Singaporean Joint</surname>
          </string-name>
          <string-name>
            <surname>Lab</surname>
          </string-name>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.</given-names>
            <surname>SÆnchez-Rello</surname>
          </string-name>
          (
          <article-title>2) C</article-title>
          . SÆnchez-`
          <source>vila (1)</source>
          . Sistemas de identicacin biomØtrica mediante patrn de iris utilizando representacin multiescala e informacin de fase. (1)
          <string-name>
            <surname>Departamento de MatemÆtica Aplicada</surname>
          </string-name>
          <article-title>a las Tecnologas de la</article-title>
          <string-name>
            <given-names>Informacin. E.T.S.I.</given-names>
            <surname>Telecomunicacin - Universidad PolitØcnica de Madrid (UPM</surname>
          </string-name>
          <article-title>) (2</article-title>
          )
          <string-name>
            <surname>Departamento de Ingeniera ElØctrica</surname>
          </string-name>
          , Electrnica y AutomÆtica. Universidad Carlos III de Madrid (
          <year>UC3M</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>J. SuÆrez Lpez F. Martn Rodrguez</surname>
          </string-name>
          .
          <article-title>Identicacin dactilar basada en ltros de gabor</article-title>
          . Departamento de Teora de la Seaeal y Comunicaciones. Universidad de Vigo.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Desai P. Bhattacharya M. M. Rahman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Sood</surname>
          </string-name>
          . Cindi at imageclef2006.
          <article-title>image retrieval &amp; annotation tasks for the general photographic and medical image collections</article-title>
          . Dept. of Computer Science &amp; Software
          <string-name>
            <surname>Engineering</surname>
          </string-name>
          , Concorcdia University,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M. Sanderson P.</given-names>
            <surname>Clough</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Mller</surname>
          </string-name>
          .
          <article-title>The clef 2004 cross-language image retrieval track</article-title>
          .
          <year>2004</year>
          , LNCS
          <volume>3491</volume>
          :
          <issue>597613</issue>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P.</given-names>
            <surname>Kruizinga S. E. Grigorescu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Petkov</surname>
          </string-name>
          .
          <article-title>Comparison of texture featres based on gabor lters</article-title>
          .
          <source>IEEE Transaction on Image Processing</source>
          ,
          <volume>11</volume>
          :
          <fpage>10</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>