diff options
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/setPyrBand.m')
-rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlab/setPyrBand.m | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/setPyrBand.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/setPyrBand.m deleted file mode 100755 index baa9f77..0000000 --- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/setPyrBand.m +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | % NEWPYR = setPyrBand(PYR, INDICES, BAND, BAND_NUM) | ||
2 | % | ||
3 | % Insert an image (BAND) into a pyramid (gaussian, laplacian, QMF/wavelet, | ||
4 | % or steerable). Subbands are numbered consecutively, from finest | ||
5 | % (highest spatial frequency) to coarsest (lowest spatial frequency). | ||
6 | |||
7 | % Eero Simoncelli, 1/03. | ||
8 | |||
9 | function pyr = pyrBand(pyr, pind, band, bandNum) | ||
10 | |||
11 | %% Check: PIND a valid index matrix? | ||
12 | if ( ~(ndims(pind) == 2) | ~(size(pind,2) == 2) | ~all(pind==round(pind)) ) | ||
13 | pind | ||
14 | error('pyrTools:badArg',... | ||
15 | 'PIND argument is not an Nbands X 2 matrix of integers'); | ||
16 | end | ||
17 | |||
18 | %% Check: PIND consistent with size of PYR? | ||
19 | if ( length(pyr) ~= sum(prod(pind,2)) ) | ||
20 | error('pyrTools:badPyr',... | ||
21 | 'Pyramid data vector length is inconsistent with index matrix PIND'); | ||
22 | end | ||
23 | |||
24 | %% Check: size of BAND consistent with desired BANDNUM? | ||
25 | if (~all(size(band) == pind(bandNum,:))) | ||
26 | size(band) | ||
27 | pind(bandNum,:) | ||
28 | error('pyrTools:badArg',... | ||
29 | 'size of BAND to be inserted is inconsistent with BAND_NUM'); | ||
30 | end | ||
31 | |||
32 | pyr(pyrBandIndices(pind,bandNum)) = vectify(band); | ||