Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2012-03-24
帖子: 1
声望力: 0 ![]() |
![]()
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'); 出错在什么地方?求指导 谢谢。 |
![]() |
![]() |