Actually i have find out eucledian distance of the query image and the images in the databases..Now my question is that how to find out the accuracy in the images using matlab..Please help me.Thank you.
i have done the program given below..please help me to find the accuracy in all the images..thank you.
clc;
G=imread('lion1.jpg');
G1=rgb2gray(G);
H = adapthisteq(G1);
[rows cols]=size(G1);
[c1,s1]=wavedec2(H,1,'db1');
%disp(c1);
X=c1;
figure,imshow(G);
%figure,imshow(H);
fileFolder=fullfile(matlabroot,'toolbox','images','imda');
dirOutput=dir(fullfile(fileFolder,'*.jpg'));
fileNames={dirOutput.name}
n=numel(fileNames)
g=zeros(1,n);
for k = 1 : n
fileNames1=strcat('fullfile(fileFolder)',fileNames(k))
I = imread(fileNames{k});
I1=rgb2gray(I);
J = adapthisteq(I1);
J = imresize(J, [rows cols]);
[c2,s2]=wavedec2(J,1,'db1');
%disp(c2);
Y=c2;
%[rows1 cols1]=size(J);
E_distance = sqrt(sum((X-Y).^2));
g(1,k)=E_distance;
if g(1,k)==0
w=k;
end
%figure,imshow(I);
%figure,imshow(J);
end
disp(g);
%II=imread(fileNames{w});
%figure, imshow(II);
[sorted,IX] = sort(g);
bestFiveImages = IX(1:5);
for I = 1:length(bestFiveImages)
figure;imshow(imread(fileNames{bestFiveImages(I)}));
end