Morphological Template Matching in Color Images

  • Sébastien Lefèvre
  • Erchan Aptoula
  • Benjamin Perret
  • Jonathan Weber
Part of the Lecture Notes in Computational Vision and Biomechanics book series (LNCVB, volume 11)


Template matching is a fundamental problem in image analysis and computer vision. It has been addressed very early by Mathematical Morphology, through the well-known Hit-or-Miss Transform. In this chapter, we review most of the existing works on this morphological template matching operator, from the standard case of binary images to the (not so standard) case of grayscale images and the very recent extensions to color and multivariate data. We also discuss the issues raised by the application of the HMT operator to the context of template matching and provide guidelines to the interested reader. Various use cases in different application domains have been provided to illustrate the potential impact of this operator.


Mathematical morphology Hit-or-miss transform Template matching Color image 


  1. 1.
    Angulo J, Lefèvre S, Lézoray O (2012) Color representation and processing in polar color spaces. In: C. Fernandez-Maloigne, F. Robert-Inacio, L. Macaire (eds.) Numerical color imaging, ISTE—Wiley pp 1–40Google Scholar
  2. 2.
    Aptoula E, Lefèvre S (2007) A comparative study on multivariate mathematical morphology. Pattern Recogn 40(11):2914–2929CrossRefzbMATHGoogle Scholar
  3. 3.
    Aptoula E, Lefèvre S (2008) On lexicographical ordering in multivariate mathematical morphology. Pattern Recogn Lett 29(2):109–118CrossRefGoogle Scholar
  4. 4.
    Aptoula E, Lefèvre S (2009) Multivariate mathematical morphology applied to colour image analysis. In: C. Collet, J. Chanussot, K. Chehdi (eds.) Multivariate image processing: methods and applications, ISTE—Wiley, pp 303–337Google Scholar
  5. 5.
    Aptoula E, Lefèvre S (2011) Morphological texture description of grayscale and color images. In: P. Hawkes (ed.) Advances in imaging and electron physics, vol. 169, Elsevier, pp. 1–74Google Scholar
  6. 6.
    Aptoula E, Lefèvre S, Ronse C (2009) A hit-or-miss transform for multivariate images. Pattern Recogn Lett 30(8):760–764CrossRefGoogle Scholar
  7. 7.
    Barat C, Ducottet C, Jourlin M (2003) Pattern matching using morphological probing. In: Proceedings of the 10th international conference on image processing, vol 1. Barcelona, Spain, pp 369–372Google Scholar
  8. 8.
    Barat C, Ducottet C, Jourlin M (2010) Virtual double-sided image probing: a unifying framework for non-linear grayscale pattern matching. Pattern Recogn 43:3433–3447CrossRefzbMATHGoogle Scholar
  9. 9.
    Bloomberg DS, Maragos P (1990) Generalized hit-miss operations. In: SPIE conference 1350, image Algebra and morphological image processing. San Diego, pp 116–128Google Scholar
  10. 10.
    Bloomberg DS, Vincent L (2000) Pattern matching using the blur hit-miss transform. J Electron Imaging 9:140–150CrossRefGoogle Scholar
  11. 11.
    Boak E, Turner I (2005) Shoreline definition and detection: a review. J Coastal Res 21(4):688–703CrossRefGoogle Scholar
  12. 12.
    Boykov YY, Jolly MP (2001) Interactive graph cuts for optimal boundary and region segmentation of objects in n-d images. In: Proceedings of the IEEE international conference on computer vision, vol. 1, pp 105–112Google Scholar
  13. 13.
    Doh Y, Kim J, Kim J, Kim S, Alam M (2002) New morphological detection algorithm based on the hit-miss transform. Opt Eng 41(1):26–31CrossRefGoogle Scholar
  14. 14.
    Goutsias J, Heijmans H, Sivakumar K (1995) Morphological operators for image sequences. Comput Vis Image Underst 62(3):326–346Google Scholar
  15. 15.
    Heijmans H, Serra J (1992) Convergence, continuity and iteration in mathematical morphology. J Vis Commun Image Represent 3(1):84–102CrossRefGoogle Scholar
  16. 16.
    Heijmans H (1994) Morphological image operators: advances in electronics and electron physics series. Academic Press, BostonGoogle Scholar
  17. 17.
    Heijmans H, Ronse C (1990) The algebraic basis of mathematical morphology, part I: dilations and erosions. Comput Vision, Graph Image Proc 50(3):245–295Google Scholar
  18. 18.
    Khosravi M, Schafer R (1996) Template matching based on a grayscale hit-or-miss transform. IEEE Trans Image Process 5(5):1060–1066CrossRefGoogle Scholar
  19. 19.
    Ledoux A, Richard N, Capelle-Laizé A (2012) Color hit-or-miss transform (CMOMP). In: Proceedings of the EURASIP European conference on signal processing (EUSIPCO). Bucharest, Romania, pp 2248–2252Google Scholar
  20. 20.
    Lefèvre S, Weber J, Sheeren D (2007) Automatic building extraction in VHR images using advanced morphological operators. In: IEEE/ISPRS joint workshop on remote sensing and data fusion over urban areas. Paris, FranceGoogle Scholar
  21. 21.
    Murray P, Marshall S (2011) A new design tool for feature extraction in noisy images based on grayscale hit-or-miss transforms. IEEE Trans Image Process 20(7):1938–1948CrossRefMathSciNetGoogle Scholar
  22. 22.
    Murray P, Marshall S (2013) A review of recent advances in the hit-or-miss transform. In: P.W. Hawkes (ed.) Advances in imaging and electron physics, vol. 175, Elsevier, pp 221–282Google Scholar
  23. 23.
    Naegel B, Passat N, Ronse C (2007) Grey-level hit-or-miss transforms—part I: unified theory. Pattern Recognit 40(2):635–647CrossRefzbMATHGoogle Scholar
  24. 24.
    Naegel B, Passat N, Ronse C (2007) Grey-level hit-or-miss transforms—part II: application to angiographic image processing. Pattern Recogn 40(2):648–658CrossRefzbMATHGoogle Scholar
  25. 25.
    Naegel B, Ronse C, Soler L (2005) Using grey-scale hit-or-miss transform for segmenting the portal network of the liver. In: Proceedings of the ISMM 2005–7th international symposium on mathematical morphology, computational imaging and vision, vol. 30, Springer SBM, pp 429–440Google Scholar
  26. 26.
    Passat N, Ronse C, Baruthio J, Armspach JP, Maillot C (2006) Magnetic resonance angiography: from anatomical knowledge modeling to vessel segmentation. Med Image Anal 10(2):259–274CrossRefGoogle Scholar
  27. 27.
    Perret B, Lefèvre S, Collet C (2009) A robust hit-or-miss transform for template matching in very noisy astronomical images. Pattern Recogn 42(11):2470–2480CrossRefzbMATHGoogle Scholar
  28. 28.
    Puissant A, Lefèvre S, Weber J (2008) Coastline extraction in vhr imagery using mathematical morphology with spatial and spectral knowledge. In: Proceedings of the XXIth ISPRS congress. BeijingGoogle Scholar
  29. 29.
    Raducanu B, Grana M (2000) A grayscale hit-or-miss transform based on levet sets. In: Proceedings of the 7th international conference on image processing, vol 2. Vancouver, Canada, pp 931–933Google Scholar
  30. 30.
    Ronse C (1990) Why mathematical morphology needs complete lattices. Sig Proc 21(2):129–154CrossRefzbMATHMathSciNetGoogle Scholar
  31. 31.
    Ronse C (1996) A lattice-theoretical morphological view on template extraction in images. J Vis Commun Image Represent 7(3):273–295CrossRefGoogle Scholar
  32. 32.
    Schaefer R, Casasent D (1995) Nonlinear optical hit-miss transform for detection. Appl Opt 34(20):3869–3882CrossRefGoogle Scholar
  33. 33.
    Serra J (1993) Anamorphoses and function lattices. In: E.R. Dougherty (ed.) Mathematical morphology in image processing, chap. 13, Marcel Dekker, New York, pp 483–523Google Scholar
  34. 34.
    Soille P (2002) Advances in the analysis of topographic features on discrete images. In: Proceedings of the 10th international conference on discrete geometry for computer imagery DGCI’02, lecture notes in computer sciences, vol 2301. pp. 175–186Google Scholar
  35. 35.
    Soille P (2002) On morphological operators based on rank filters. Pattern Recognit 35(2):527–535CrossRefzbMATHGoogle Scholar
  36. 36.
    Soille P (2003) Morphological image analysis: principles and applications. Springer, BerlinGoogle Scholar
  37. 37.
    Velasco-Forero S, Angulo J (2010) Hit-or-miss transform in multivariate images. In: proceedings of the advanced concepts for intelligent vision systems, lecture notes in computer sciences, vol 6474. Springer Verlag, pp 452–463Google Scholar
  38. 38.
    Velasco-Forero S, Angulo J (2011) Supervised ordering in r\(^{\text{ p }}\): application to morphological processing of hyperspectral images. IEEE Trans Image Process 20(11):3301–3308CrossRefMathSciNetGoogle Scholar
  39. 39.
    Weber J, Lefèvre S (2012) Spatial and spectral morphological template matching. Image Vis Comput 30(12):934–945CrossRefGoogle Scholar
  40. 40.
    Weber J, Lefèvre S, Gançarski P (2011) Interactive video segmentation based on quasi-flat zones. In: Proceedings of IEEE international symposium on image and signal processing and analysis. pp 265–270Google Scholar
  41. 41.
    Weber J, Tabbone S (2012) Symbol spotting for technical documents: an efficient template-matching approach. In: International conference on pattern recognition (ICPR). Tsukuba, JapanGoogle Scholar
  42. 42.
    Zhao D, Daut DG (1991) Morphological hit-or-miss transformation for shape recognition. J Vis Commun Image Represent 2(3):230–243CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media Dordrecht 2014

Authors and Affiliations

  • Sébastien Lefèvre
    • 1
  • Erchan Aptoula
    • 2
  • Benjamin Perret
    • 3
  • Jonathan Weber
    • 4
  1. 1.Université de Bretagne-Sud, IRISAVannesFrance
  2. 2.Okan UniversityIstanbulTurkey
  3. 3.Laboratoire d’Informatique Gaspard-MongeUniversité Paris-EstESIEE ParisFrance
  4. 4.Université de Lorraine NancyFrance

Personalised recommendations