matlabwaveletdwt

Matlab DWT H-level


I'm trying to implement some watermarking algorithm found in a paper1. This is a line of the paper:

Do the H-level DWT for all the renumbered segments.

Then in simulation section the author explains the wavelet used for experiments.

DWT transform adopted the common wavelet "Daubechies-1" and level H = 3.

I just don't get what does H means, how do I input H=3 in matlab DWT function?

My actual code is:

[cA,cD] = dwt(audio,'db3');

Can someone help me?


1Ji, Y. & Kim, J. A Quantified Audio Watermarking Algorithm Based on DWT-DCT. Multimedia, Computer Graphics and Broadcasting 339–344 (2011)


Solution

  • 1. Q: "What does H (level) mean?"

    A: Wikipedia describes this concept nicely, but I'll attempt to summarize. For each level, the data (original data for level 1, otherwise approximation data from previous level) is decomposed into approximation and detail data. The result is coefficient which describe the data in different frequency bins.

    2. Q: How do I input H=3 in matlab DWT function?

    A: As you point out, they are using db1. To extract the correct coefficients for level H=3, we'll need to implement this cascading algorithm. Here is a rough sketch of the code.

    nLevels = 3;
    
    % Get the coefficients for level 1
    [cA,cD{1}] = dwt(audio,'db1');
    
    % Continue to cascade to get additional coefficients at each level
    for n = 2:nLevels
       [cA,cD{n}] = dwt(cA,'db1');
    end
    
    % Final coefficients are cA from highest level and cD from each level