Template Matching Description: Template matching is an image processing technique for finding parts of a source image which match a predefined template image. Figure 1 gives an algorithm implementation of this technique tailored for the type of images to be used in this task implementation. The steps of the algorithm are given in a Matlab like pseudo code. main: im1= read_image(Templatelmage); im2=read_image(Sourcelmage); % apply template matching result-template_matching(im1,im2); display im1, im2, result template_matching: result-template_matching(Templatelmage,Sourcelmage): [r1, c1]=size(Sourcelmage); [r2, c2]=size(Templatelmage); TempSize=r2*c2; Minimum=1000000; % Correlation Matrix for i=1:(r1-r2+1) for j=1:(c1-c2+1) Nimage=Target(i:i+r2-1,j;j+c2-1); corr=sum(sum(abs(Nimage-Template)))/TempSize; corrMat(i,j)=corr; if corr