summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/upBlur.m
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/upBlur.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/upBlur.m52
1 files changed, 0 insertions, 52 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/upBlur.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/upBlur.m
deleted file mode 100755
index 948c2e1..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/upBlur.m
+++ /dev/null
@@ -1,52 +0,0 @@
1% RES = upBlur(IM, LEVELS, FILT)
2%
3% Upsample and blur an image. The blurring is done with filter
4% kernel specified by FILT (default = 'binom5'), which can be a string
5% (to be passed to namedFilter), a vector (applied separably as a 1D
6% convolution kernel in X and Y), or a matrix (applied as a 2D
7% convolution kernel). The downsampling is always by 2 in each
8% direction.
9%
10% The procedure is applied recursively LEVELS times (default=1).
11
12% Eero Simoncelli, 4/97.
13
14function res = upBlur(im, nlevs, filt)
15
16%------------------------------------------------------------
17%% OPTIONAL ARGS:
18
19if (exist('nlevs') ~= 1)
20 nlevs = 1;
21end
22
23if (exist('filt') ~= 1)
24 filt = 'binom5';
25end
26
27%------------------------------------------------------------
28
29if isstr(filt)
30 filt = namedFilter(filt);
31end
32
33if nlevs > 1
34 im = upBlur(im,nlevs-1,filt);
35end
36
37if (nlevs >= 1)
38 if (any(size(im)==1))
39 if (size(im,1)==1)
40 filt = filt';
41 end
42 res = upConv(im,filt,'reflect1',(size(im)~=1)+1);
43 elseif (any(size(filt)==1))
44 filt = filt(:);
45 res = upConv(im,filt,'reflect1',[2 1]);
46 res = upConv(res,filt','reflect1',[1 2]);
47 else
48 res = upConv(im,filt,'reflect1',[2 2]);
49 end
50else
51 res = im;
52end