急急急跪求高手帮助编写小波变换应用于图像压缩的Matlab程序 只有20分都给了
发布网友
发布时间:2022-05-29 20:56
我来回答
共2个回答
热心网友
时间:2023-11-25 20:02
h.color=[1 1 1]
load wmandril
figure(h)
subplot(1,2,1)
nbc=size(map,1)
colormap(gray(nbc))
image(wcodemat(X,nbc))
title('original image')
axis square
[C,S]=wavedec2(X,2,'db4')
thr=20
[Xcompress1,cmd,lxd,PERF0,PERFL2]=...
wdencmp('gbl',C,S,'db4',2,thr,'h',1)
subplot(1,2,2)
image(wcodemat(Xcompress1,nbc))
title(['compressed image threshold=',num2str(thr)])
axis square
disp('小波系数中设置0的系数个数百分比')
PERFL2
disp('压缩后图像剩余百分比')
PERF0
第二种
h.color=[1 1 1]
load wmandril
figure(h)
subplot(1,2,1)
nbc=size(map,1)
colormap(gray(nbc))
image(wcodemat(X,nbc))
title('original image')
axis square
[C,S]=wavedec2(X,2,'db4')
thr=20
[Xcompress1,cmd,lxd,PERF0,PERFL2]=...
wdencmp('gbl',C,S,'db4',2,thr,'h',1)
subplot(1,2,2)
image(wcodemat(Xcompress1,nbc))
title(['compressed image threshold=',num2str(thr)])
axis square
disp('小波系数中设置0的系数个数百分比')
PERFL2
disp('压缩后图像剩余百分比')
PERF0
热心网友
时间:2023-11-25 20:02
H.color=[1 1 1];
load wmandril;
figure(H);
subplot(1,2,1);
nbc=size(map,1)
colormap(gray(nbc));
image(wcodemat(X,nbc));
title('original image');
axis square;
thr_h=[16 19];
thr_d=[20 21];
thr_v=[22 23];
thr=[thr_h;thr_d;thr_v];
[Xcompress2,cxd,lxd,PERF0,PERFL2]=...
wdencmp('lvd',X,'db3',2,thr,'h');
subplot(1,2,2);
image(wcodemat(Xcompress2,nbc));
title('compressed image threshold=[16 19;20 21;22 23]');
axis square;
disp('小波系数中设置0的系数个数百分比')
PERFL2
disp('压缩后图像剩余百分比')
PERF0