dctmtx
Discrete cosine transform matrix
Syntax
Description
Examples
Input Arguments
Output Arguments
Tips
If you have an
n
-by-n
image,A
, then
is the DCT of the columns ofD
*AA
andD'*A
is the inverse DCT of the columns ofA
.The two-dimensional DCT of
A
can be computed asD*A*D'
. This computation is sometimes faster than usingdct2
, especially if you are computing a large number of small DCTs, becauseD
needs 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
dctmtx
to determineD
, and then calculate each DCT usingD*A*D'
(whereA
is each 8-by-8 block). This is faster than callingdct2
for each individual block.
Version History
Introduced before R2006a