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 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Wayne King
Wayne King el 30 de Mayo de 2013
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 comentarios
Wayne King
Wayne King el 30 de Mayo de 2013
Editada: Wayne King el 30 de Mayo de 2013
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Continuous Wavelet Transforms en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by