summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m61
1 files changed, 0 insertions, 61 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m
deleted file mode 100755
index b2bead6..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m
+++ /dev/null
@@ -1,61 +0,0 @@
1% [PYR, INDICES, STEERMTX, HARMONICS] = buildSpyr(IM, HEIGHT, FILTFILE, EDGES)
2%
3% Construct a steerable pyramid on matrix IM.
4%
5% HEIGHT (optional) specifies the number of pyramid levels to build. Default
6% is maxPyrHt(size(IM),size(FILT)).
7% You can also specify 'auto' to use this value.
8%
9% FILTFILE (optional) should be a string referring to an m-file that
10% returns the rfilters. (examples: 'sp0Filters', 'sp1Filters',
11% 'sp3Filters','sp5Filters'. default = 'sp1Filters'). EDGES specifies
12% edge-handling, and defaults to 'reflect1' (see corrDn).
13%
14% PYR is a vector containing the N pyramid subbands, ordered from fine
15% to coarse. INDICES is an Nx2 matrix containing the sizes of
16% each subband. This is compatible with the MatLab Wavelet toolbox.
17% See the function STEER for a description of STEERMTX and HARMONICS.
18
19% Eero Simoncelli, 6/96.
20% See http://www.cis.upenn.edu/~eero/steerpyr.html for more
21% information about the Steerable Pyramid image decomposition.
22
23function [pyr,pind,steermtx,harmonics] = buildSpyr(im, ht, filtfile, edges)
24
25%-----------------------------------------------------------------
26%% DEFAULTS:
27
28if (exist('filtfile') ~= 1)
29 filtfile = 'sp1Filters';
30end
31
32if (exist('edges') ~= 1)
33 edges= 'reflect1';
34end
35
36if (isstr(filtfile) & (exist(filtfile) == 2))
37 [lo0filt,hi0filt,lofilt,bfilts,steermtx,harmonics] = eval(filtfile);
38else
39 fprintf(1,'\nUse buildSFpyr for pyramids with arbitrary numbers of orientation bands.\n');
40 error('FILTFILE argument must be the name of an M-file containing SPYR filters.');
41end
42
43max_ht = maxPyrHt(size(im), size(lofilt,1));
44if ( (exist('ht') ~= 1) | (ht == 'auto') )
45 ht = max_ht;
46else
47 if (ht > max_ht)
48 error(sprintf('Cannot build pyramid higher than %d levels.',max_ht));
49 end
50end
51
52%-----------------------------------------------------------------
53
54hi0 = corrDn(im, hi0filt, edges);
55lo0 = corrDn(im, lo0filt, edges);
56
57[pyr,pind] = buildSpyrLevs(lo0, ht, lofilt, bfilts, edges);
58
59pyr = [hi0(:) ; pyr];
60pind = [size(hi0); pind];
61