NORMALIZED CROSS CORRELATION AS A SIMILARITY MEASURE TO FIND SCORE MATRIX

조회 수: 1 (최근 30일)
Hello everyone. I've 2 face images (2 probes) and 100 templates (face images or gallery). I want to compare each probe with all the 100 galleries. For eg, Probe 1 will be compared with 100 galleries, then probe2 will be compared to 100 galleries. I'm using normalized cross correlation for this purpose. The size of each image is 50*50. Although, I'm not sure about the further steps (What to be done after getting correlation matrix). I found the maximum number in the corrleation matrix, but I dont know how to get the score matrix for calculating genuine and impostor scores. I wrote this code, although I don't think this is right. Please can someone explain this?
%Storing the first two probe images
a1=imread('C:\Users\ritvikpalvankar7\Desktop\Fundamentals of Biometric identification\HW3\probeset\subject1_img2.pgm');
a2=imread('C:\Users\ritvikpalvankar7\Desktop\Fundamentals of Biometric identification\HW3\probeset\subject1_img3.pgm');
%Storing the gallery image one by one
genuine_score = [];
imposter_score = [];
Score1 = zeros(100,100);
Score2 = zeros(100,100);
for i=1:100
a3=imread("C:\Users\ritvikpalvankar7\Desktop\Fundamentals of Biometric identification\HW3\galleryset\subject"+i+"_img1.pgm");
col=1;
c1 = normxcorr2(a3,a1);
c2 = normxcorr2(a3,a2);
v1 = max(max(c1));
v2 = max(max(c2));
Score1(i,col) = v1;
col=col+1;
Score1(i,col) = v2;
col=col+1;
if i==j
genuine_score = [genuine_score v1];
genuine_score = [genuine_score v2];
else
imposter_score = [imposter_score v1];
imposter_score = [imposter_score v2];
end
if v1 > v2
Score2(i,col-2) = v1;
else
Score2(i,col-2) = v2;
end
Score2 = Score2(:,any(Score2));
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by