Fast Template Matching with Polynomials

Fast Template Matching with Polynomials

View metadata, citation and similar papers at core.ac.uk brought to you by CORE Fast Template Matching with Polynomials 著者 大町 真一郎 journal or IEEE Transactions on Image Processing publication title volume 16 number 8 page range 2139-2149 year 2007 URL http://hdl.handle.net/10097/46523 doi: 10.1109/TIP.2007.901243 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 16, NO. 8, AUGUST 2007 2139 Fast Template Matching With Polynomials Shinichiro Omachi, Member, IEEE, and Masako Omachi Abstract—Template matching is widely used for many applica- structures [20]. However, this strategy cannot always find the tions in image and signal processing. This paper proposes a novel most similar part in the fine matching since the other part may template matching algorithm, called algebraic template matching. be detected in coarse matching. This strategy can be easily Given a template and an input image, algebraic template matching efficiently calculates similarities between the template and the combined with other speed-up techniques. partial images of the input image, for various widths and heights. The fast Fourier transform (FFT) helps calculate cross corre- The partial image most similar to the template image is detected lations efficiently. The Fourier transform of the correlation of from the input image for any location, width, and height. In the two functions is the product of their Fourier transforms [14]. proposed algorithm, a polynomial that approximates the template The cross correlation of the template image and every part of image is used to match the input image instead of the template image. The proposed algorithm is effective especially when the the input image can be calculated simultaneously. The calcu- width and height of the template image differ from the partial lated non-normalized cross correlation can be efficiently nor- image to be matched. An algorithm using the Legendre polynomial malized by the algorithm provided by Lewis [10]. Uenohara is proposed for efficient approximation of the template image. This and Kanade proposed a method that combines the FFT and the algorithm not only reduces computational costs, but also improves Karhunen–Loeve transform for matching images with a large the quality of the approximated image. It is shown theoretically and experimentally that the computational cost of the proposed set of template images [23]. algorithm is much smaller than the existing methods. Another strategy to accelerate template matching is esti- mating the upper boundary of the similarity and eliminating Index Terms—Algebraic template matching, image processing, object detection, polynomial, template matching. unnecessary calculations. In this strategy, the reduction rate of the computational cost depends on the template and input images. Gharavi–Alkhansari combined this strategy with the I. INTRODUCTION coarse-to-fine strategy, and proposed a method for estimating a threshold in the coarse search and pruning the candidates in EMPLATE matching is one of the most common tech- the fine search [9]. Stefano and Mattoccia proposed an efficient Tniques used in signal and image processing. Template template matching algorithm by defining an upper-boundary matching applications include image retrieval [3], image recog- function for normalized cross correlation, using the inequality nition [13], image mosaicing or registration [2], object detection of arithmetic and geometric means [18]. [7], and stereo matching [17]. Given an input and a template In the field of stereo matching, given a left and a right image, image, the matching algorithm finds the partial image that their corresponding points can be found. The windows in both most closely matches the template image in terms of specific images move together in the same way, and similarities between criterion, such as the Euclidean distance or cross correlation these windows are calculated. In this situation, an incremental [5]. However, conventional template matching methods using a calculation scheme is effective [8], [17]. That is, if the simi- template image consume a large amount of computational time. larity of a region is already calculated, the similarity of an over- A number of techniques have been investigated with the intent lapped region can be calculated using only the differences in of speeding up the template matching [8]–[10], [15]–[18], [20], these regions. However, this situation is different from template [23], [24]. matching where the template is fixed and the location of the par- The coarse-to-fine strategy, proposed by Rosenfeld and tial image in the input image varies. VanderBrug [15], [24], is a well-known approach to reduce Approximation of the image by a function may reduce the the computational cost of template matching. This strategy computational cost. Schweitzer et al. proposed an efficient tem- uses a low-resolution template and an input image for initial plate matching algorithm that introduced integral images and coarse matching. Matching between high-resolution template approximated the input image with second- or third-order poly- and input images is applied for fine matching only when there nomials [16]. is high similarity in the coarse matching. Tanimoto proposed All of these methods handle a fixed-size template image. a hierarchical search algorithm and introduced pyramid data Some methods (e.g., those using the FFT or incremental al- gorithms mentioned above) efficiently calculate similarities Manuscript received September 28, 2006; revised February 25, 2007. This between a template and the fixed-size partial images at various work was supported in part by the Ministry of Education, Science, Sports and locations. However, if the width and height of the partial image Culture, Grant-in-Aid for Scientific Research, 18500125, 2006. The associate to be detected within the input image are unknown, we must editor coordinating the review of this manuscript and approving it for publica- tion was Dr. Eli Saber. change them and then repeat the procedure. S. Omachi is with the Graduate School of Engineering, Tohoku University, This paper proposes a novel template matching method, Sendai-shi 980-8579, Japan (e-mail: [email protected]). called algebraic template matching. Algebraic template M. Omachi is with the Faculty of Science and Technology, Tohoku Bunka Gakuen University, Sendai-shi 981-8551, Japan (e-mail: [email protected]). matching (ATM) efficiently calculates similarities between Digital Object Identifier 10.1109/TIP.2007.901243 the template and partial images of the input image of various 1057-7149/$25.00 © 2007 IEEE Authorized licensed use limited to: TOHOKU UNIVERSITY. Downloaded on March 08,2010 at 01:58:40 EST from IEEE Xplore. Restrictions apply. 2140 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 16, NO. 8, AUGUST 2007 widths and heights. First, the template image is approximated The least-square method finds the coefficients of that by a high-order polynomial. Then, this polynomial is used minimizes to match an input image instead of the template image. We propose an efficient incremental algorithm for calculating the similarities using this polynomial. According to the authors, (2) there is no algorithm that calculates similarities incrementally like the proposed algorithm by changing the widths and heights of the partial image. by solving the following linear equations: The polynomial has been studied as a tool for representing shapes [21], [22]. However, in many cases, the approximation (3) by the polynomial is used for feature extraction. That is, the coefficients of the polynomial that represent the shape are re- garded as the features of the shape. Our approach approximates where is the number of coefficients . the image with a high-order polynomial used as a template. This The computational costs of obtaining these equations and approach has not been previously considered for the following solving them are and , respectively. There- reasons. fore, the total computational cost is . As the 1) Approximation by a high-order polynomial using the con- value of increases, the approximation requires more compu- ventional least-square method requires large amounts of tation. Moreover, in order to solve the linear equations, inverse computational time, and often fails due to truncation error. matrix calculation or a similar approach is needed. The trun- 2) There is no use in representing the image with a polyno- cation error of the inverse matrix calculation may degrade the mial, as an algorithm to efficiently use the polynomial had quality of the approximation. not been found. This paper uses an algorithm based on the Legendre polynomial B. Legendre Polynomials to solve the first problem. The latter problem is addressed with Legendre polynomials [1] are orthogonal functions that are an efficient incremental calculation algorithm. defined in . The Legendre polynomial of degree The organization of the rest of the paper is as follows. First, , is written as in Section II, we present an algorithm for approximating an image with a polynomial. In Section III, we propose our tem- plate matching algorithm, called algebraic template matching, (4) which uses the polynomial. In Section IV, we describe the pro- cessing time and matching accuracy results to show the effec- tiveness of the proposed algorithm. Equation (4) shows that has only even powers of for even , and odd powers for odd . It is known that the following formulae are satisfied: II. IMAGE REPRESENTATION BY POLYNOMIALS According to the Stone-Weierstrass theorem [6], any 2-D continuous function defined in closed intervals can be ap- proximated by a polynomial with two variables. However, the (5) approximation of an image by a polynomial using the classical least-square method requires a great deal of computation and The set is orthogonal because the following equa- often fails due to truncation error. Thus, we propose an approx- tion is satisfied: imation algorithm that uses the Legendre polynomial. (6) otherwise A. Approximation by the Least-Square Method Since the set is also a complete system, any function de- fined in can be expanded by the Legendre polyno- Given an gray-scale image, a simple way of finding mials as a polynomial that approximates the image is to use the least- square method.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us