Hacker News new | past | comments | ask | show | jobs | submit login

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.

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).

To illustrate, here is an example of zeroing the lowest frequencies:


Oh, so your brain can still mostly recreate the shape even with no low frequencies!

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.


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.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact