i am trying to build my new wavelet. i used wavemngr but an error occured while doing decomposition using the new wavelet. kindly help me out..this is the code i used

2 次查看(过去 30 天)
image2=('C:\Users\hp\Desktop\data\1 (1).JPG');
[h l]= newwavelet(image2)
WAVEMNGR('add','shivjoshi','josh',1,'','newwavelet')
OUT1 = WAVEMNGR('read')
[C,S] = wavedec2(image2,2,'josh');
here in 2nd line h and l have high and low pass coefficients the code is working upto 4th line when i use OUT1 = WAVEMNGR('read') my new added wavelet is showing but in the 5th line error occured that file 'josh' doesnt exist

采纳的回答

Wayne King
Wayne King 2013-5-30
You should have an M-file that just defines the scaling filter for an orthogonal wavelet
So for example:
function h = newwavelet(wname)
h = [-0.0106
0.0329
0.0308
-0.1870
-0.0280
0.6309
0.7148
0.2304];
end
Then, first delete what you have already done.
wavemngr('del','josh');
Then, re-add
wavemngr('add','shivjoshi','josh',1,'','newwavelet.m')
Next, check that the wavelet is there
wavemngr('read')
Finally, create some data to test
Im = randn(10,10);
[C,S] = wavedec2(Im,1,'josh');
  5 个评论
Wayne King
Wayne King 2013-5-30
编辑:Wayne King 2013-5-30
why are you inputting image2 into newwavelet? You do NOT input the image data into newwavelet.m. newwavelet.m should take only one input argument and that input argument should be wname. Just like I have done above in my example. MATLAB will call newwavelet.m with
newwavelet('josh')
and that should return a 1-D vector that is the scaling filter.
So if your newwavelet.m function does not work with:
h = newwavelet('josh');
then you are doing it wrong.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by