wavelet question

Status
Not open for further replies.

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
why does the window change by factors of 2? I feel like you can find the frequency corresponding to a window of any size.
 

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
so I decided to forgo this factor of 2 bullshit, and the transform works out just fine! anyone care to inform me why we care about phase in a wavelet transform? it's supposedly good for image compression but I'm not sure why..
 

PsiStar

Golden Member
Dec 21, 2005
1,184
0
76
You could try asking these guys Physics forums ... err ... ok, not a big deal, but they are my best shot at some things. Next is Matlab as they know everything! Just takes a while to find it or the one to answer.
 

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
Are you referring to padding?

Nah. I just don't like the pictures that explain the difference between short-time fourier transforms and wavelet transforms. I personally think they're misleading, unless there's some nuance I haven't discovered yet. I asked some guy online who wrote a book on this stuff, and he told me that what I was thinking of was the continuous wavelet transform. Sees odd, considering when I wrote my transform, I made all the considerations regarding sampling rates and what not, ie as the wavelet got 'scrunched', there is a sufficient number of points to capture its spectrum without aliasing.
 
Last edited:

DanDaManJC

Senior member
Oct 31, 2004
776
0
76
so I decided to forgo this factor of 2 bullshit, and the transform works out just fine! anyone care to inform me why we care about phase in a wavelet transform? it's supposedly good for image compression but I'm not sure why..

dunno why either, but if you do the fft of an image in matlab... then split up the magnitude and phase components of the fft, then ifft each component and display the image, you'll see crucial image data is also stored in the phase component.

i was curious about this too, in the 1d case, you can often times get away with ignoring phase... but with images, phase is obviously critical. though im not quite sure why. sure, it's just the way the math works out, but often times there's an intuitive way to look at these things, and that's the depth i lack

the factor of 2 stuff is probly just convention for easier and faster implementation on digital logic
 

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
dunno why either, but if you do the fft of an image in matlab... then split up the magnitude and phase components of the fft, then ifft each component and display the image, you'll see crucial image data is also stored in the phase component.

i was curious about this too, in the 1d case, you can often times get away with ignoring phase... but with images, phase is obviously critical. though im not quite sure why. sure, it's just the way the math works out, but often times there's an intuitive way to look at these things, and that's the depth i lack

the factor of 2 stuff is probly just convention for easier and faster implementation on digital logic

The best example I've seen for phase is the frequency response of something like a trace on a PCB for a high frequency signal. If the phase is linear, that implies that all the waves traveling across the trace made it to the other side at the same time. If all your frequency components don't travel across the trace at the same speed, that effect is called dispersion. Does ugly things to your signal. Your receiver won't be happy :p

Other than that, all you have to remember about phase is that if you sum up the right components with the appropriate phase, you get your signal back. There are applications such as compression where phase gets thrown out and they either keep the real or imaginary part. You can still rebuild your signal, but it doesn't tell you the true story regarding what frequency components your signal correlates with.

When you do the FFT on a signal, what you're really doing is correlating your signal with a sine and cosine at some frequency. If you plug in a whole range of freqs, you can find the frequencies that best correlate with the signal and the corresponding phase. If you don't find the corresponding phase, you won't find the best correlation. Without finding the best correlation, you don't really know how strong that frequency component is within the signal. For example, if you correlate a plain sine and cosine for some freq, you get zero. That doesn't mean that frequency isn't present, you just didn't get the phase right.

I just thought phase was curious in wavelet transforms because wavelets understand 'when' frequencies occur much better than FFTs or STFTs.

Edit: Actually, I think I might know what the phase component is for. When you slide the wavelet across the waveform, if the wavelet is all real and it finds a frequency component it correlates with, it drops in and out of phase as you slide it creating these vertical stripes even when the frequency has not vanished. I'll bet the complex wavelet keeps the wavelet 'in phase' so to speak. Still haven't verified this though.

Edit2: Okay, figured out what the factor of two thing was. To state it another way, the scaling for some wavelet transforms is geometric (for example, the window sizes can be 1s,1/3s,1/9s, etc). The reason is that as your wavelet envelope (window) gets smaller linearly, the center frequency as well as the bandwidth (its a bandpass filter) goes up inversely (think the relationship between f = 1/T). Scaling linearly causes excessive overlap of the bands for each scale value, especially near DC. Scaling geometrically causes the filter banks to fit together nicely without too much overlap. I actually knew about this, but I didn't think it posed a 'problem' as long as it was interpreted correctly. Glad one of the websites I stumbled upon decided to state it bluntly :)
 
Last edited:
Status
Not open for further replies.