这是模板匹配相关部分
function letter=read_letter(img_r,num_letras)
% Computes the correlation between template and input image
% and its output is a string containing the letter.
% Size of 'imagn' must be 42 x 24 pixels
% Example:
% imagn=imread('D.bmp');
% letter=read_letter(imagn)
global templates
comp=[ ];
%while 1
for n=1:length(templates)
sem=corr2(templates{1,n},img_r);
comp=[comp sem];
end
vd=find(comp==max(comp));
if vd==1
letter='A';
elseif vd==2
letter='B';
........
else
letter='z';
end
模板匹配可以是各种类型。我的模板是否基于互相关匹配? 我想知道如何使用规范化互相关来识别字符
plz help
感谢