Skip to main content

A Fast Algorithm for Template Matching

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNIP,volume 4142))

Abstract

This paper presents a template matching technique to identify the location and orientation of an object by a fast algorithm. The fundamental principle in template matching is to minimize a potential energy function, which is a quantitative representation of the ’closeness’ of a defined object (template) relative to a portion of an image. However, the computation of potential energy suffers a major drawback in efficiency. A significant amount of the processing time is dedicated to match the information from the template to the image. This work proposes an alternative way to match the template and the image that reduces the number of operations from O(nm) to O(n) in calculating the potential energy of a template and an image that have n and m number of edge pixels, respectively. This work illustrates this approach by template edge matching which uses the edge information to perform the template matching. The experimental results show that while the proposed method produces a slightly larger error in the resulting template location, the processing time is decreased by a factor of 4.8 on average.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Jain, A.K., Zhong, Y., Dubuisson-Jolly, M.-P.: Deformable Template Models: A Review. Signal Processing 71(2), 109–129 (1998)

    Article  MATH  Google Scholar 

  2. Jain, A.K., Zhong, Y., Lakshmanan, S.: Object Matching Using Deformable Templates. IEEE transactions on pattern analysis and machine intelligence 18(3), 267–278 (1996)

    Article  Google Scholar 

  3. Gavrila, D.M.: Multi-feature Hierarchical Template Matching Using Distance Transforms. In: Proc. of the International Conference on Pattern Recognition, pp. 439–444. Brisbane (1998)

    Google Scholar 

  4. Ford, G.E., Paglieroni, D.W., Tsujimoto, E.M.: The position-orientation masking approach to parametric search for template matching. IEEE Transactions on Pattern Analysis and Machine Intelligence 16(7), 740–747 (1994)

    Article  Google Scholar 

  5. Huttenlocher, D.: Monte carlo comparison of distance transform based matching measures. In: ARPA Image Understanding Workshop, pp. 1179–1183 (1997)

    Google Scholar 

  6. Huttenlocher, D., Klanderman, G., Rucklidge, W.J.: Comparing images using the hausdorff distance. IEEE Transactions on Pattern Analysis and Machine Intelligence 15(9), 850–863 (1993)

    Article  Google Scholar 

  7. Rucklidge, W.: Locating objects using the hausdorf distance. In: International Conference on Computer Vision, pp. 457–464 (1995)

    Google Scholar 

  8. Gastaldo, P., Zunino, R.: Hausdorff distance for target detection. In: IEEE International Symposium on Circuits and Systems, vol. 5(26-29), pp. 661–664 (2002)

    Google Scholar 

  9. Hutterlocher, D.P., Klanderman, G.A., Rucklidge, W.J.: Comparing images using the Hausdorff Distance. IEEE Transactions on Pattern Analysis and Machine Intelligence 15(9), 850–863 (1993)

    Article  Google Scholar 

  10. Lalonde, M., Beaulieu, M., Gagnon, L.: Fast and robust optic disc detection using pyramidal decomposition and Hausdorff-based template matching. IEEE Transactions on Medical Imaging 20(11), 1193–1200 (2001)

    Article  Google Scholar 

  11. Brown, L.G.: A survey of image registration techniques. ACM Computing Surveys 24(4), 325–376 (1992)

    Article  Google Scholar 

  12. Schonfeld, D.: On the relation of order-statistics filters and template matching: optimal morphological pattern recognition. IEEE Transactions on Image Processing 9(5), 945–949 (2000)

    Article  Google Scholar 

  13. Darrell, T., Essa, I.A., Pentland, A.P.: Task-Specific Gesture Analysis in Real-Time Using Interpolated Views. IEEE Transactions on Pattern Analysis and Machine Intelligence 18(12), 1236–1242 (1996)

    Article  Google Scholar 

  14. Brunelli, R., Poggio, T.: Template Matching: Matched Spatial Filter and Beyond, A.I. Memo 1549, Massachusetts Inst. of Technology (1995)

    Google Scholar 

  15. Fredriksson, K., Ukkonen, E.: Faster template matching without FFT. In: International Conference on Image Processing, vol. 1(7–10), pp. 678–681 (2001)

    Google Scholar 

  16. Olson, C.F.: Maximum-likelihood image matching. IEEE Transactions on Pattern Analysis and Machine Intelligence 24(6), 853–857 (2002)

    Article  MathSciNet  Google Scholar 

  17. Wang, X.W., Wang, Z., Sun, J.T., Zhang, H.M.: The correlation template matching algorithm based TD filter and ESO filter. In: International Conference on Machine Learning and Cybernetics, vol. 9(18-21), pp. 5361–5365 (2005)

    Google Scholar 

  18. Farag, A., El-Baz, A., Gimelfarb, G., Falk, R.: Detection and recognition of lung nodules in spiral CT images using deformable templates and Bayesian post-classification. In: International Conference on Image Processing, vol. 5(24-27), pp. 2921–2924 (2004)

    Google Scholar 

  19. Farag, A.A., El-Baz, A., Gimelfarb, G., Falk, R.: Detection and recognition of lung abnormalities using deformable templates. In: International Conference on Pattern Recognition, vol. 3(23-26), pp. 738–741 (2004)

    Google Scholar 

  20. Huggins, J.E., Levine, S.P., Fessler, J.A., Sowers, W.M., Pfurtscheller, G., Graimann, B., Scholegl, A., Minecan, D.N., Kushwaha, R.K., BeMent, S.L., Sagher, O., Schuh, L.A.: Electrocorticogram as the basis for a direct brain interface: Opportunities for improved detection accuracy. In: First International IEEE EMBS Conference on Neural Engineering, vol. 20-22, pp. 587–590 (2003)

    Google Scholar 

  21. Kim, S.H., Tizhoosh, H.R., Kamel, M.: Choquet integral-based aggregation of image template matching algoritms. In: 22nd International Conference of the North American Fuzzy Information Processing Society, vol. 24-26, pp. 143–148 (2003)

    Google Scholar 

  22. Amir, A., Butman, A., Crochemore, M., Landau, G.M., Schaps, M.: Two-dimensional pattern matching with rotations. In: Baeza-Yates, R., Chávez, E., Crochemore, M. (eds.) CPM 2003. LNCS, vol. 2676, pp. 17–31. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  23. Fredriksson, K., Ukkonen, E.: Combinatorial methods for approximate image matching under translations and rotations. Patt. Rec. Lett. 20(11-13), 1249–1258 (1999)

    Article  Google Scholar 

  24. Torczon, V., Lewis, M., Trosset, M.: Direct Search Methods: Then and now. Journal of computational and applied Mathematics 124(1-2), 191–207 (2000)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kohandani, A., Basir, O., Kamel, M. (2006). A Fast Algorithm for Template Matching. In: Campilho, A., Kamel, M. (eds) Image Analysis and Recognition. ICIAR 2006. Lecture Notes in Computer Science, vol 4142. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11867661_36

Download citation

  • DOI: https://doi.org/10.1007/11867661_36

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-44894-5

  • Online ISBN: 978-3-540-44896-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics