Accessing multiple folders and extracting specific image files

조회 수: 11 (최근 30일)
dipon roy
dipon roy 2021년 10월 4일
답변: Image Analyst 2021년 10월 7일
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.

답변 (3개)

KSSV
KSSV 2021년 10월 7일

Walter Roberson
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

Image Analyst
Image Analyst 2021년 10월 7일
See the FAQ for the answer to that pllus lots of other frequent questions:

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by