\(\text{DCT}_2\)¶
Calculates the type 2 discrete cosine transform, of a matrix in one or two dimensions.
You can use the \dct2
backslash command to insert this function.
The following variants of this function are available:
\(\text{real matrix } \text{DCT}_2 \left ( \text{<matrix>} \right )\)
The \(\text{DCT}_2\) accepts boolean, integer, or real matrices and returns a real matrix containing the type 2 or forward DCT. The input matrix can be a row matrix, column matrix or a 2 dimensional matrix. The returned matrix will have the same dimensions as the supplied input matrix.
This function calculates the DFT in one dimension using the relation:
The two dimensional DCT relies on the property of orthogonality. A DCT is first calculated independently on each row, creating a partially transformed matrix. A DCT is then calculated on each column of the partially transformed matrix.
Figure 122 shows the basic use of the \(\text{DFT}_2\) function.