read all .exr files
15 views (last 30 days)
Show older comments
shazwani seth on 6 Dec 2016
Commented: Walter Roberson on 7 Dec 2016
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.
Walter Roberson on 6 Dec 2016
dinfo = dir('*.exr');
nfile = length(dinfo);
for K = 1 : nfile
thisfile = dinfo(K).name;
data = exrread(thisfile);
fprintf('Was able to read file "%s"\n', thisfile);
fprintf('Was not able to read file "%s"\n', thisfile);
Walter Roberson on 7 Dec 2016
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) ?
Find more on Image Quality in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!