FourierDCTMatrix

FourierDCTMatrix[n]

returns an n×n discrete cosine transform matrix of type 2.

FourierDCTMatrix[n,m]

returns an n×n discrete cosine transform matrix of type m.

Details and Options

  • Each entry Frs of the discrete cosine transform matrix of type m is computed as:
  • 1.DCT-I
    2.DCT-II
    3.DCT-III
    4.DCT-IV
  • The discrete cosine transform matrices of types 1, 2, 3, and 4 have inverses of type 1, 3, 2, and 4, respectively. »
  • Rows of the FourierDCTMatrix are basis sequences of the discrete cosine transform.
  • The result of FourierDCTMatrix[n].list is equivalent to FourierDCT[list] when list has length n. However, the computation of FourierDCT[list] is much faster and has less numerical error. »
  • FourierDCTMatrix[,WorkingPrecision->p] gives a matrix with entries of precision p.

Examples

open allclose all

Basic Examples  (1)

A DCT matrix:

Scope  (1)

The discrete cosine transform's basis sequences of length 128:

Options  (1)

WorkingPrecision  (1)

Use machine precision:

Use arbitrary precision:

Applications  (1)

Define 2D discrete cosine transform of size 8×8 using matrix formulation:

Simplified JPEG compression algorithm:

Compare original and compressed image:

Properties & Relations  (2)

DCT matrix multiplied by a vector is equivalent to the discrete cosine transform of that vector:

FourierDCT is much faster than the matrix-based computation:

Discrete cosine transform matrix of type 1 is its own inverse:

Discrete cosine transform matrix of type 3 is an inverse of the type 2 matrix:

Discrete cosine transform matrix of type 4 is its own inverse:

Wolfram Research (2012), FourierDCTMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/FourierDCTMatrix.html.

Text

Wolfram Research (2012), FourierDCTMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/FourierDCTMatrix.html.

CMS

Wolfram Language. 2012. "FourierDCTMatrix." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FourierDCTMatrix.html.

APA

Wolfram Language. (2012). FourierDCTMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FourierDCTMatrix.html

BibTeX

@misc{reference.wolfram_2023_fourierdctmatrix, author="Wolfram Research", title="{FourierDCTMatrix}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/FourierDCTMatrix.html}", note=[Accessed: 29-September-2023 ]}

BibLaTeX

@online{reference.wolfram_2023_fourierdctmatrix, organization={Wolfram Research}, title={FourierDCTMatrix}, year={2012}, url={https://reference.wolfram.com/language/ref/FourierDCTMatrix.html}, note=[Accessed: 29-September-2023 ]}