News for hackers. Stuff that matters.
Re:Fourier Transforms – The Math Trick Behind MP3s, JPEGs, a... by sillysaurus2 on Wednesday November 06, 2013 @01:11PM (#6684218)
EDIT: I mixed up high vs low frequencies, as the reply pointed out, so I've edited this to be correct now.

The reason we can get away with throwing away low frequencies in JPEG is because humans are prone to notice significant details rather than tiny details.

High frequencies of a Fourier transform of an image == tiny detail (like being able to distinguish individual hairs)

Low frequencies of a Fourier transform of an image == huge details (like someone's face).

So you transform, set part of the result to zeroes, and compress. To display it you uncompress, transform back, and display it. The zeroes manifest themselves as an almost-imperceptible blur.

Re:Fourier Transforms – The Math Trick Behind MP3s, JPEGs, a... by sp332 on Wednesday November 06, 2013 @01:22PM (#6684330)
You don't generally throw away the high frequencies in JPEG, you throw away the low-amplitude frequencies. Unless you're talking frequencies that are so high they're really just artifacts of the segmentation of the image (sharp borders show up in every frequency range, so smoothing them a bit helps).
Re:Fourier Transforms – The Math Trick Behind MP3s, JPEGs, a... by eliteraspberrie on Wednesday November 06, 2013 @01:46PM (#6684532)
To illustrate, here is an example of zeroing the lowest frequencies:

http://imgur.com/a/wVjYk

Re:Fourier Transforms – The Math Trick Behind MP3s, JPEGs, a... by sp332 on Wednesday November 06, 2013 @01:53PM (#6684582)
Oh, so your brain can still mostly recreate the shape even with no low frequencies!
Re:Fourier Transforms – The Math Trick Behind MP3s, JPEGs, a... by tobr on Wednesday November 06, 2013 @02:10PM (#6684724)
Depends on how far away from the image you are, or how big it is. By taking the low frequency from one image, and the high frequency from another, you can get some interesting results. Take a look at this image, first sitting near the screen, then step away a couple of meters.

http://cvcl.mit.edu/GroupFaceHybrid.jpg

Re:Fourier Transforms – The Math Trick Behind MP3s, JPEGs, a... by sillysaurus2 on Wednesday November 06, 2013 @04:02PM (#6685488)
Holy wow. That's freakin' awesome!

Open that image in a new tab, then hold down CTRL and scroll up/down to zoom in and out. When you zoom out to 25%, each of them switches from smiling to frowning or vice versa. The lady on the right is clearly smiling at 25% zoom. I had no idea that was possible.