-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmsssim_report.m
29 lines (26 loc) · 913 Bytes
/
msssim_report.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
% This program finds msssim between images in two folders (one folder with
% ground truth images and other with predictions)
% The image name and the msssim values are then written to a .csv file
% Copyright (c) Prasanth "Prash" Ganesan
% Author email: <[email protected]>
clear
path = ['C:\Users\<your folder>'];
files1 = dir([path filesep 'ae']);
k=1;
for imgs = 1:length(files1)
current = files1(imgs).name;
if length(current)<5
continue
end
if ~strcmp(current(end-2:end),'png')
continue
end
imgt = imread([path filesep 'gt' filesep current]);
impr = imread([path filesep 'ae' filesep current]);
outputsheet{k,1} = current;
result = multissim(imgt,impr);
outputsheet{k,2} = result;
k=k+1;
end
out=cell2table(outputsheet,'VariableNames',{'Image Name','MSSSIM'});
writetable(out,[path filesep 'outable1.csv']);