wpyrlev.m

来自「matlab的steel金字塔小波分解源代码」· M 代码 · 共 31 行

M
31
字号
% [LEV,IND] = wpyrLev(PYR,INDICES,LEVEL)%% Access a level from a separable QMF/wavelet pyramid.% Return as an SxB matrix, B = number of bands, S = total size of a band.% Also returns an Bx2 matrix containing dimensions of the subbands.% Eero Simoncelli, 6/96.function [lev,ind] =  wpyrLev(pyr,pind,level)if ((pind(1,1) == 1) | (pind(1,2) ==1))  nbands = 1;else  nbands = 3;end		if ((level > wpyrHt(pind)) | (level < 1))  error(sprintf('Level number must be in the range [1, %d].', wpyrHt(pind)));end		firstband = 1 + nbands*(level-1)firstind = 1;for l=1:firstband-1  firstind = firstind + prod(pind(l,:));endind = pind(firstband:firstband+nbands-1,:);lev  = pyr(firstind:firstind+sum(prod(ind'))-1);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?