求助二维离散余弦变换
我在用MATLAB做二维离散余弦变换(DCT),但系统老是报错,请各位高手指点指点,代码如下:>>I=imread('images.jpg');
>> Id=im2double(I);
>>T=dctmtx(8);
>>B=blkproc(Id,,'P1*x*P2',T,T');
??? Subscripted assignment dimension mismatch.
Error in ==> blkproc at 89
aa(border(1)+(1:ma),border(2)+(1:na)) = a;
>> mask=[1 1 1 1 0 0 0 0
1 1 1 0 0 0 0 0
1 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0];
B2=blkproc(B,,'P1*.x',mask);
I2=blkproc(B2,,'P1*x*P2',T',T);
subplot(121),
imshow(I);
>>title(‘原始图象’);
subplot(122),
imshow(I2);
>>title(‘压缩图象’);
??? Undefined function or variable 'B'.
[ 本帖最后由 zhangnan3509 于 2008-5-4 08:37 编辑 ]
页:
[1]