How to open multiple folders for processing?
22 views (last 30 days)
Show older comments
I need to process images in the folder, and each folder contains many images.. how can I process images which are in multiple folder, which has to be open one at a time, process folder of images and continue to open another folder to process set of images available in it...?like this it should open folders and continue to process until all the folder specified are done...
0 Comments
Answers (3)
Paul Shoemaker
on 26 Mar 2018
Hema,
Since you don't provide more concrete details about your specific circumstances (code, examples, purpose, etc), I will give a fairly broad answer that hopefully points you in the right direction.
Feel free to respond back with more details if the below ideas miss the mark.
Consider using the Matlab "dir" function to scan for files, which you can have run recursively in newer versions of Matlab. Another newer feature you could use is the "datastore" approach. Type help for either dir or datastore and you should get some good info to help with what you need.
Paul Shoemaker
4 Comments
Image Analyst
on 27 Mar 2018
See my attached demo to go into folders and subfolders getting filenames.
3 Comments
Navyasree K.S.
on 12 Dec 2020
i need to read the images,they are in differents folders in a same file.the imaages are .jpg.please help me
1 Comment
Image Analyst
on 12 Dec 2020
You can use imageDatastore(), or use dir('**/*.jpg');
See the FAQ for code samples.
Don't use JPG images for image analysis if you can possibly avoid it. They have bad compression artifacts. Use PNG.
See Also
Categories
Find more on Image Processing and Computer Vision 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!