Comparing two images by corr2 function
- by user3696860
I'm trying to compare two images by corr2 function on Matlab, it's not necess getting 1 end of function so I am using a treshold to find best images among template images. But sometimes it evaluate wrong image. How can I process them to find best match?
`
temp=[];
for i=1:10
res=sprintf('%d.png',i)
yol=fullfile('cember\taslak_cember\',res);
a=imread(yol);
b=imread('30_1.png');
a=rgb2gray(a);
b=rgb2gray(b);
a=im2bw(a,0.4);
b=im2bw(b,0.4);
c=corr2(a,b);
temp=[temp c];
end
max(temp)
`