read all .exr files
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I'm using this user-defined function (exrread) to read .exr file but how can I read all of my .exr files at once? I try to use dir and put .* after the name of the file but I still couldn't get the list of all my files. k=exrread('file.exr'); This k value will be used to calculate MSE.
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 12 月 6 日
dinfo = dir('*.exr');
nfile = length(dinfo);
for K = 1 : nfile
thisfile = dinfo(K).name;
try
data = exrread(thisfile);
fprintf('Was able to read file "%s"\n', thisfile);
catch
fprintf('Was not able to read file "%s"\n', thisfile);
end
end
4 件のコメント
Walter Roberson
2016 年 12 月 7 日
Are the compressed files and the original files in different directories? Given the name of a compressed file, how can you determine the name of the original file (or the other way around) ?
参考
カテゴリ
Help Center および File Exchange で Biomedical Imaging についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!