I need help please
显示 更早的评论
please I have a problem in this code i want to convert an image and to compare it with other images:
function Couleur_Callback(hObject, eventdata, handles)
global a;
disp (a);
I1=rgb2gray(a);
histo=imhist(I1);
r=dir('base');
[I c]=size(r);
j=1;
for i=3:1
ch1=r(i).name;
disp(ch1);
img=stract('base\',ch1);
disp(img);
imagetestt=imread(img);
imagetest2=rgb2gray( imagetestt);
imagetest=imhist(imagetest2);
valeur=intersectionhisto(histo,imagetest);
resulat(j)=valeur;
j=j+1;
end
resultatFinal=sort(resulat,'descend')
for i=1:j-1
X=find(resultatFinal(i)==resultat)
indice(i)=X(1);
end
for i=1:6
nomImage=stract('base\',num2str(indice(i)),'.jpg');
I=imread(nomImage);
subplot(6,1,i);
imshow(I);
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!