anal21.m
来自「零树编码用于128*128图象压缩算法」· M 代码 · 共 34 行
M
34 行
function an = anal21(data,lpf,hpf)
%anal21(data,lpf,hpf) decomposes the input matrix, data, into
%four subbands using filters lpf and hpf. This is a one level
%decomposition. Orthonormal filter banks used with circular extension.
%
%This routine is used by the routine, anal2d for 2-D wavelet
%decomposition.
%
%Author: Ajit S. Bopardikar
%Copyright (c) 1998 by Addison Wesley Longman, Inc.
%
l = length(lpf);
[m,n] = size(data);
ext = [data data(:,1:l)]; %circular extension of rows
ll = conv2(ext,lpf); % Low pass filtering of rows
hh = conv2(ext,hpf); % High pass filtering of rows
ll = ll(:, l:2:(l+n-1)); %choose the circular convolved part
hh = hh(:, l:2:(l+n-1)); %and downsample by two.
anr = [ll hh]'; %the row convolutions are done.
ext = [anr anr(:,1:l)]; %circular extension of columns
ll = conv2(ext,lpf); % Low pass filtering of columns
hh = conv2(ext,hpf); % High pass filtering of columns
ll = ll(:, l:2:(l+m-1)); %choose the circular convolved part
hh = hh(:, l:2:(l+m-1)); %and downsample by two.
an = [ll,hh]'; %One level of subband decomposition done.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?