imshow multiple pgm files from different subfolders

조회 수: 1 (최근 30일)
monkey_matlab
monkey_matlab 2016년 11월 11일
댓글: Hafizullah ozgur 2017년 4월 7일
Hello,
I have 40 sub folders each with 10 images per subfolder. Each pgm image is 112 x 92.
I wanted to generate 8 figures. Each figure should have 10 images per line (= 1 folder per line). Therefore, each figure will contain 5 folders, giving a total of 50 images per figure. How do I go about showing these images in this specific format?
Here is the code to extract the images:
faces=zeros(10304,total_number_images);
for i=1:numFolders
cd(strcat('s',num2str(i)));
for j=1:number_images
a=imread(strcat(num2str(j),'.pgm'));
imshow(a);
hold on
faces(:,number_images*(i-1)+j)=a(:);
end
cd ..
end
hold off
I have also attached the first folder of images.
Thanks for your time and help.
  댓글 수: 1
Hafizullah ozgur
Hafizullah ozgur 2017년 4월 7일
imshow images from subfolders of a folder. Can you help me how to imshow images from subfolders of a folder. for example there is a folder and in the folder there 241 folders, each folder contains 5 or more images. I want to process them or show them in matlab . do you have codes for this problem. i will be glad for helping

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2016년 11월 11일
imshow() is supposed to be able to show images. If it doesn't work for your pgm images, then call tech support.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by