资源简介
计算小波分解的快速算法,比Matlab自带的wavefilter速度要快很多
代码片段和文件信息
function [c s] = wavefast(x n varargin)
%WAVEFAST Perform multi-level 2-dimensional fast wavelet transform.
% [C L] = WAVEFAST(X N LP HP) performs a 2D N-level FWT of
% image (or matrix) X with respect to decomposition filters LP and
% HP.
%
% [C L] = WAVEFAST(X N WNAME) performs the same operation but
% fetches filters LP and HP for wavelet WNAME using WAVEFILTER.
%
% Scale parameter N must be less than or equal to log2 of the
% maximum image dimension. Filters LP and HP must be even. To
% reduce border distortion X is symmetrically extended. That is
% if X = [c1 c2 c3 ... cn] (in 1D) then its symmetric extension
% would be [... c3 c2 c1 c1 c2 c3 ... cn cn cn-1 cn-2 ...].
%
% OUTPUTS:
% Matrix C is a coefficient decomposition vector:
%
% C = [ a(n) h(n) v(n) d(n) h(n-1) ... v(1) d(1) ]
%
% where a h v and d are columnwise vectors containing
% approximation horizontal vertical and diagonal coefficient
% matrices respectively. C has 3n + 1 sections where n is the
% number of wavelet decompositions.
%
% Matrix S is an (n+2) x 2 bookkeeping matrix:
%
% S = [ sa(n :); sd(n :); sd(n-1 :); ... ; sd(1 :); sx ]
%
% where sa and sd are approximation and detail size entries.
%
% See also WAVEBACK and WAVEFILTER.
% Copyright 2002-2004 R. C. Gonzalez R. E. Woods & S. L. Eddins
% Digital Image Processing Using MATLAB Prentice-Hall 2004
% $Revision: 1.5 $ $Date: 2003/10/13 01:14:17 $
% Check the input arguments for reasonableness.
error(nargchk(3 4 nargin));
if nargin == 3
if ischar(varargin{1})
[lp hp] = wavefilter(varargin{1} ‘d‘);
else
error(‘Missing wavelet name.‘);
end
else
lp = varargin{1}; hp = varargin{2};
end
fl = length(lp); sx = size(x);
if (ndims(x) ~= 2) | (min(sx) < 2) | ~isreal(x) | ~isnumeric(x)
error(‘X must be a real numeric matrix.‘);
end
if (ndims(lp) ~= 2) | ~isreal(lp) | ~isnumeric(lp) ...
| (ndims(hp) ~= 2) | ~isreal(hp) | ~isnumeric(hp) ...
- 上一篇:强化学习_倒立摆_Matlab程序
- 下一篇:单相电压型PWM整流器仿真
相关资源
- 强化学习_倒立摆_Matlab程序
- matlab的多用户检测
- MATLAB 地震程序
- 基于Matlab的多图像超分辨率重建算法
- Matlab实现的一个简单的RADAR预警雷达模
- Matlab模糊自适应PID控制仿真程序
- SC_OFDMA的Matlab仿真
- 船舶航向模糊控制matlab仿真代码非s
- zw_matlab形成节点导纳矩阵的程序.zip
- zw_MATLAB实现图像去噪滤波锐化边缘检
- 遗传算法求解Rastrigin函数
- 雷达图像处理的入门算法
- 用matlab处理语音信号
- OFDM物理层发射机_接收机模型matlab代码
- MATLAB R2010b/R2012b破解lisence
- 基于TSP的禁忌搜索MATLAB程序
- Matlab GUI 多界面数据传递(使用全局变
- 路径规划势场栅格法程序
- 用matlab贝叶斯方法实现神经网络算法
- 回声隐藏matlab程序
- MATLAB R2012b 首发完美破解 所有组件可
- 卡尔曼滤波EKF UKF PF对比matlab源程序
- 决策树经典算法c4_5算法的matlab实现
- 复杂网络度分布图的matlab编程代码
- 复杂网络聚类系数的matlab编程代码
- 求平均最短路径长度的matlab编程代码
- 模拟退火算法matlab程序
- NSGA-3matlab源程序
- 经济调度粒子群算法matlab源程序
- 多目标粒子群算法matlab源程序
评论
共有 条评论