read all .exr files
이전 댓글 표시
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.
답변 (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
shazwani seth
2016년 12월 7일
편집: Walter Roberson
2016년 12월 7일
Walter Roberson
2016년 12월 7일
Is each of the 94 images to be compared to each of the other 93 images, for a total of (93*94)/2 MSE values calculated? If not then which image is to be compared to which other image?
shazwani seth
2016년 12월 7일
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) ?
카테고리
도움말 센터 및 File Exchange에서 Read and Write Image Data from Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!