Electronic – Why does using Discrete Cosine Transform lead to data compression

communicationcompression

DCT is used in JPEG standard along with Huffman encoding to further compress the result. I understand that most of the data in spatial domain which is an image is "present in low frequencies". This is because most adjacent pixels change only little in the color value.

An image which is represented numerically in signal processing, with numbers representing the pixel color intensity. When we do a DCT on it we still get numbers in result. Where exactly does data get compressed via DCT?

Best Answer

The DCT by itself does not really compress anything. All it does is convert the spatial domain into the frequency domain. This basically 'concentrates' the information in the image so that some of the high frequency information can be either discarded or stored at a lower resolution. This is where you actually get the space savings - throwing out data. Decompressing the image involves substituting 0 for the discarded data and then taking the inverse DCT to get back something similar to the original data.