Slashdot Mirror


Introduction to Wavelets

tang_horse writes "If you're curious about where wavelet theory came from and how it works, but didn't get beyond second semester DQ (or algebra/trig I), there's a lucid review, history, and introduction to wavelet theory on the National Academy of Sciences Beyond Discovery website. It includes some fairly concrete demos of what a wavelet function does to an image."

16 comments

  1. My thesis was on wavelet compression... by PhysicsGenius · · Score: 2, Interesting
    ....of radioactive information transfer between neutrinos and massless artifacts of a riemannian transform. And I can say that this article is very oversimplified where it is even right. For example, take this quote:

    Throw a stone into a pool. Those are waves. Take an infinitesimally small arc segment from one of those waves and you have a wavelet, basically.

    Totally double-talk that has nothing to do with the soliton basis for Wavelet Theory (WT).

    1. Re:My thesis was on wavelet compression... by Anonymous Coward · · Score: 0

      Totally double-talk that has nothing to do with the soliton basis for Wavelet Theory (WT).

      er...where exactly was that line?

      And what exactly does solitons have to do with wavelets?

      Or are you just a troll?

    2. Re:My thesis was on wavelet compression... by shpoffo · · Score: 1

      a link or two, please. Was your thesis published somewhere that we can read it?

      thx
      -shpoffo

  2. Just how DO you do DSP on a PC? by dschuetz · · Score: 3, Interesting

    From the paper, lines like "On his personal computer, he could separate a wave into its wavelet components, and then reassemble them into the original wave" and "could be implemented using simple digital filtering ideas, in fact, using short digital filters" prompt me to ask: Just how does one do signal processing on a PC?

    I haven't done any programming with sound files since I tried to play a .au file backwards on a NeXT like 13 years ago. Are there really simple libraries that you can use where you say something like "out = lowpass(in.wav, 500)" and get just the bass from a wav file? How, then, do you do funky stuff like "Lt = 0.92Lf + 0.38Rf + j0.92Lb + j0.38Rb" or somesuch, where "j" represents a 90-degree phase shift? (bonus points to anyone who can identify the formula I'm screwing up).

    And how do these libraries work? Is it basically iterating stuff over a huge array of amplitudes? So that to implement the lowpass filter, you actually have to somehow or other scan the array to look for patterns that need to be smoothed out? (actually, it occurs to me that you might be able to do this by averaging adjacent entries together. Okay, then, how do you do a high-pass filter, keeping the local oscillations but dropping the low-frequency ones?)

    Basically, I'm curious about a good primer for DIY sound processing. Not because I want to build my own sound processing stuff, but because I'm really curious how people can do stuff like what Morlet did, especially considering he did it like 20 years ago, with significantly less-powered hardware...

    (and, yes, I searched google for this, but it was a year or two ago...didn't find anything really helpful, except an early framework of an open source library that hadn't progessed much).

    1. Re:Just how DO you do DSP on a PC? by fluffhead · · Score: 4, Interesting

      See http://www.ti.com/cgi-bin/sc/search.cgi - go nuts. We (plug alert - I work at TI) have tons of PC based software to interface with our DSP's for audio applications.

      --

      #include "disclaim.h"
      "All the best people in life seem to like LINUX." - Steve Wozniak
    2. Re:Just how DO you do DSP on a PC? by ChadN · · Score: 4, Informative
      And how do these libraries work? Is it basically iterating stuff over a huge array of amplitudes? So that to implement the lowpass filter, you actually have to somehow or other scan the array to look for patterns that need to be smoothed out? (actually, it occurs to me that you might be able to do this by averaging adjacent entries together. Okay, then, how do you do a high-pass filter, keeping the local oscillations but dropping the low-frequency ones?)

      Well, you are getting there... Basically, a lot of the actual processing of discrete sample sequences (such as a .wav file) are based on an operation called a convolution (which is the same as a correlation with one argument reversed in time). Thus, you "convolve" a digital sequence with another, usually much shorter sequence that is known as a filter. The filter sequence is deisgned to be low-pass, high-pass, band-pass, etc.

      The key point is that a convolution in the time domain (ie. dealing with discrete samples in time) has an equivalence to operations in the frequency domain (what you get when you do a Fourier Transform on a sequence of time samples). By designing your filter in the frequency domain, you come up with filter sequences in the time domain, and the "convolution" does the rest. It is really some of the most elegant mathematics one can study in an engineering discipline (IMO)

      Anyway, this oversimplifies many things, but is a step toward removing the "mystery" of digital filtering. I would suggest a book such as Hamming's "Digital Filters" (which is cheap and good), or checking Google for "Fourier digital filtering", etc. for more info. You were on to something when you talked about averaging; that is indeed a simple low-pass filter, but much better ones can be made almost as simply.

      BTW, wavelets are a related topic, but it is probably better to understand the Fourier realm first.

      I welcome any corrections or clarifications to these statements by those in the know; or follow up questions if what I said is unclear.

      --
      "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
    3. Re:Just how DO you do DSP on a PC? by nutsy · · Score: 1

      Probably the best source (ahem) for real-world working signal-processing code, for bit-twiddling type people, is SoX, which has been vastly improved by its current maintainer Chris Bagwell who took it over in 1995. It includes a few different filtering algorithms (see band.c, deemphas.c, earwax.c, filter.c, highp.c, lowp.c) among other changes (no more clicking noises when resampling, hooray!).

    4. Re:Just how DO you do DSP on a PC? by Anonymous Coward · · Score: 0

      I'm not sure if this will help but this is how I understand wave processing. The waves are stored in binary 1 and 0's. The closer the waves are together and how large the waves are determines frequency. If you are filtering out certain wave "sizes" you are filtering out ranges in frequency. Soundwaves are atmospheric vibrations. So this seems simple to me maybe I'm missing something. If you wanted to take a from ab you would filter a which would leave you with b. If you want to take 39khrtz from a range of 23khrts to 44khrts you would take out 39khrtz. Each at one point in time you only have one 39khrtz range since it represents all occurances at that range. since there is only one representation at any one point. Maybe I'm missing something. To tie this back to the binary since 1 and 0's represent dataforms the frequency would have a specific dataform if you target that dataform then you can choose what you want to do with it. Maybe I just don't understand sound but wouldn't how we hear and what is represented be only representations on a really small scale being constantly fed as all our other sense each fraction of a second is another continuation of that perception. Since waveforms are simply a representtion of forces and exchange of relation. So we hear frequencies by reading a stream of vibration that vibration takes on patterns.. or shapes you can zoom in on a soundwave and you will notice how it is formed down to a very very small fraction... as you narrow in on the waveform the shape of that form becomes less and less altering moving closer to its base shape(tri, square etc...)the shape of that line how much it twists and turns determines what sound it is and what frequency it will be. I'm babling I guess but I would hope it would be simple to understand how to target certain frequencies of sound in a particular waveform now... so to be entirely redundant you would just target binary repesentations of the waveshape which coresponds to the frequency ranges.. there is probably some type of algorythm out there that defines it that you can use I guess I should read the other posts now.

  3. sound processing by bedessen · · Score: 3, Informative
    To get a signal shifted by a uniform 90 degress across all frequencies, I believe you want to use the Hilbert Transform.

    As far as applications, if you're using windows, there are a number of very advanced audio editor programs, like Cool Edit, Goldwave, etc. Try a search at one of the usual software download places.

    Probably the most extensive DSP applications turn to something like Matlab, but that's hardly free.

    For a unix-style solution, there's a package of tools here called pipewave which allows you to do very complicated digital signal processing using unix pipes. It follows the philosophy that you can do very complicated tasks by cascading smaller components using pipelines. Here are some examples from the above site:


    Plot the Fourier transform of a file using a Hanning window.

    fd file | fft -h | plot

    Generate the default synthestic vowel (200 ms duration, fundamental frequency = 100 Hz and formants, F1 = 650 Hz and F2 = 950 Hz), halve the sampling rate, take the hanning-windowed Fourier transform, and plot

    klatt -k | downsample 2 | fft -h | plot

    Generate 2000 samples of white noise, pass it through a gamma-tone filterbank (1 channel per ERB), arrange the filtered waveforms in a cascade, such that there is no overlap between them and plot.

    gaussian 2000 | fbank -e 1 | cascade -o 0.8 | plot -b

    Generate 2000 samples of white noise, store a copy of the original in a file called 'noise0', then phase shift it by 90 and store the phase shifted version as 'noise90'.

    gaussian 2000 | store -o noise0 | fft -p | ffilt -a 90 | ift | store noise90

    1. Re:sound processing by Anonymous Coward · · Score: 0


      try this site

      http://www.cwp.mines.edu/cwpcodes/

  4. JPEG 2000 by redcliffe · · Score: 2

    Anyone know when it will be ready for use? Thanks,

    David

  5. question... by superflex · · Score: 2, Interesting
    Near the beginning of the article, there were a couple of references to Fourier analysis being ill-equipped to deal with transient components in signals. It also mentions this being related to the Heisengberg Uncertainty Principle...

    My first impression when they mentioned "transients" and "crappy" was the Gibbs phenomenon. Is this what they were talking about, and more importantly, is the Gibbs phenomenon caused by the H.U.P.?

    --
    sigs are for suckers
    1. Re:question... by MarkusQ · · Score: 3
      Near the beginning of the article, there were a couple of references to Fourier analysis being ill-equipped to deal with transient components in signals. It also mentions this being related to the Heisengberg Uncertainty Principle...

      My first impression when they mentioned "transients" and "crappy" was the Gibbs phenomenon. Is this what they were talking about, and more importantly, is the Gibbs phenomenon caused by the H.U.P.?

      It's the other way around; HUP (which is physics) is caused by the fact that you can't extrapolate the full shape of a wave from a small piece of it (which is math).

      A good general rule of thumb: there are many examples of math causing physics, but there are no known cases of physics causing math.

      -- MarkusQ

  6. JPEG-2000 by GPS+Pilot · · Score: 1

    Ok, I'm sold on wavelets. Now, which browsers can decompress a JPEG-2000 file? And where can I get an app that allows me to take an image and "Save as..." JPEG-2000 format?

    (Preferably a cheap shareware app. Heh)

    --
    That that is is that that that that is not is not.
  7. intro on wavelets? by adminispheroid · · Score: 1
    This article was interestingly devoid of information. Let's us know they're really simple, e.g.:
    The Daubechies wavelets turn the theory into a practical tool that can be easily programmed and used by any scientist with a minimum of mathematical training.
    But apparently not so simple they could explain any of it to us blockheads.

    Anybody know where you could find a introduction to this subject that actually introduces it?