Reading images from a folder ony by one
2 ビュー (過去 30 日間)
古いコメントを表示
Hi I have folder with bunch of images I am trying to read the images one by one from that folder, using imread command, any ideas how to do that? will appreciate thanks
0 件のコメント
回答 (2 件)
Honglei Chen
2012 年 2 月 15 日
You can use dir and filter out the files you need, for example, let's say you want to read in all the jpg files in the folder 'myimage'.
files = dir('myimage');
for m = 1:numel(files)
if strcmp(files(m).name(end-3:end),'.jpg')
x = imread(file(m).name,'jpg');
% process x
end
end
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!