A Fast Distance Between Histograms

  • Francesc Serratosa
  • Alberto Sanfeliu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3773)


In this paper we present a new method for comparing histograms. Its main advantage is that it takes less time than previous methods.

The present distances between histograms are defined on a structure called signature, which is a lossless representation of histograms. Moreover, the type of the elements of the sets that the histograms represent are ordinal, nominal and modulo.

We show that the computational cost of these distances is O(z′) for the ordinal and nominal types and O(z ′2) for the modulo one, where z′ is the number of non-empty bins of the histograms. In the literature, the computational cost of the algorithms presented depends on the number of bins in the histograms. In most applications, the histograms are sparse, so considering only the non-empty bins dramatically reduces the time needed for comparison.

The distances we present in this paper are experimentally validated on image retrieval and the positioning of mobile robots through image recognition.


Image Retrieval Pattern Recognition Letter Operation Move Move Left Histogram Representation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Cha, S.-H., Srihari, S.N.: On measuring the distance between histograms. Pattern Recognition 35, 1355–1370 (2002)zbMATHCrossRefGoogle Scholar
  2. 2.
    Rubner, Y., Tomasi, C., Guibas, L.J.: A Metric for Distributions with Applications to Image Databases. International Journal of Computer Vision 40(2), 99–121 (2000)zbMATHCrossRefGoogle Scholar
  3. 3.
    Kamarainen, J.-K., Kyrki, V., Llonen, J., Kälviäinen, H.: Improving similarity measures of histograms using smoothing projections. Pattern Recognition Letters 24, 2009–2019 (2003)CrossRefGoogle Scholar
  4. 4.
    Jou, F.-D., Fan, K.-C., Chang, Y.-L.: Efficient matching of large-size histograms. Pattern Recognition Letters 25, 277–286 (2004)CrossRefGoogle Scholar
  5. 5.
    Hafner, J., Sawhney, J.S., Equitz, W., Flicker, M., Niblack, W.: Efficient Colour Histogram Indexing for Quadratic Form Distance Functions. Trans. On Pattern Analysis and Machine Intelligence 17(7), 729–735 (1995)CrossRefGoogle Scholar
  6. 6.
    Morovic, J., Shaw, J., Sun, P.-L.: A fast, non-iterative and exact histogram matching algorithm. Pattern Recognition Letters 23, 127–135 (2002)zbMATHCrossRefGoogle Scholar
  7. 7.
    Serratosa, F., Sanfeliu, A.: Signatures versus Histograms: Definitions, Distances and Algorithms, Submitted to Pattern recognition (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Francesc Serratosa
    • 1
  • Alberto Sanfeliu
    • 2
  1. 1.Dept. d’Enginyeria Informàtica i MatemàtiquesUniversitat Rovira I VirgiliSpain
  2. 2.Institut de Robòtica i Informàtica IndustrialUniversitat Politècnica de CatalunyaSpain

Personalised recommendations