diff options
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m')
-rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlab/buildSpyr.m | 61 |
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 | |||
23 | function [pyr,pind,steermtx,harmonics] = buildSpyr(im, ht, filtfile, edges) | ||
24 | |||
25 | %----------------------------------------------------------------- | ||
26 | %% DEFAULTS: | ||
27 | |||
28 | if (exist('filtfile') ~= 1) | ||
29 | filtfile = 'sp1Filters'; | ||
30 | end | ||
31 | |||
32 | if (exist('edges') ~= 1) | ||
33 | edges= 'reflect1'; | ||
34 | end | ||
35 | |||
36 | if (isstr(filtfile) & (exist(filtfile) == 2)) | ||
37 | [lo0filt,hi0filt,lofilt,bfilts,steermtx,harmonics] = eval(filtfile); | ||
38 | else | ||
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.'); | ||
41 | end | ||
42 | |||
43 | max_ht = maxPyrHt(size(im), size(lofilt,1)); | ||
44 | if ( (exist('ht') ~= 1) | (ht == 'auto') ) | ||
45 | ht = max_ht; | ||
46 | else | ||
47 | if (ht > max_ht) | ||
48 | error(sprintf('Cannot build pyramid higher than %d levels.',max_ht)); | ||
49 | end | ||
50 | end | ||
51 | |||
52 | %----------------------------------------------------------------- | ||
53 | |||
54 | hi0 = corrDn(im, hi0filt, edges); | ||
55 | lo0 = corrDn(im, lo0filt, edges); | ||
56 | |||
57 | [pyr,pind] = buildSpyrLevs(lo0, ht, lofilt, bfilts, edges); | ||
58 | |||
59 | pyr = [hi0(:) ; pyr]; | ||
60 | pind = [size(hi0); pind]; | ||
61 | |||