DCT2

Purpose:

Calculates the 2D Discrete Cosine Transform.

Syntax:

DCT2(array, nr, nc)

array

-

An input array.

nr

-

Optional. An integer, the number of rows. Defaults to row length of input array.

nc

-

Optional. An integer, the number of columns. Defaults to column length of input array.

Returns:

An array.

Example:

W1: ravel(gcos(100, 1/100, 3), 10)

W2: dct2(W1)

W3: idct2(W2)

 

returns the original array (within roundoff error).

Remarks:

DCT2 is often used in conjunction with IDCT2 to perform image compression.

See Also:

DCT

FFT

FFT2

IDCT

IDCT2

References:

[1]   Jae S. Lim,

       Two-dimensional Signal and Image Processing

       pp. 148-162 Implements an even-symmetrical DCT

 

[2]   Jain,

       Fundamentals of Digital Image Processing

       pp. 150-153

 

[3]  Wallace,

       The JPEG Still Picture Compression Standard

       Communications of the ACM, April 1991