wt2d_original.m

来自「该代码为图像融合的vc源程序,对学习图像融合有很重要的价值」· M 代码 · 共 41 行

M
41
字号
function y=wt2d(i,lpfy,hpfy,lpfx,hpfx,H_zero,H_one)
%$Id: wt2d.m,v 1.1.1.1 2000/10/16 09:30:40 mattb Exp $
%===========================================================================
%                   Matt Bowers - University of Bath
%
%                        Copyright (c) 1996
%===========================================================================
%
% Two dimensional wavelet transform of i
%
% edge affects handling of edges:
%       = 1 - use reflection appropriate to odd or even length
%       = 0 - use wraparound
%
%===========================================================================



[i_rows i_cols]=size(i);            % Image size 

[lpfy_rows lpfy_cols]=size(lpfy);	% Filter index matrix size
[lpfx_rows lpfx_cols]=size(lpfx);	% Filter index matrix size
[hpfy_rows hpfy_cols]=size(hpfy);	% Filter index matrix size
[hpfx_rows hpfx_cols]=size(hpfx);	% Filter index matrix size


%Row transforms
%disp ('Processing rows...')
for r=1:i_rows
  i(r,:)=[reshape(i(r,lpfx),lpfx_rows,lpfx_cols)*H_zero ; reshape(i(r,hpfx),hpfx_rows,hpfx_cols)*H_one]';
end


%Column transforms
%disp ('Processing columns...')
for c=1:i_cols
  i(:,c) =[reshape(i(lpfy,c),lpfy_rows,lpfy_cols)*H_zero ; reshape(i(hpfy,c),hpfy_rows,hpfy_cols)*H_one];
end

y=i;

⌨️ 快捷键说明

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