how can i read multiple images from a folder?
1 回表示 (過去 30 日間)
古いコメントを表示
sufeena kunhimon
2015 年 1 月 19 日
回答済み: Mohammad Abouali
2015 年 1 月 19 日
for i=1:10 %suppose there are 10 image file_name=dir(strcat('J:\multimedia\photo\')); % the path tht u hv imges im=imread(strcat('J:\multimedia\photo\',file_name(i).name)); imtool(im); end
what i give instead of name
0 件のコメント
採用された回答
Mohammad Abouali
2015 年 1 月 19 日
If you don't have that toolbox something like this would work:
for i=1:10
imList{i}=imread(strcat('J:\multimedia\photo\',file_name(i).name));
end
By the way, you better pass some image extension (when using dir), otherwise, you have to first check if what is in file_name is indeed an image before trying to reading it. You can use try/catch for that too.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Computer Vision with Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!