mkfilt.m

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

M
48
字号
function [H_zero,F_zero,H_one,F_one] = mkfilt(c_c,c_u,c_c_min,c_c_max,c_u_min,c_u_max)
%$Id: mkfilt.m,v 1.1.1.1 2000/10/16 09:30:40 mattb Exp $
%===========================================================================
%                   Matt Bowers - University of Bath
%
%                        Copyright (c) 1998
%===========================================================================
%
% Construct analysis and synthesis filters from wavelet coefficients 'cc' and
% 'cu'
%
% Arguements:
%   c_c         'cc' coefficients
%   c_u         'cu' coefficients
%   c_c_min     }   
%   c_c_max     } these are the min and max filter tap numbers for c_c and c_u 
%   c_u_min     }
%   c_u_max     }
%
% Returns:
%   H_zero      low band analysis filter
%   H_one       high band analysis filter
%   F_zero      low band synthesis filter
%   F_one       high band synthesis filter
%
%===========================================================================

% MATLAB v5 Specific -- the 'logical' keyword is not available in MATLAB v4

H_zero = c_c';

% Reverse order
%
F_zero = c_u(:,length(c_u):-1:1)';  
H_one = F_zero;

% Change sign of odd numbered taps
%
H_one(logical(abs(rem([c_u_max:-1:c_u_min],2)))) = ...
    -H_one(logical(abs(rem([c_u_max:-1:c_u_min],2))));  

F_one = H_zero;

% Change sign of even numbered taps
%
F_one(~rem([c_c_min:c_c_max],2)) = -F_one(~rem([c_c_min:c_c_max],2));   

⌨️ 快捷键说明

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