Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

I am creating an application that works like the Shazam service. In short, my goal is to create an audio pattern matching service. However, I would like to use DWT and not the short time Fourier transform.

I am faced with some problems interpreting the results of the DWT. In particular I have the following questions:

  1. How to plot the results of dwt like a spectrogram?
  2. How to determine what frequency prevails in a given time?
share|improve this question
    
Kind of the same question as dsp.stackexchange.com/q/651/29 Also, I think only sinusoidal wavelets like Morlet have a true frequency? –  endolith Dec 12 '12 at 17:24
add comment

1 Answer 1

Generally below intensity of the color will tell you about importance of a frequency. Some programming languages have this functionality built in. Let's take for example Mathematica (has free trial). Let's import some sample recording:

voice = ExampleData[{"Sound", "Apollo11ReturnSafely"}]

enter image description here

Here is built in Spectrogram function:

s = voice[[1, 1, 1]]; r = voice[[1, 2]];
Spectrogram[s, SampleRate -> r]

enter image description here

with time on horizontal and frequencies on vertical axes. For wavelets though it is more natural to use Scalogram. Here is built-in function WaveletScalogram:

cwt = ContinuousWaveletTransform[voice, GaborWavelet[6]];
WaveletScalogram[cwt, ColorFunction -> "AvocadoColors", ColorFunctionScaling -> False]

enter image description here

Scalogram can provide useful info. For example it is great for visualizing voice versus noise feature. Voice is more rich and irregular in structure, noise is more monotonic and repetitive. Horizontal axis is time. Vertical axis is octaves. Higher frequencies are resolved at lower octaves and lower frequencies at higher octaves.

For DWT you will have a similar plot:

cwt = DiscreteWaveletTransform[voice];
WaveletScalogram[cwt, ColorFunction -> "AvocadoColors", ColorFunctionScaling -> False]

enter image description here

share|improve this answer
    
Thank you. Can you explain me how to plot scalogram in general when I have dwt coefficients only? How to obtain intensities at given time moment(vertical line in plot)? –  rayman Dec 9 '12 at 12:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.