diff options
author | leochanj <jbakita@cs.unc.edu> | 2020-10-21 01:52:54 -0400 |
---|---|---|
committer | leochanj <jbakita@cs.unc.edu> | 2020-10-21 01:52:54 -0400 |
commit | 25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 (patch) | |
tree | ba80e76d25d9ca9486092e2f6b6d76f0e3352bf7 /SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m | |
parent | e2b50015cebdfba68699abd6e8575e38230f5a78 (diff) |
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m')
-rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlab/reconLpyr.m | 83 |
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 | |||
20 | function res = reconLpyr(pyr, ind, levs, filt2, edges) | ||
21 | |||
22 | if (nargin < 2) | ||
23 | error('First two arguments (PYR, INDICES) are required'); | ||
24 | end | ||
25 | |||
26 | %%------------------------------------------------------------ | ||
27 | %% DEFAULTS: | ||
28 | |||
29 | if (exist('levs') ~= 1) | ||
30 | levs = 'all'; | ||
31 | end | ||
32 | |||
33 | if (exist('filt2') ~= 1) | ||
34 | filt2 = 'binom5'; | ||
35 | end | ||
36 | |||
37 | if (exist('edges') ~= 1) | ||
38 | edges= 'reflect1'; | ||
39 | end | ||
40 | %%------------------------------------------------------------ | ||
41 | |||
42 | maxLev = 1+lpyrHt(ind); | ||
43 | if strcmp(levs,'all') | ||
44 | levs = [1:maxLev]'; | ||
45 | else | ||
46 | if (any(levs > maxLev)) | ||
47 | error(sprintf('Level numbers must be in the range [1, %d].', maxLev)); | ||
48 | end | ||
49 | levs = levs(:); | ||
50 | end | ||
51 | |||
52 | if isstr(filt2) | ||
53 | filt2 = namedFilter(filt2); | ||
54 | end | ||
55 | |||
56 | filt2 = filt2(:); | ||
57 | res_sz = ind(1,:); | ||
58 | |||
59 | if 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 | |||
75 | else | ||
76 | |||
77 | res = zeros(res_sz); | ||
78 | |||
79 | end | ||
80 | |||
81 | if any(levs == 1) | ||
82 | res = res + pyrBand(pyr,ind,1); | ||
83 | end | ||