我有一个代码来实现8-tap Daubechies小波分解。首先,我分解4个级别,并从系数重建原始图像。代码如下所示
Im=imread('me.jpg');
% Perform wavelet transform using Daubechies filter bank, 4th order
[LL1,HL1,LH1,HH1] = dwt2(Im,'db8');
[LL2,HL2,LH2,HH2] = dwt2(LL1,'db8');
[LL3,HL3,LH3,HH3] = dwt2(LL2,'db8');
[LL4,HL4,LH4,HH4] = dwt2(LL3,'db8');
% inverse wavelet transform
[LL3] = idwt2(LL4, HL4, LH4, HH4,'db8');
[LL2] = idwt2(LL3, HL3, LH3, HH3,'db8');
[LL1] = idwt2(LL2, HL2, LH2, HH2,'db8');
[reconstructed] = idwt2(LL1, HL1, LH1, HH1,'db8');
使用上面的代码我收到一条错误消息
???数组维度必须匹配二进制数组op。
==>中的错误idwt2 at 93 x = upsconv2(a,{Lo_R,Lo_R},sx,dwtEXTM,shift)+ ......%近似值。
==>中的错误NoiseExtract_2 at 55 [LL2] = idwt2(LL3,HL3,LH3, HH3,' DB8&#39);
在逆变换步骤中,LL3,LL2和LL1的大小被改变。如何解决这个问题?