MATLAB Answers

read all images from subfolders

10 views (last 30 days)
fereshte on 21 May 2014
Commented: fereshte on 24 May 2014
hi.i have a folder with subfolders that each folder contains ten folder and these folders have 4 image files. how can resize all images with matlab code?


Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 21 May 2014
Combine the FAQ: with imresize() and you can do it. Create two filenames with sprintf() and fullfile(). Call imread() then imresize() then imwrite(). If you cannot do that, then post your code for us to fix.


Show 9 older comments
fereshte on 24 May 2014
i have this line in my code.i dont know why empty
Image Analyst
Image Analyst on 24 May 2014
Well figure it out. Step through one line at a time until you see the value of it vanish. See
In the meantime, I attach a program to recurse into subfolders getting image names.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!