dct(X[, type=2])
Replaces the columns of a dense real matrix with their discrete cosine transforms. The second argument, an integer between 1 and 4, denotes the type of transform (DCT-I, DCT-II, DCT-III, DCT-IV). The DCT-I transform requires that the row dimension of X is at least 2. These transforms are defined as follows (for a matrix with n rows).
idct(X[, type=2])
Replaces the columns of a dense real matrix with the inverses of the discrete cosine transforms defined above.
The separable discrete two dimensional cosine transform first computes the corresponding one dimensional tranform along the columns of the matrix, followed by the one dimensional transform along the rows of the matrix.
dct2(X[, type=2])
Replaces a dense real matrix with the two dimensional discrete cosine transform.
idct2(X[, type=2])
Replaces a dense real matrix with the inverse two dimensional discrete cosine transform.