How do I make a function read all the images in a directory?
古いコメントを表示
I have an images directory. What function can be used to read all of the images in that directory?
回答 (3 件)
Matt Fig
2011 年 5 月 16 日
I = dir('*.jpg'); % or jpeg or whatever.
for ii = 1:length(I)
C{ii} = imread(I(ii).name); % Store in a cell array.
end
Now the first image is stored as C{1}, the second as C{2}, etc...
Doug Hull
2011 年 5 月 16 日
1 投票
カテゴリ
ヘルプ センター および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!