dctmtx
Discrete cosine transform matrix
Syntax
Description
Examples
Input Arguments
Output Arguments
Tips
If you have an
n-by-nimage,A, thenis the DCT of the columns ofD*AAandD'*Ais the inverse DCT of the columns ofA.The two-dimensional DCT of
Acan be computed asD*A*D'. This computation is sometimes faster than usingdct2, especially if you are computing a large number of small DCTs, becauseDneeds to be determined only once.For example, in JPEG compression, the DCT of each 8-by-8 block is computed. To perform this computation, use
dctmtxto determineD, and then calculate each DCT usingD*A*D'(whereAis each 8-by-8 block). This is faster than callingdct2for each individual block.
Version History
Introduced before R2006a

