各位大虾帮我看看我的这个matlab程序有什么问题,输入灰度图像出来的却是蓝色和红色,谢谢哈!! 20
我是想看看三层小波分解的各分层具体的细节!程序如下:I=imread('lena.bmp');[c,s]=wavedec2(I,3,'db1');ca1=appcoef2...
我是想看看三层小波分解的各分层具体的细节!程序如下:
I=imread('lena.bmp');
[c,s]=wavedec2(I,3,'db1');
ca1=appcoef2(c,s,'db1',1);
ca2=appcoef2(c,s,'db1',2);
ca3=appcoef2(c,s,'db1',3);
[chd3,cvd3,cdd3] = detcoef2('all',c,s,3);
[chd2,cvd2,cdd2] = detcoef2('all',c,s,2);
[chd1,cvd1,cdd1] = detcoef2('all',c,s,1);
[c,s]=wavedec2(I,3,'db1');
a1=wrcoef2('a',c,s,'db1',1);
hd1=wrcoef2('h',c,s,'db1',1);
vd1=wrcoef2('v',c,s,'db1',1);
dd1=wrcoef2('d',c,s,'db1',1);
c1=[a1,hd1;vd1,dd1];
a2=wrcoef2('a',c,s,'db1',2);
hd2=wrcoef2('h',c,s,'db1',2);
vd2=wrcoef2('v',c,s,'db1',2);
dd2=wrcoef2('d',c,s,'db1',2);
c2=[a2,hd2;vd2,dd2];
a3=wrcoef2('a',c,s,'db1',3);
hd3=wrcoef2('h',c,s,'db1',3);
vd3=wrcoef2('v',c,s,'db1',3);
dd3=wrcoef2('d',c,s,'db1',3);
c3=[a3,hd3;vd3,dd3];
subplot(221);image(I);
axis square;
subplot(222);image(c1);
axis square;
subplot(223);image(c2);
axis square;
subplot(224);image(c3);
axis square;
figure;
cc3=[ca3,chd3;cvd3,cdd3];
cc2=[cc3,chd2;cvd2,cdd2];
cc1=[cc2,chd1;cvd1,cdd1];
image(cc1);
axis square;
输入图像采用的是512*512的lena图像,我是新手,不知道是不是函数弄错了,请高手不吝赐教!! 展开
I=imread('lena.bmp');
[c,s]=wavedec2(I,3,'db1');
ca1=appcoef2(c,s,'db1',1);
ca2=appcoef2(c,s,'db1',2);
ca3=appcoef2(c,s,'db1',3);
[chd3,cvd3,cdd3] = detcoef2('all',c,s,3);
[chd2,cvd2,cdd2] = detcoef2('all',c,s,2);
[chd1,cvd1,cdd1] = detcoef2('all',c,s,1);
[c,s]=wavedec2(I,3,'db1');
a1=wrcoef2('a',c,s,'db1',1);
hd1=wrcoef2('h',c,s,'db1',1);
vd1=wrcoef2('v',c,s,'db1',1);
dd1=wrcoef2('d',c,s,'db1',1);
c1=[a1,hd1;vd1,dd1];
a2=wrcoef2('a',c,s,'db1',2);
hd2=wrcoef2('h',c,s,'db1',2);
vd2=wrcoef2('v',c,s,'db1',2);
dd2=wrcoef2('d',c,s,'db1',2);
c2=[a2,hd2;vd2,dd2];
a3=wrcoef2('a',c,s,'db1',3);
hd3=wrcoef2('h',c,s,'db1',3);
vd3=wrcoef2('v',c,s,'db1',3);
dd3=wrcoef2('d',c,s,'db1',3);
c3=[a3,hd3;vd3,dd3];
subplot(221);image(I);
axis square;
subplot(222);image(c1);
axis square;
subplot(223);image(c2);
axis square;
subplot(224);image(c3);
axis square;
figure;
cc3=[ca3,chd3;cvd3,cdd3];
cc2=[cc3,chd2;cvd2,cdd2];
cc1=[cc2,chd1;cvd1,cdd1];
image(cc1);
axis square;
输入图像采用的是512*512的lena图像,我是新手,不知道是不是函数弄错了,请高手不吝赐教!! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询