0

I am working with audio signal processing and need to perform a 3-Band DWT. I am trying to use the dwt function in MATLAB to do this. However, after reading about this function I realized it only allows you to input two filters, a Hi and Low Band, but I need to input 3. Is there anyway I can do this? Thank you!

Math244
  • 173
  • 1
  • 2
  • 10
  • Apply it recursively? – Oliver Charlesworth Jul 22 '13 at 03:45
  • What do you mean? I need to decompose the audio into 3 bands, a low band (approximation) and two high bands (detail 1 and detail 2). This means I need to input three filter sets, where `dwt` only allows you to input 2 (`Lo_D` and `Hi_D`). – Math244 Jul 22 '13 at 03:55

1 Answers1

0

How you are describing it is not how wavelets work. I think you should read the documentation/tutorials/background information more so that you understand what you are working with. Oli is correct - what happens for multilevel decomposition is that the detail and approximation are computed for each level, and then the filters are applied to the approximation (low band) to calculate the next level.

E.g:

sig1=audioread('myfilename');
[lev1_lo lev1_hi]=dwt(sig1(:,1),'haar');
[lev2_lo lev2_hi]=dwt(lev1_lo,'haar');
[lev3_lo lev3_hi]=dwt(lev2_lo,'haar');
%etc

You keep lev1_hi, lev2_hi, lev3_hi and lev3_lo for a 3-level decomposition. For your case, keep lev1_hi, lev2_hi and lev2_lo2.

Hugh Nolan
  • 2,508
  • 13
  • 15
  • If you we're hoping for more resolution in the high frequencies, there are transforms that can do this, but you are probably better off in the time domain. – Bjorn Roche Jul 22 '13 at 13:04
  • Oh okay I understand what you mean about multilevel decompositions. I still may not be understanding this correctly, but what I am asking about is not decomposing the signal into multiple levels. I am referring to one level in which the signal is broken into 3 components. – Math244 Jul 22 '13 at 14:16
  • I haven't heard of such a DWT - maybe it is something new, but I think you are just looking for a 2-level decomposition. – Hugh Nolan Jul 22 '13 at 14:25
  • 1
    I think it is relatively new but there is a lot of information out about it. It is not a 2-level decomposition though. – Math244 Jul 22 '13 at 18:58
  • I see, interesting! I haven't come across this. There are equations here that you could implement: http://ijns.femto.com.tw/download_paper.jsp?PaperID=IJNS-2006-01-09-1&PaperName=ijns-v6-n2/ijns-2008-v6-n2-p121-126.pdf – Hugh Nolan Jul 22 '13 at 20:41