how to display images using subplot in right corner of gui
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I = imread('11.jpg'); I = rgb2gray(I); m=1; srcFiles = dir('fruits\*.jpg'); % the folder in which ur images exists for j = 1 : 30
filename = strcat('fruits\',srcFiles(j).name);
filenam = strcat('fruits',srcFiles(j).name);
I = imread(filename);
%I=graythresh(I);
%I=imresize(I,[20,15]);
%fr=strcat('features',filenam,'.mat');
b=dlmread('features11.mat')
%b1=dlmread(fr)
b1=dlmread('frs.mat')
sum=0;
for i=1:8
g = (b(i) - b1(j,i))^2
sum=sum+g
end
dist = sqrt(sum);
E_dist(j)=dist
disp(E_dist);
sd=sort(E_dist)
if(E_dist(j) <.0061)
subplot(3,3,m)
imshow(I);
m=m+1;
end
end
%sd=sort(E_dist)
0 Kommentare
Antworten (2)
Dishant Arora
am 20 Jun. 2014
h = subplot('position' , [0.7,0.7,0.2,0.2]) % [left bottom width height]
imshow(imageName , 'parent' , h);
0 Kommentare
Image Analyst
am 20 Jun. 2014
subplot(3,3,3) will be in the upper right corner. The others, with values of 1-2 and 4-9 in the third argument, will be displayed at the other locations of a 3 by 3 grid of images.
2 Kommentare
Image Analyst
am 21 Jun. 2014
You already have the code - you wrote it. Just call subplot(3,3,3) right before you call imshow() and the image will get displayed in the upper right corner. Here it is again:
subplot(3,3,3);
imshow(yourImage);
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!