diff options
author | Jinwei Zhao <[email protected]> | 2016-01-21 19:53:38 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2016-01-21 19:53:38 +0800 |
commit | 2c425c06f30ac4be6b0b6d35aab6d390b169efa4 (patch) | |
tree | 8aaa2389c0c733f083024a6dc7311b5a07f26442 /MATLAB/demo.m | |
parent | ba1633c59d98341b378ca3da61e9531b5f253c22 (diff) | |
download | GuidedFilter-2c425c06f30ac4be6b0b6d35aab6d390b169efa4.tar.gz |
add MATLAB code
Diffstat (limited to 'MATLAB/demo.m')
-rwxr-xr-x | MATLAB/demo.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MATLAB/demo.m b/MATLAB/demo.m new file mode 100755 index 0000000..3324f2d --- /dev/null +++ b/MATLAB/demo.m | |||
@@ -0,0 +1,10 @@ | |||
1 | close all; | ||
2 | |||
3 | I = im2double(imread('guide.png')); | ||
4 | p = im2double(imread('src.bmp')); | ||
5 | r = 3; % try r=2, 4, or 8 | ||
6 | % eps = 0.2^2; % try eps=0.1^2, 0.2^2, 0.4^2 | ||
7 | eps = 1e-6; | ||
8 | |||
9 | q = guidedfilter_color(I, p, r, eps); | ||
10 | imwrite(q, 'matlab.bmp'); | ||