Here we demonstrate data compression using Fourier transform. (In practice, discrete cosine transform (DCT) is more widely used, such as in the JPEG standard.) First we show the image of a cat and its Fourier spectrum (magnitude only):

To compress this image, we throw away (supress to zero) all coefficients of its spectrum with magnitude lower than a certain threshold (mostly those high frequency components). The lower the threshold, the more coefficients supressed. The compressed image is obtained by inverse transformation using only those non-zero coefficients. The compression ratio is the number of non-zero coefficients divided by the total number of coefficients. As you can see, the compressed image looks very similar to the original one even when most (e.g., 90%) of the coefficients are supressed, because most of the energy is reserved. The most noticable difference is the details corresponding to the high frequency components. Note that the positons of those non-zero coefficients in the spectrum is also necessary.

Compressed image and the corresponding spectrum of 33 percent coefficients containing 99 percent of total energy (not including DC component).





Compressed image and its spectrum of 10 percent coefficients containing 97 percent energy.





Compressed image and its spectrum of 5 percent coefficients containing 95 percent energy.





Compressed image and its spectrum of 2 percent coefficients containing 92 percent energy.