Abstract
Given a large text image and a small template image, the Template Matching Problem is that of finding every location within the text which looks like the pattern. This problem, which has received attention for low-level image processing, has been formalized by defining a distance metric between arrays of pixels and finding all subarrays of the large image which are within some threshold distance of the template. These so-called metric methods tends to be too slow for many applications, since evaluating the distance function can take too much time. We present a method for quickly eliminating most positions of the text from consideration as possible matches. The remaining candidate positions are then evaluated one by one against the template for a match. We are still guaranteed to find all matching positions, and our method gives significant speed-ups. Finally, we consider the problem of matching a dictionary of templates against a text. We present methods which are much faster than matching the templates individually against the input image.
Similar content being viewed by others
References
D.H. Ballard and C.M. Brown, Computer Vision. Prentice-Hall Inc., 1982.
D.I. Barnea and H.F. Silverman, “A class of algorithms for fast digital image registration,” IEEE Trans. Comput., Vol. 21, pp. 179–186, 1972.
R. Boyle and R. Thomas, Computer Vision A First Course. Blackwell Scientific Publications, 1988.
A.J. Broder, “Strategies for efficient incremental nearest neighbor search,” Pattern Recognition, Vol. 23, No. 12, pp. 171–178, 1990.
T. Chiueh, “Content-based image indexing,” in Proceedings of the Twentieth International Conference on Very Large Databases, Santiago, Chile, 1994, pp. 582–593.
B.V. Dasarathy, “Visiting nearest neighbors-a survery of nearest neighbor pattern classification techniques,” in Proceedings of the International Conference on Cybernetics and Society, September 1977, IEEE, pp. 630–636.
B.V. Dasarathy, Nearest Neighbor Pattern Classification Techniques, IEEE Computer Society Press, 1991.
A. Faragó, T. Linder, and G. Lugosi, “Fast nearest neighbor search in dissimilarity spaces,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 15, pp. 957–962, 1993.
M. Flickner, H. Sawhney, W. Niblack, J. Ashley, Q. Huang, B. Dom, M. Gorkani, J. Hafner, D. Lee, D. Petkovic, D. Steele, and P. Yanker, “Query by image and video content: the qbic,” Computer, Vol. 28, pp. 23–32, September 1995.
K. Fukunaga and P. Narendra, “A branch and bound algorithm for computing k-nearest neighbors,” IEEE Transactions on Computers, Vol. 24, pp. 750–753, 1975.
R. Jain, S.J. Murthy, and P.L.-J. Chen, “Similarity measures for image databases,” SPIE, Vol. 2420, pp. 58–65, 1995.
B.S. Kim and S.B. Park, “A fast k-nearest neighbor finding algorithm based on the ordered partition,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 8, pp. 761–766, November 1986.
W. Niblack, Digital Image Processing. Prentice Hall International (UK), Birkeroed, Denmark, 1986.
W. Niblack, “Comments on cross correlation vs. differencing methods,” Personal Communication, 1996.
H. Niemann and R. Goppert, “An efficient branch-and-bound nearest neighbour classifier,” Pattern Recognition Letters, Vol. 7, pp. 67–72, 1988.
W.K. Pratt, “Correlator techniques of image registration,” IEEE Trans. Aerosp. Electron. Syst., Vol. 10, pp. 353–358, 1974.
H.K. Ramapriyan, “A multilevel approach to sequential detection of pictorial features,” IEEE Trans. Comput., Vol. 25, pp. 66–78, 1976.
E. Vidal, H. Rulot, F. Casacuberta, and J. Bened´i, “Searching for nearest neighbors in constant average time with applications to discrete utterance speech recognition,” in Proceedings of International Conference on Pattern Recognition, October 1986, IEEE, pp. 808–810.
R. Wong, “Sequential pattern recognition as applied to scene matching,” Ph.D. thesis, Univ. of Southern California, L.A., December 1976.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Cha, SH. Efficient Algorithms for Image Template and Dictionary Matching. Journal of Mathematical Imaging and Vision 12, 81–90 (2000). https://doi.org/10.1023/A:1008309026555
Issue Date:
DOI: https://doi.org/10.1023/A:1008309026555