-
Notifications
You must be signed in to change notification settings - Fork 15
/
main222.m
42 lines (32 loc) · 1.32 KB
/
main222.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
30
31
32
33
34
35
36
37
38
39
40
41
42
p = parpool('local',5)
path = {'grd_vi5_ir10','grd_vi50_ir100','grd_vi500_ir1000','grd_vi5000_ir10000','grd_vi500_ir500','grd_vi1000_ir500','grd_vi1000_ir1000','grd_vi0_ir0'};
for fm=5:8
fused_path = ['../result/fusiongan/grd/',char(path(fm))];
disp(fused_path)
for epoch =1:29
parfor i=1:10
disp(['f ',char(path(fm)),' epoch:',num2str(epoch),' image:',num2str(i)]);
source_ir = ['../Test_ir/',num2str(i),'.bmp'];
source_vis = ['../Test_vi/',num2str(i),'.bmp'];
fused = [fused_path,'/epoch',num2str(epoch),'/',num2str(i),'.bmp'];
image1 = imread(source_ir);image1=image1(:,:,1);
image2 = imread(source_vis);image2=image2(:,:,1);
fused_image = imread(fused);
%disp(source_ir)
%disp(source_vis)
%disp(fused)
fused_image=fused_image(:,:,1);
image1 = imresize(image1,size(fused_image));
image2 = imresize(image2,size(fused_image));
% result(3) =i;
%result(4) = i;
result = evaluation(image1,image2,fused_image);
a(i,:,epoch) = result;
end
b(epoch,:) = sum(a(:,:,epoch))/10;
end
path_s1 = [fused_path,'/abc'];
disp(path_s1)
save(path_s1,'a','b');
end
delete(p)