summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m
diff options
context:
space:
mode:
authorleochanj105 <leochanj@live.unc.edu>2020-10-20 03:47:33 -0400
committerleochanj105 <leochanj@live.unc.edu>2020-10-20 03:47:33 -0400
commita32f220f06cc463e5b56e7fa0b1b1334d94d08f3 (patch)
tree4af4caa60074465d85fc2ef5cc1b23e74c064329 /SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m
parent79f30887129145e15e5172e36a7d7602859fc932 (diff)
matlab removed
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m83
1 files changed, 0 insertions, 83 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m
deleted file mode 100755
index cddcc12..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m
+++ /dev/null
@@ -1,83 +0,0 @@
1% RES = reconLpyr(PYR, INDICES, LEVS, FILT2, EDGES)
2%
3% Reconstruct image from Laplacian pyramid, as created by buildLpyr.
4%
5% PYR is a vector containing the N pyramid subbands, ordered from fine
6% to coarse. INDICES is an Nx2 matrix containing the sizes of
7% each subband. This is compatible with the MatLab Wavelet toolbox.
8%
9% LEVS (optional) should be a list of levels to include, or the string
10% 'all' (default). The finest scale is number 1. The lowpass band
11% corresponds to lpyrHt(INDICES)+1.
12%
13% FILT2 (optional) can be a string naming a standard filter (see
14% namedFilter), or a vector which will be used for (separable)
15% convolution. Default = 'binom5'. EDGES specifies edge-handling,
16% and defaults to 'reflect1' (see corrDn).
17
18% Eero Simoncelli, 6/96
19
20function res = reconLpyr(pyr, ind, levs, filt2, edges)
21
22if (nargin < 2)
23 error('First two arguments (PYR, INDICES) are required');
24end
25
26%%------------------------------------------------------------
27%% DEFAULTS:
28
29if (exist('levs') ~= 1)
30 levs = 'all';
31end
32
33if (exist('filt2') ~= 1)
34 filt2 = 'binom5';
35end
36
37if (exist('edges') ~= 1)
38 edges= 'reflect1';
39end
40%%------------------------------------------------------------
41
42maxLev = 1+lpyrHt(ind);
43if strcmp(levs,'all')
44 levs = [1:maxLev]';
45else
46 if (any(levs > maxLev))
47 error(sprintf('Level numbers must be in the range [1, %d].', maxLev));
48 end
49 levs = levs(:);
50end
51
52if isstr(filt2)
53 filt2 = namedFilter(filt2);
54end
55
56filt2 = filt2(:);
57res_sz = ind(1,:);
58
59if any(levs > 1)
60
61 int_sz = [ind(1,1), ind(2,2)];
62
63 nres = reconLpyr( pyr(prod(res_sz)+1:size(pyr,1)), ...
64 ind(2:size(ind,1),:), levs-1, filt2, edges);
65
66 if (res_sz(1) == 1)
67 res = upConv(nres, filt2', edges, [1 2], [1 1], res_sz);
68 elseif (res_sz(2) == 1)
69 res = upConv(nres, filt2, edges, [2 1], [1 1], res_sz);
70 else
71 hi = upConv(nres, filt2, edges, [2 1], [1 1], int_sz);
72 res = upConv(hi, filt2', edges, [1 2], [1 1], res_sz);
73 end
74
75else
76
77 res = zeros(res_sz);
78
79end
80
81if any(levs == 1)
82 res = res + pyrBand(pyr,ind,1);
83end