MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB图像处理] 求助Matlab程序wavedec2错误问题 (https://www.labfans.com/bbs/showthread.php?t=8148)

10100529 2009-05-07 18:59

求助Matlab程序wavedec2错误问题
 
我的程序如下
I=imread('5.jpg');
[X,map]=gray2ind(I,256);
subplot(121);image(X);
colormap(map);
[c,l]=wavedec2(X,5,'db3');
[thr,sorh,keepapp]=ddencmp('cmp','wv',I);
[Xcmp,cxc,lxc,perf0,perfl2]=wdencmp('gbl',c,l,'db3',5,thr,sorh,keepapp);
subplot(122);image(Xcmp);
colormap(map);

错误报告
??? Error using ==> vertcat
All rows in the bracketed expression must have the same
number of columns.
Error in ==> wavedec2 at 54
s = [size(x);s]; % store size

尝试很多次!是不是图片格式没弄好?
请各位大侠帮助一下

silas_xue 2009-05-08 12:57

回复: 求助Matlab程序wavedec2错误问题
 
lz 根据错误的提示
All rows in the bracketed expression must have the same number of columns.
你的变量size中各行的列数不同
注意看一下你的图像的大小

Thx for reading.
PS:若还算满意,直接点击“Thanks”,再次登陆时亦便于查看回答是否真的帮到你了。
个人观点 仅供参考 多多交流 相互学习

yhcode 2009-05-08 13:14

回复: 求助Matlab程序wavedec2错误问题
 
对,断点运行到错误行处,看看X的维数,jpg格式图像可能是灰度或24位色或256色图,24位色图是3维的.wavedec2应该只支持2维.


所有时间均为北京时间。现在的时间是 11:07

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.