主题: [MATLAB图像处理] 关于blkproc函数求助!!!
查看单个帖子
旧 2012-03-24, 00:34   #1
南小蹦
初级会员
 
南小蹦 的头像
 
注册日期: 2012-03-24
帖子: 1
声望力: 0
南小蹦 正向着好的方向发展
警告 关于blkproc函数求助!!!

clc;clear all;
I=imread('harbour.tif');
I=im2double(I);
T=dctmtx(16);
B=blkproc(I,[16 16],'p1*x*p2',T,T');
mask=[1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0;
1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0;
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0;
1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0;
1 1 0 0 0 0 0 0 0 0 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 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 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 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 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];

B2=blkproc(B,[16,16],'p1*x',mask);
I2=blkproc(B2,[16 16],'p1*x*p2',T',T);
figure(1)
subplot(2,1,1);imshow(I);title('原图');
subplot(2,1,2);imshow(I2);title('压缩后的图像');
??? Error using ==> inlineeval at 15
Error in inline expression ==> p1*x*p2
Undefined function or variable 'p1'.

Error in ==> inline.feval at 36
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr,
INLINE_OBJ_.expr);

Error in ==> blkproc at 103
firstBlock = feval(fun,x,params{:});

Error in ==> six at 5
B=blkproc(I,[16 16],'p1*x*p2',T,T');
出错在什么地方?求指导 谢谢。
南小蹦 当前离线   回复时引用此帖