How to open multiple folders for processing?
27 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (3 件)
Paul Shoemaker
2018 年 3 月 26 日
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
Image Analyst
2018 年 3 月 27 日
See my attached demo to go into folders and subfolders getting filenames.
3 件のコメント
Navyasree K.S.
2020 年 12 月 12 日
i need to read the images,they are in differents folders in a same file.the imaages are .jpg.please help me
1 件のコメント
Image Analyst
2020 年 12 月 12 日
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.
参考
カテゴリ
Help Center および File Exchange で Image Processing and Computer Vision についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!