资源简介
剪切波变换MATLAB实现代码,包含2D及3D图片的,还有对应的反变换代码
代码片段和文件信息
function [h0 h1] = dfilters(fname type)
% DFILTERS Generate directional 2D filters
%
% [h0 h1] = dfilters(fname type)
%
% Input:
% fname: Filter name. Available ‘fname‘ are:
% ‘haar‘: the “Haar“ filters
% ‘vk‘: McClellan transformed of the filter from
% the VK book
% ‘ko‘: orthogonal filter in the Kovacevic‘s paper
% ‘kos‘: smooth ‘ko‘ filter
% ‘lax‘: 17 x 17 by Lu Antoniou and Xu
% ‘sk‘: 9 x 9 by Shah and Kalker
% ‘cd‘: 7 and 9 McClellan transformed by
% Cohen and Daubechies
% ‘pkva‘: ladder filters by Phong et al.
% ‘oqf_362‘: regular 3 x 6 filter
% ‘dvmlp‘ : regular linear phase biorthogonal filter with 3 dvm
% ‘sinc‘: ideal filter (*NO perfect recontruction*)
% ‘dmaxflat‘: diamond maxflat filters obtained from a three stage ladder
%
% type: ‘d‘ or ‘r‘ for decomposition or reconstruction filters
%
% Output:
% h0 h1: diamond filter pair (lowpass and highpass)
% To test those filters (for the PR condition for the FIR case) verify that:
% conv2(h0 modulate2(h1 ‘b‘)) + conv2(modulate2(h0 ‘b‘) h1) = 2
% (replace + with - for even size filters)
%
% To test for orthogonal filter
% conv2(h reverse2(h)) + modulate2(conv2(h reverse2(h)) ‘b‘) = 2
%
% Part of the Nonsubsampled Contourlet Toolbox
% (http://www.mathworks.de/matlabcentral/fileexchange/10049-nonsubsampled-contourlet-toolbox)
% The diamond-shaped filter pair
switch fname
case {‘haar‘}
if lower(type(1)) == ‘d‘
h0 = [1 1] / sqrt(2);
h1 = [-1 1] / sqrt(2);
else
h0 = [1 1] / sqrt(2);
h1 = [1 -1] / sqrt(2);
end
case ‘vk‘ % in Vetterli and Kovacevic book
if lower(type(1)) == ‘d‘
h0 = [1 2 1] / 4;
h1 = [-1 -2 6 -2 -1] / 4;
else
h0 = [-1 2 6 2 -1] / 4;
h1 = [-1 2 -1] / 4;
end
% McClellan transfrom to obtain 2D diamond filters
t = [0 1 0; 1 0 1; 0 1 0] / 4; % diamond kernel
h0 = ftrans2(h0 t);
h1 = ftrans2(h1 t);
case ‘ko‘ % orthogonal filters in Kovacevic‘s thesis
a0 = 2; a1 = 0.5; a2 = 1;
h0 = [0 -a1 -a0*a1 0;
-a2 -a0*a2 -a0 1;
0 a0*a1*a2 -a1*a2 0];
% h1 = qmf2(h0);
h1 = [0 -a1*a2 -a0*a1*a2 0;
1 a0 -a0*a2 a2;
0 -a0*a1 a1 0];
% Normalize filter sum and norm;
norm = sqrt(2) / sum(h0(:));
h0 = h0 * norm;
h1 = h1 * norm;
if type == ‘r‘
% Reverse filters for reconstruction
h0 = h0(end:-1:1 end:-1:1);
h1 = h1(end:-1:1 end:-1:1);
end
case ‘kos‘ % Smooth orthogonal filters in Kovacevic‘s thesis
a0 = -sqrt(3); a1 = -sqrt(3); a2 = 2+sqrt(3);
h0 = [0 -a1 -a0*a1 0;
-a2 -a0*a2 -a0 1;
0 a0*a1*a2 -a1*a2 0];
% h1 = qmf2(h0);
h1 = [0 -a1*a2 -a0*a1*a2 0;
1 a0 -a0*a2 a2;
0 -a0*a1 a1 0];
% Normalize filter sum and norm;
norm = sqrt(2) / sum(h0(:));
h0 = h0 *
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13383 2014-11-11 07:50 2D\dfilters.m
文件 2753 2014-11-10 02:13 2D\dmaxflat.m
文件 10472 2014-11-10 02:15 2D\MakeONFilter.m
文件 1005 2014-11-10 02:13 2D\mctrans.m
文件 713 2014-11-10 02:15 2D\MirrorFilt.m
文件 921 2014-11-10 02:14 2D\modulate2.m
文件 5004 2016-05-03 01:16 2D\SLcheckFilterSizes.m
文件 827 2016-05-03 01:16 2D\SLcomputePSNR.m
文件 669 2016-05-03 01:17 2D\SLcomputeSNR.m
文件 961 2016-05-03 01:17 2D\SLdshear.m
文件 1770 2016-05-03 01:14 2D\SLExampleImageDenoising.m
文件 1860 2016-05-03 01:14 2D\SLExampleImageDenoisingGPU.m
文件 2104 2016-05-03 01:15 2D\SLExampleImageDenoisingSerial.m
文件 2293 2016-05-03 01:15 2D\SLExampleImageDenoisingSerialGPU.m
文件 1832 2016-05-03 01:17 2D\SLfiltersToGPU2D.m
文件 1466 2016-05-03 01:17 2D\SLfiltersToGPU3D.m
文件 1895 2016-05-03 01:11 2D\SLfinishSerial2D.m
文件 4213 2016-05-03 01:11 2D\SLgetShearletIdxs2D.m
文件 5471 2016-05-03 01:17 2D\SLgetShearlets2D.m
文件 8941 2016-05-03 01:17 2D\SLgetShearlets3D.m
文件 8071 2016-05-03 01:11 2D\SLgetShearletSystem2D.m
文件 3987 2016-05-03 01:12 2D\SLgetSubsystem2D.m
文件 7458 2016-05-03 01:17 2D\SLgetWedgeBandpassAndLowpassFilters2D.m
文件 1058 2016-05-03 01:17 2D\SLnormalizeCoefficients2D.m
文件 1062 2016-05-03 01:17 2D\SLnormalizeCoefficients3D.m
文件 1215 2016-05-03 01:17 2D\SLpadArray.m
文件 5893 2016-05-03 01:17 2D\SLprepareFilters2D.m
文件 5981 2016-05-03 01:17 2D\SLprepareFilters3D.m
文件 7188 2016-05-03 01:12 2D\SLprepareSerial2D.m
文件 2472 2016-05-03 01:12 2D\SLsheardec2D.m
............此处省略8个文件信息
相关资源
-
Matlab Simuli
nk三维图形显示模块 - 双闭环直流调速MATLAB仿真模型基于传
- MATLAB辅助现代工程数字信号处理源程
- bpa转matpower
- PAM系统仿真matlab版本
- 基于matlab的RBF神经网络模式分类
- 利用matlab实现的简单的基于卡尔曼滤
- MATLAB2019A破解版百度云链接(已亲测
- Matlab2018B破解版云盘链接.rar
- Matlab遗传算法工具箱gaot及安装
- 量子粒子群算法的matlab实现,有程序
- 图像清晰度评价函数
- MATLAB神经网络应用设计第二版源代码
- 三次样条插值函数csape的用法
- arrow3.m--Matlab
- 随机森林Matlab
- 蚁群算法采用matlab开发的仿真平台
- GPS基本原理及其MATLAB实现全部MATLAB程
- matlab_倾斜校正算法代码
-
OFDM的QPSK的simuli
nk仿真,matlab 2016a版 - AWGN信道的蒙特卡洛仿真
- Matlab Maggiwick
- 非常好用的MATLAB混沌工具箱
- MATLAB绘制2维数据点程序,用于显示聚
- 平均间隙法matlab代码
- matlab图像互信息计算
- 鸡群算法CSOmatlab程序代码
- 香农编码、霍夫曼编码比较的matlab源
- 三次样条插值的MATLAB程序
- 红枣尺寸检测的matlab代码
评论
共有 条评论