In addition to SAD and SSD, NCC is also popular similarity measure. NCC measure is morerobust than SAD and SSD under uniformillumination changes, so the NCC measure has beenwidely used in object recognition and industrialinspection. The correlation-like approach is very popular for image registration . The traditional NCC needs to compute the numerator anddenominator, which is very time-consuming. Lewis employed the sum table scheme to reduce thecomputation in the denominator. After building thesum table for the source image, the block squaredintensity sum for a candidate at the position (x,y) inthe source image can be calculated very efficientlywith four simple operations. Although the sum tablescheme can reduce the computation of thedenominator in NCC, it is strongly demanded tosimplify the computation involved in the numerator of NCC. Shou and Shang-Hong  proposed a fast pattern matching algorithm based on NCC criterion by combining adaptive multilevel partition with thewinner update scheme to achieve very efficientsearch. This winner update scheme is applied inconjunction with an upper bound for the crosscorrelation derived from Cauchy-Schwarz inequality.Maclean and Tsotsos  introduced a techniques for fast pattern recognition using normalized grey-scalecorrelation (NCC). While NCC has traditionally beenslow due to computational intensity issues, theyintroduced both a pyramid structure and localestimate of the correlation surface gradient allows for recognition in 10-50 ms using modest microcomputer hardware. They proved that the execution time of your technique was faster than NCC technique.In this paper, we introduce a fast templatematching technique. In this technique we use the pyramid structure through compressing both sourceimage and template image a predefined number of levels. Then the SAD measure is applied for eachlevel to obtain the approximate value for the correctmatch. Finally, we can reach the correct match for template in the source. The rest of the paper isstructured as follows. Section 2 provides details of the proposed schemes. Section 3 describes theexperimental investigations, and the overallconclusions are presented in Section 4.
2. The proposed method
In this section we introduce the problemformulation and some basic solutions to solve that problem. Also we introduce the image pyramidconcept which is used in the proposed methodfollowed by description of our proposed method.
2.1 Problem formulation
The simple definition of template image isthe following:
Given a source image S and a templateimage T ,figure (1), where the dimension of S areboth larger than T, output whether S contains a subset image I where I and T are suitably similar in pattern and if such I exists, output the location of I inS. The location of I in S, will be referred to as thelocation of the closest match, and will be defined asthe pixel index of the top-left corner of I in S.
For the actual implementation of anytemplate matching algorithm, there are two basicsteps: the model registration step, and the searchingstep. During model registration, the template image isstored in memory and any required preprocessing isdone prior to any searching. In the search step, thesearch image is inputted, the template pattern issearch, and the resulting values are outputted. Theexecution time for a template search excludes theexecution time for model registration.
(b)Figure (1) Cat image: (a) Source image containing the template pattern (b) Template image
The NCC computes the likeliness of a match by performing a discrete 2-D correlation of thetemplate image matrix at every possible location inthe source image matrix. Let S(x,y) denote theintensity value of the source image of the size p×q atthe point (x,y). The pattern is represented by a giventemplate T of the size m×n. A common way tocalculate the position (i
) of the pattern in theimage S is to evaluate the normalized crosscorrelation value λ(i,j) at each point (i,j) for S and thetemplate T, which has been shifted by i steps in the xdirection and by j steps in the y direction. Equation(1) gives a basic definition for the normalized crosscorrelation coefficient.
,=∑ +, +− ̅ ,,−
∑ +, +− ̅ ,
0 ≤ < −,0 ≤ < −
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 10, No. 4, April 201212http://sites.google.com/site/ijcsis/ISSN 1947-5500