Discrete Cosine Transform (DCT) is mainly used for image JPEG lossy compression. MIL can perform DCT using MimTransform(). For a one dimensional signal, this separates the signal into a set of cosine waves of different frequency. For a two-dimensional signal (image), it can be interpreted as the decomposition of an image into a set of 2D cosine patterns. The composition of these waves make up the original waveform. The forward DCT is defined as (for an 8x8 matrix):

where *u* and
*v* are coordinates in the
frequency domain.

The reverse DCT is defined as:

Frequency 0, also called the DC component, is plotted in the top-left corner of the spectrum. All other components in the spectrum are called AC components. A DCT concentrates the low frequency components of the image in the first few coefficients (top-left corner) of the spectrum. MIL divides the image into independent blocks of 8x8 pixels and performs the transform on each individual block. Centering of the spectrum is not supported in MIL.