Accessing multiple folders and extracting specific image files
16 次查看(过去 30 天)
显示 更早的评论
I have 15 folders and in each of them I have 997 sub-folders.In these subfolders I have multiple folders containing .png image folders and the .jpeg of those images. I want to extract specific .png files that has the name ending with '_out' in the jpeg.
0 个评论
回答(3 个)
Walter Roberson
2021-10-7
projectdir = 'path/to/place/with/15/folders';
dinfo = dir( fullfile(projectdir, '**', '*_out.png') );
fullnames = fullfile({dinfo.folder}, {dinfo.name});
fullnames will now be a cell array of character vectors naming all the png files that end with '_out' .
You did not give any information about what you might mean by "extract" for this purpose
0 个评论
Image Analyst
2021-10-7
See the FAQ for the answer to that pllus lots of other frequent questions:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!