Functions > Image Processing > Transform Domain > Discrete Cosine Transform
  
Discrete Cosine Transform
dct(M), idct(M)—Calculate the 2D forward and inverse discrete cosine transform, respectively.
This transform has the advantage of concentrating most of the image "energy", or information, in a few frequency components, making a good choice for encoding.
The functions return a matrix containing the transformed image. They compute the dct, or its inverse, by treating the matrix as one argument. They do not do the computation for each vector in the matrix separately or independently of the rest.
Arguments
M is the image matrix, at least two rows and two columns wide.
The matrix may contain real or complex elements.