how to display title for each category of image groups in single figure

2 views (last 30 days)
below is my code i have some N number of image classes and i need to display M number of images per class... and all N-Imageclass images have to be displayed in the same container figure(assume in fig1 only) and before displaying each category of images its image class has to be displayed .(pictorial represenatation is attached plz see)
for j=1:N
imgcategory=Qclass(j);
figure('Name','QUERY RESULTS');
sgt = sgtitle(imgcategory,'Color','blue');
sgt.FontSize = 12;
%sgtitle(Qclass);
for i=1:M
img=imread(cell2mat(Images(Indx(j,i)))); %complete path for each image is rettrieved and read as images in img
subplot(j,M,i);
imshow(img,[]);
end
end
in the above code i have placed the "Figure" within Jth forloop but in this case it generate N number of figures(1figure dialoguebox for each image class) that i dont want
kindly see the picture i have attached and i need to display like that kindly help me the code.

Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!