Reading image files-batch
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I am trying to read image files from a folder (not Matlab working folder) but it does not work
Code: files = dir('C:\Users\ell\Desktop\segon\seg_array\Tv*.png') rgbl = imread('C:\Users\ell\Desktop\segn\seg_array\', files(1).name);
Can someone please tell me what is the problem.
Thanks
0 件のコメント
採用された回答
Image Analyst
2012 年 9 月 23 日
Please see the FAQ http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F for several ways. They'll have lines like this
folder = ''C:\Users\ell\Desktop\segon\seg_array';
filePattern = fullfile(folder, 'Tv*.png');
fileNames = dir(filePattern);
In the loop:
fullFileName = fullfile(folder, fileNames(k).name);
rgbImage = imread(fullFileName);
0 件のコメント
その他の回答 (1 件)
Rodrigo
2012 年 9 月 23 日
second line should read: imread(strcat('C:\Users\ell\Desktop\segn\seg_array\', files(1).name));
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!