Discrete Cosine Transform



This first step of the JPEG compression algorithm groups the image into multiple 8x8 (64) pixels.

Each 8x8 block is regarded as a 64-point discrete signal, and encoded using a method similar to the Fast Fourier Transform, converting the unsigned values to signed numbers, called coefficients.

These numbers can now be reordered to facilitate compression

Basically, the numbers represent the intensity of each pixel - chrominance, luminence and color.

The arithmetic is messy and can be found in a CACM April 1991 article by Gregory Wallace: The JPEG Still Compression Standard.

The encoding step is called the Forward Discrete Cosine Transform . FDCT.

The method has a unique inverse function - an Inverse DCT (IDCT) - which decodes the stored image back to the 8x8 blocks to reconstruct the stored image.

Prof Ed Cox on DCT