Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 40 lines (31 sloc) 0.873 kb
% RES = wpyrBand(PYR, INDICES, LEVEL, BAND)
%
% Access a subband from a separable QMF/wavelet pyramid.
%
% LEVEL (optional, default=1) indicates the scale (finest = 1,
% coarsest = wpyrHt(INDICES)).
%
% BAND (optional, default=1) indicates which subband (1=horizontal,
% 2=vertical, 3=diagonal).
% Eero Simoncelli, 6/96.
function im = wpyrBand(pyr,pind,level,band)
if (exist('level') ~= 1)
level = 1;
end
if (exist('band') ~= 1)
band = 1;
end
if ((pind(1,1) == 1) | (pind(1,2) ==1))
nbands = 1;
else
nbands = 3;
end
if ((band > nbands) | (band < 1))
error(sprintf('Bad band number (%d) should be in range [1,%d].', band, nbands));
end
maxLev = wpyrHt(pind);
if ((level > maxLev) | (level < 1))
error(sprintf('Bad level number (%d), should be in range [1,%d].', level, maxLev));
end
band = band + nbands*(level-1);
im = pyrBand(pyr,pind,band);
Jump to Line
Something went wrong with that request. Please try again.