📄 different-thr-sphitcmp.m
字号:
clc
clear all
% Load original image.
load woman;
% X contains the loaded image.
Orig_I=X(1:64,1:64);
%nbc = size(map,1);???
%--------------bandelet transform-------------------
n = 5; w = 'sym2';
[c,l] = wavedec2(x,n,w);
% T=5;Jmin=4;dir=1;
%MW = perform_wavelet_transform(Orig_I,Jmin,+1);
%plot_wavelet(MW, 2, 'real', 1);
%[QT,Theta] = compute_wavelet_quadtree(MW,Jmin,T);
%QT=QT;Theta=Theta;
%[I_W,m_geom] = perform_wavelet_bandelet_transform(MW,Jmin,QT,Theta,dir);
%I_W=I_W;
%------------------------------------------------------
% Use wdencmp for image compression.
% Bandelet coefficients thresholding.
thr=20;w = 'sym2';n=4;
[xd1,cxd1,lxd1,perf01,perfl21] = ...
wdencmp('gbl',c,l,w,n,thr,'h',1);
figure;
subplot(121)
image(xd1);colormap(map);
title('压缩1');
% Using some plotting commands,
% the following figure is generated.
% In addition the first option allows level and orientation-
% dependent thresholds. In this case the approximation is kept.
% The level-dependent thresholds in the three orientations
% horizontal, diagonal and vertical are as follows:
thr_h = [17 18]; % Horizontal thresholds.
thr_d = [19 20]; % Diagonal thresholds.
thr_v = [21 22]; % Vertical thresholds.
thr = [thr_h ; thr_d ; thr_v]
[xd2,cxd2,lxd2,perf02,perfl22] = ...
wdencmp('lvd',c,l,'sym8',2,thr,'h');
subplot(122)
image(xd2);colormap(map);
title('压缩2');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -