-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.m
47 lines (38 loc) · 1003 Bytes
/
demo.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
43
44
45
46
47
% Author : Philipp Flotho
% Copyright 2021 by Philipp Flotho, All rights reserved.
clear
close all
run('set_path.m');
img = imread('img/monet_bridge.png');
%% computing the filtered images
options = get_diff_options;
f1_pm = perona_malik_diff(img, options);
options = get_aniso_diff_options();
options.diffusivity = 'weickert';
f1_edge = aniso_diff_filt(img, options);
options = get_aniso_coh_diff_options();
f1_coh = aniso_coh_diff_filt(img, options);
%% plotting:
subplot(2, 4, 1);
imshow(img);
title('raw frame');
subplot(2, 4, 2);
imshow(f1_pm);
title('nonlinear, isotropic diffusion');
subplot(2, 4, 3);
imshow(f1_edge);
title('edge enhancing diffusion');
figure(1);
subplot(2, 4, 4);
imshow(f1_coh);
title('coherence enhancing diffusion');
bb = 350;
subplot(2, 4, 5);
imshow(img(1:bb, end-bb-1:end, :));
subplot(2, 4, 6);
imshow(f1_pm(1:bb, end-bb-1:end, :));
subplot(2, 4, 7);
imshow(f1_edge(1:bb, end-bb-1:end, :));
figure(1);
subplot(2, 4, 8);
imshow(f1_coh(1:bb, end-bb-1:end, :));