discrete cosine transform

discrete cosine transform

The

discrete cosine transforms

(DCT)

are a family of transforms closely related to the

discrete sine transform

and the

discrete Fourier transform

. 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

x

n

is the original vector of

N

real numbers

,

C

k

is the transformed vector of

N

real numbers and

δ

is the Kronecker delta, are defined by the following equations:

1.1

DCT-I

C

k

I

=

p

k

⁢

∑

n

=

0

N

-

1

x

n

⁢

q

n

⁢

cos

⁡

π

⁢

n

⁢

k

N

-

1

k

=

0

,

1

,

2

,

…

,

N

-

1

p

k

=

2

-

δ

k

,

0

-

δ

k

,

N

-

1

N

-

1

q

n

=

1

1

+

δ

n

,

0

+

δ

n

,

N

-

1

The DCT-I is its own

inverse

.

1.2

DCT-II

C

k

I

⁢

I

=

p

k

⁢

∑

n

=

0

N

-

1

x

n

⁢

cos

⁡

π

⁢

(

n

+

1

2

)

⁢

k

N

k

=

0

,

1

,

2

,

…

,

N

-

1

p

k

=

2

-

δ

k

,

0

N

The inverse of DCT-II is DCT-III.

1.3

DCT-III

C

k

I

⁢

I

⁢

I

=

p

⁢

∑

n

=

0

N

-

1

x

n

⁢

q

n

⁢

cos

⁡

π

⁢

n

⁢

(

k

+

1

2

)

N

k

=

0

,

1

,

2

,

…

,

N

-

1

p

=

2

N

q

n

=

1

1

+

δ

n

,

0

The inverse of DCT-III is DCT-II.

1.4

DCT-IV

C

k

I

⁢

V

=

p

⁢

∑

n

=

0

N

-

1

x

n

⁢

cos

⁡

π

⁢

(

n

+

1

2

)

⁢

(

k

+

1

2

)

N

k

=

0

,

1

,

2

,

…

,

N

-

1

p

=

2

N

The DCT-IV is its own inverse.

1.5

DCT-V

C

k

V

=

p

k

⁢

∑

n

=

0

N

-

1

x

n

⁢

q

n

⁢

cos

⁡

π

⁢

n

⁢

k

N

-

1

2

k

=

0

,

1

,

2

,

…

,

N

-

1

p

k

=

2

-

δ

k

,

0

N

-

1

2

q

n

=

1

1

+

δ

n

,

0

The DCT-V is its own inverse.

1.6

DCT-VI

C

k

V

⁢

I

=

p

k

⁢

∑

n

=

0

N

-

1

x

n

⁢

q

n

⁢

cos

⁡

π

⁢

(

n

+

1

2

)

⁢

k

N

-

1

2

k

=

0

,

1

,

2

,

…

,

N

-

1

p

k

=

2

-

δ

k

,

0

N

-

1

2

q

n

=

1

1

+

δ

n

,

N

-

1

The inverse of DCT-VI is DCT-VII.

1.7

DCT-VII

C

k

V

⁢

I

⁢

I

=

p

k

⁢

∑

n

=

0

N

-

1

x

n

⁢

q

n

⁢

cos

⁡

π

⁢

n

⁢

(

k

+

1

2

)

N

-

1

2

k

=

0

,

1

,

2

,

…

,

N

-

1

p

k

=

2

-

δ

k

,

N

-

1

N

-

1

2

q

n

=

1

1

+

δ

n

,

0

The inverse of DCT-VII is DCT-VI.

1.8

DCT-VIII

C

k

V

⁢

I

⁢

I

=

p

⁢

∑

n

=

0

N

-

1

x

n

⁢

cos

⁡

π

⁢

(

n

+

1

2

)

⁢

(

k

+

1

2

)

N

+

1

2

k

=

0

,

1

,

2

,

…

,

N

-

1

p

=

2

N

+

1

2

The DCT-VIII is its own inverse.

2

Two-dimensional DCT

The DCT in two

dimensions

is simply the one-dimensional transform computed in each row and each column. For example, the DCT-II of a

N

1

×

N

2

matrix is given by

C

k

1

,

k

2

I

⁢

I

=

p

k

1

⁢

p

k

2

⁢

∑

n

1

=

0

N

1

-

1

∑

n

2

=

0

N

2

-

1

x

n

1

,

n

2

⁢

cos

⁡

π

⁢

(

n

1

+

1

2

)

⁢

k

1

N

1

⁢

cos

⁡

π

⁢

(

n

2

+

1

2

)

⁢

k

2

N

2

References

1

This entry is based on content from The Data Analysis Briefbook
(

http://rkb.home.cern.ch/rkb/titleA.html

http://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

Generated on Sat Feb 10 12:36:47 2018 by

LaTeXML