主题:求助!本人新手,请大家帮帮忙。
function y=text(A)
A=imread('text.tif');
T=dctmtx(8);
B=blkproc(A,[8 8],'P1*x*P2',T,T');
mask=[16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99];
B2=blkproc(B,[8 8],'P1.*x',mask);
A2=blkproc(B2,[8 8],'P1*x*P2',T,T');
imshow(A),figure,imshow(A2);
错误提示Error in ==> blkproc at 87
aa(border(1)+(1:ma),border(2)+(1:na)) = a;
Error in ==> text at 5
B=blkproc(A,[8 8],'P1*x*P2',T,T');
我编的程序在附件里,保存的名字就是text.m
高手帮忙看看哪里错了?写完程序怎么调用运行啊?小弟是新手,先谢谢各位了。
A=imread('text.tif');
T=dctmtx(8);
B=blkproc(A,[8 8],'P1*x*P2',T,T');
mask=[16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99];
B2=blkproc(B,[8 8],'P1.*x',mask);
A2=blkproc(B2,[8 8],'P1*x*P2',T,T');
imshow(A),figure,imshow(A2);
错误提示Error in ==> blkproc at 87
aa(border(1)+(1:ma),border(2)+(1:na)) = a;
Error in ==> text at 5
B=blkproc(A,[8 8],'P1*x*P2',T,T');
我编的程序在附件里,保存的名字就是text.m
高手帮忙看看哪里错了?写完程序怎么调用运行啊?小弟是新手,先谢谢各位了。