Why correlation used here?

Code:
function letter=readL(image)
load NewTemplates;
image=imresize(image,[42 24]);
comp = [];
for n=1:length(NewTemplates)
sem=corr2(NewTemplates{1,n},image)
comp=[comp sem];
end
vd=find(comp==max(comp));
Code for NewTemplate
letter=[A Afill B Bfill C D Dfill E F G H I J K L M N O Ofill P Pfill Q Qfill R Rfill S T U V W X Y Z]
number=[one two three four fourfill five six sixfill sixfill2 seven eight eightfill nine ninefill ninefill2 zero zerofill]
character=[letter number];
NewTemplates=mat2cell(character,42,[24 24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24]);
save ('NewTemplates','NewTemplates')
Problem:
i want to know why correlation is used here. i copied the code from somewhere else. But, i didn't find out what is this corelation actually doing. what value comes in NewTemplates{1,n}.
i make number plate recognition and extraction using matlab. In this project i used this correlation.
Please try to give answer.

Risposte (0)

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by