how to display images using subplot in right corner of gui

5 vues (au cours des 30 derniers jours)
Anamika baruah
Anamika baruah le 20 Juin 2014
Commenté : Image Analyst le 21 Juin 2014
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)

Réponses (2)

Dishant Arora
Dishant Arora le 20 Juin 2014
h = subplot('position' , [0.7,0.7,0.2,0.2]) % [left bottom width height]
imshow(imageName , 'parent' , h);

Image Analyst
Image Analyst le 20 Juin 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 commentaires
Anamika baruah
Anamika baruah le 21 Juin 2014
i dont understand your code..please give me code to display multiple image in gui in the right part using subplot
Image Analyst
Image Analyst le 21 Juin 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);

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by