-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester.m
23 lines (22 loc) · 810 Bytes
/
tester.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function tester(img_size, path)
files = dir(path + '*.bmp');
for file = files'
img = imread(path + file.name);
if (size(img, 1) < img_size)
method_names = {'nearest', 'bilinear', 'bicubic', 'lanczos2', 'lanczos3'};
for i = 1:5
result = phase_separation(img, false, true, method_names(i));
name = file.name(1:end-4);
name = path + name + "_phase_separation_" + method_names(i) + ".bmp";
disp(name);
imwrite(result, name);
end
else
result = phase_separation(img, false);
name = file.name(1:end-4);
name = path + name + "_phase_separation.bmp";
disp(name);
imwrite(result, name);
end
end
end