Images and audio signals provide a particularly stunning insight.
Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
41–50 of 105 posts
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#42Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#43Hi Hacker News - I'm the author of the piece, also on twitter @aatishb. Look forward to hearing your thoughts. I encourage you to share your thoughts and insights with other readers by leaving a comment on the post, particularly if you know of other interesting applications about the Fourier transform. Cheers!
1.) In the first part of the article talking about decomposing a periodic signal into sinusoids of different frequencies - it would be more correct to refer to it as the Fourier _Series_, which is different from the transform.
2.) The image showing three sinusoids summing together into a non-period signal made me cringe (the sum is also periodic - that's the whole point of the Fourier Series).
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#44You can view the Fourier transform as a fitting problem. Yes, you fit the data to a function. Ie you take the data points and fit it to a sum of exponential functions. There is actually a much more general approach called "Prony method" that extends the concept and adds a dampening factor into the function to fit:
http://www.engr.uconn.edu/~sas03013/docs/PronyAnalysis.pdf
You can take it further and use matrix pencil methods and eventually you'll see connections to ESPRIT algorithm and even least squares algorithm. It's really interesting how they're all actually connected.
Cheers
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#45Why is the phase not even mentioned in the article?
The Fourier Toy mentioned in the article: http://toxicdump.org/stuff/FourierToy.swf
Notice how you can click and drag to change the size and initial phase of the circle widgets. Try changing the initial phase of any of the larger components without changing the size and see what happens. It goes haywire!
The first FT toy that I wrote years ago also ignored phase. It took me forever to figure out why my reconstructed images looked like crap.
Turns out you can't just throw away half of your transform data (you get frequency and phase for each component you care about) without being fabulously clever.
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#46Earlier quoted context omitted.
OK, since you asked: > The sound wave produced by a piano note is a simple sine wave. No, it's not. A piano note is a complicated stack of overtones (some of which are harmonic and some of which aren't) and transients. If it was just a sine wave, it would sound like a sine wave and not like a piano. This is part of why things like Shazam are so difficult: musical notes aren't just a single frequency in the FFT, they…
> This is actually the exact same number of numbers as in the time-domain series. In a way, it's twice as many, since they have both real and imaginary components.
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#47Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#48> You could just tell them a handful of numbers—the sizes of the different circles in the picture above. Maybe I'm crazy and just missing something, but this feels a little too good to be true. This would put the set of smooth curves in 1-1 correspondence with the set of finite sets (since each curve is being specified completely by a finite set of numbers). But the set of finite sets is countably infinite since it's…
I don't know much more about Fourier analysis than you, but theoretically it's an infinite series. So to describe an arbitrary smooth curve, you need a potentially infinite number of circles (or sin terms). I'm not sure if it's a countably infinite series or not. I think in principle you could have a component for every number in the real line.
I don't think this implies that there are a countably infinite number of smooth, periodic curves though, because the each one of the parameters is a real.
I'm not a mathematician though, so I could be abusing these concepts...
There are two more major Fourier transforms: the discrete Fourier transform, which maps a discrete aperiodic function to a continuous periodic (i.e. band-limited) frequency domain representation [3], and the discrete-time Fourier transform [4], which maps a discrete period (i.e. time-limited) function to a discrete period (i.e. band-limited) frequency representation.
Notably, in the applications mentioned in the article, what's really being described is the short-time discrete-time Fourier transform (STFT [5]). In this most useful variation, you chop the input signal of arbitrary duration into fixed-sized (and possibly overlapping) chunks, (usually) apply a windowing function to temper down the edges of the chunks, and then apply DTFT to each chunk. The result is a sort of spectrogram -- a time-frequency representation of the input. In image processing this is done in two dimensions.
The famous FFT [6] is a O(n * log(n)) algorithm for calculating DTFTs.
[1] http://en.wikipedia.org/wiki/Fourier_series
[2] http://en.wikipedia.org/wiki/Fourier_transform
[3] http://en.wikipedia.org/wiki/Discrete_Fourier_transform
[4] http://en.wikipedia.org/wiki/Discrete-time_Fourier_transform
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#49One direction to go in for further study:
Re: Fourier Transforms – The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face
#50Hi Hacker News - I'm the author of the piece, also on twitter @aatishb. Look forward to hearing your thoughts. I encourage you to share your thoughts and insights with other readers by leaving a comment on the post, particularly if you know of other interesting applications about the Fourier transform. Cheers!
Awesome article! Here are two things that stuck out for me... 1.) In the first part of the article talking about decomposing a periodic signal into sinusoids of different frequencies - it would be more correct to refer to it as the Fourier _Series_, which is different from the transform. 2.) The image showing three sinusoids summing together into a non-period signal made me cringe (the sum is also periodic - that's t…
2.) It will only be periodic if there exist some frequency for which the frequencies of the sinusoids are integer multiple.