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

1 回表示 (過去 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.
tamanna
tamanna 2013 年 5 月 30 日
i got d answer sir....thnks a lot :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by