function pushbutton1_Callback(hObject, eventdata, handles)
[filename, pathname]=uigetfile('*.*','Choose an iris image');
fig=imread(strcat(pathname,filename));
setappdata(handles.figure1,'IrisImg1',fig);
subplot(3,1,1);imshow(fig);
function pushbutton2_Callback(hObject, eventdata, handles)
[filename, pathname]=uigetfile('*.*','Choose an iris image');
fig=imread(strcat(pathname,filename));
setappdata(handles.figure1,'IrisImg2',fig);
subplot(3,1,2);imshow(fig);
function template1_Callback(hObject, eventdata, handles)
eye=getappdata(handles.figure1,'IrisImg1');
[local xc yc time]=localisation2(eye,0.2);
[ci cp out time]=thresh(local,50,200);
[ring,parr]=normaliseiris(local,ci(2),ci(1),ci(3),cp(2),cp(1),cp(3),'normal.bmp',100,300);
[temp th tv]=gen_templateVVV(parr);
setappdata(handles.figure1,'temp1',temp);
subplot(3,1,1);imshow(temp);
function template2_Callback(hObject, eventdata, handles)
eye=getappdata(handles.figure1,'IrisImg2');
[local xc yc time]=localisation2(eye,0.2);
[ci cp out time]=thresh(local,50,200);
[ring,parr]=normaliseiris(local,ci(2),ci(1),ci(3),cp(2),cp(1),cp(3),'normal.bmp',100,300);
[temp2 th tv]=gen_templateVVV(parr);
subplot(3,1,2);imshow(temp2);
temp1=getappdata(handles.figure1,'temp1');
hd=hammingdist(temp1, temp2);
if(hd<=0.2)
message=[ 'Hamming Distance b.w two images ' num2str(hd) ' Template are From Same Eye '];
msgbox(message);
else
message=[ 'Hamming Distance b.w two images ' num2str(hd) ' Template are not From Same eye '];
msgbox(message);
end
end
1 Comment
La Min Ko Ko (view profile)
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/195275-load-one-image-and-it-will-compare-with-all-images-in-database-folder-and-tell-does-it-match-with#comment_723067
Sign in to comment.