This is my code and I trained two types of classes in which building as class 1 and a mountain as class 2. When I upload and try to identified the class then the output will always shows same output "detected class 1" . why it not identified class 2
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
%% Test Image
[fname,path]=uigetfile('.jpg','Provide a Image for Testing');
c=strcat(path,fname);
im=imread(fname);
imshow(im);
title('Test Image');
%% Fond out which Class it Belongs to
Ftest=FeatureStatistical(im);
%% Compare with Database
load db.mat
Ftrain=db(:,1:2);
ctrain=db(:,3);
for(i=1:size(Ftrain,1))
dist(1,:)=sum(abs(Ftrain(1,:)-Ftest));
end
min=min(dist);
if (min<3)
m=find(dist==min,1);
det_class=cstrain(m);
msgbox(strcat('dectected class',num2str(det_class)));
else
msgbox('This person is not register');
end
0 Commenti
Risposte (1)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!