The Fast Fourier Transform takes O(N log N) operations, while the Fast Wavelet Transform takes O(N). But what, specifically, does the FWT compute?
Although they are often compared, it seems like the FFT and FWT are apples and oranges. As I understand it, a more appropriate comparison would be the STFT (FFTs of small chunks over time) and the complex Morlet FWT, since they're both time-frequency representations based on complex sinusoids (please correct me if I'm wrong). This is often shown with a diagram like this:
(Another example at the bottom here)
The bottom left shows how the STFT is a bunch of FFTs stacked next to each other as time passes (this representation is called a spectrogram), while the bottom right shows the dyadic WT, which has better time resolution at high frequencies and better frequency resolution at low frequencies (this representation is called a scalogram). In this example, N for the STFT is the number of horizontal rows, and a single O(N log N) FFT operation calculates a single column of N coefficients from N samples.
What I don't understand: How many coefficients does a single O(N) FWT operation compute, and where are they located on the time-frequency chart above? Which rectangles get filled in by a single computation?
If we calculate an equal-area block of time-frequency coefficients using both, is the FWT still more efficient than the FFT?
Concrete example using PyWavelets:
In [2]: dwt([1, 0, 0, 0, 0, 0, 0, 0], 'haar')
Out[2]:
(array([ 0.70710678, 0. , 0. , 0. ]),
array([ 0.70710678, 0. , 0. , 0. ]))
It creates two sets of 4 coefficients, so it's the same as the number of samples in the original signal. But what's the relationship between these 8 coefficients and the tiles in the diagram?