konetime 发表于 2012-5-5 10:43

求助,不知这个小波模极大值去噪如何改正,望高手帮帮改改

望高手改正,谢谢了!!
i=imread('kids.tif');
g=imnoise(i,'gaussian');
% Perform a wavelet decomposition of the signal
% at level 5 using sym6.
wname = 'sym6' ; lev = 5 ;
[ c ,l ] = wavedec ( g , lev , wname) ;
% Estimate the noise standard deviation from the
% detail coefficients at level 1 , using wnoisest .
sigma = wnoisest ( c ,l ,1) ;
% Use wbmpen for selecting global threshold
% for signal de - noising , using the tuning parameter
alpha = 2 ;
thr = wbmpen (c ,l , sigma , alpha)
% Use wdencmp for de - noising the signal using the above
% threshold with soft thresholding and approximation kept .
keepapp = 1 ;
xd = wdencmp ('gbl' , c , l , wname , lev , thr , 's' ,keepapp) ;
% Plot original and de - noised signals.
figure(1);imshow(i);
figure(2);imshow(g);
figure(3);imshow(xd);
错误提示:??? Error using ==> minus
Matrix dimensions must agree.

Error in ==> wbmpen at 57
= min(pen-rl2scr);

Error in ==> Untitled3 at 13
thr = wbmpen (c ,l , sigma , alpha)
他说矩阵必须一致,但是怎么改啊??

2120100281 发表于 2012-5-16 10:55

回复 1 # konetime 的帖子

为什么都是关于图像的呢?有没有和信号有关系的呢

konetime 发表于 2012-5-16 12:02

回复 2 # 2120100281 的帖子

你把图像改成一维信号就可以了

2120100281 发表于 2012-5-17 10:29

回复 3 # konetime 的帖子

谢谢了啊,我试试!吼吼,出来了好好答谢哦

konetime 发表于 2012-5-17 19:46

回复 4 # 2120100281 的帖子

不客气。。

漫步流星 发表于 2013-8-20 20:31

wname = 'db5'; lev = 5;
= wavedec(x110,lev,wname);
sigma = wnoisest(c,l,1);
alpha = 2;
thr = wbmpen(c,l,sigma,alpha);
keepapp = 1;
xd = wdencmp('gbl',c,l,wname,lev,thr,'s',keepapp);
plot(xd)
Error using-
Matrix dimensions must agree.

Error in wbmpen (line 51)
[~,indmin] = min(pen-rl2scr);
同样运行出错,x110是一维信号
不明白,不知道怎么改,望高手指教
页: [1]
查看完整版本: 求助,不知这个小波模极大值去噪如何改正,望高手帮帮改改