discrete cosine transform


The discrete cosine transforms (DCT) are a family of transforms closely related to the discrete sine transform and the discrete Fourier transformMathworldPlanetmath. The DCT-II is the most commonly used form and plays an important role in coding signals and images [2], e.g. in the widely used standard JPEG compression. The discrete cosine transform was first introduced by Ahmed, Natarajan, and Rao [5]. Later Wang and Hunt [6] introduced the set of variants.

The DCT is included in many mathematical packages, such as Matlab, Mathematica and GNU Octave.

1 Definition

The orthonormal variants of the DCT, where xn is the original vector of N real numbers, Ck is the transformed vector of N real numbers and δ is the Kronecker delta, are defined by the following equations:

1.1 DCT-I

CkI = pkn=0N-1xnqncosπnkN-1  k=0,1,2,,N-1
pk = 2-δk,0-δk,N-1N-1
qn = 11+δn,0+δn,N-1

The DCT-I is its own inverse.

1.2 DCT-II

CkII = pkn=0N-1xncosπ(n+12)kN  k=0,1,2,,N-1
pk = 2-δk,0N

The inverse of DCT-II is DCT-III.

1.3 DCT-III

CkIII = pn=0N-1xnqncosπn(k+12)N  k=0,1,2,,N-1
p = 2N
qn = 11+δn,0

The inverse of DCT-III is DCT-II.

1.4 DCT-IV

CkIV = pn=0N-1xncosπ(n+12)(k+12)N  k=0,1,2,,N-1
p = 2N

The DCT-IV is its own inverse.

1.5 DCT-V

CkV = pkn=0N-1xnqncosπnkN-12  k=0,1,2,,N-1
pk = 2-δk,0N-12
qn = 11+δn,0

The DCT-V is its own inverse.

1.6 DCT-VI

CkVI = pkn=0N-1xnqncosπ(n+12)kN-12  k=0,1,2,,N-1
pk = 2-δk,0N-12
qn = 11+δn,N-1

The inverse of DCT-VI is DCT-VII.

1.7 DCT-VII

CkVII = pkn=0N-1xnqncosπn(k+12)N-12  k=0,1,2,,N-1
pk = 2-δk,N-1N-12
qn = 11+δn,0

The inverse of DCT-VII is DCT-VI.

1.8 DCT-VIII

CkVII = pn=0N-1xncosπ(n+12)(k+12)N+12  k=0,1,2,,N-1
p = 2N+12

The DCT-VIII is its own inverse.

2 Two-dimensional DCT

The DCT in two dimensionsMathworldPlanetmath is simply the one-dimensional transform computed in each row and each column. For example, the DCT-II of a N1×N2 matrix is given by

Ck1,k2II = pk1pk2n1=0N1-1n2=0N2-1xn1,n2cosπ(n1+12)k1N1cosπ(n2+12)k2N2

References

  • 1 This entry is based on content from The Data Analysis Briefbook (http://rkb.home.cern.ch/rkb/titleA.htmlhttp://rkb.home.cern.ch/rkb/titleA.html)
  • 2 A.K. Jain, Fundamentals of Digital Image Processing, Prentice Hall, 1989.
  • 3 Xuancheng Shao, Steven G. Johnson. Type-II/III DCT/DST algorithms with reduced number of arithmetic operations. 2007.
  • 4 Markus Päuschel, José M. F. Mouray. The algebraic approach to the discrete cosine and sine transforms and their fast algorithms. 2006.
  • 5 N. Ahmed, T. Natarajan, and K. R. Rao. Discrete Cosine Transform, IEEE Trans. on Computers, C-23. 1974.
  • 6 Z. Wang and B. Hunt, The Discrete W Transform, Applied Mathematics and Computation, 16. 1985.
Title discrete cosine transform
Canonical name DiscreteCosineTransform
Date of creation 2013-03-22 12:11:24
Last modified on 2013-03-22 12:11:24
Owner stitch (17269)
Last modified by stitch (17269)
Numerical id 18
Author stitch (17269)
Entry type Definition
Classification msc 65T50
Classification msc 42-00
Synonym DCT
Synonym discrete trigonometric transforms
Related topic DiscreteSineTransform
Related topic DiscreteFourierTransform2
Related topic DiscreteFourierTransform
Defines DCT-I
Defines DCT-II
Defines DCT-III
Defines DCT-IV
Defines DCT-V
Defines DCT-VI
Defines DCT-VII
Defines DCT-VIII