【发布时间】:2017-07-24 19:17:32
【问题描述】:
这是模板匹配相关部分
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
模板匹配可以有多种类型。我的模板匹配是基于互相关的吗? 我想知道如何使用归一化互相关来识别字符
请帮忙
谢谢
【问题讨论】:
标签: templates character matching