Professional Documents
Culture Documents
⎢⎢x2⎥⎥
⎧⎪ 1
if x =0
Discrete Cosine Transform
C(x)=⎨ 2
⎪⎩1 otherwise
• For N = M = 8 (used for JPEG Standard), the 2D
DCT is ...
∑∑
~ 77
C(u)C(v) (2i+1)uπ (2 j +1)vπ f (i, j) = u= =0 v 0
⎧⎪ 1
if x =0
C(x)=⎨ 2
Discrete Cosine Transform
⎪⎩1 otherwise
• The inverse 1D-DCT is defined by
∑
~ C(u) (2i+1)uπ f (i)=
7
=
2 cos 16 F(u)
u0
⎧⎪ 1
if x =0
C(x)=⎨ 2
Discrete Cosine Transform
⎪⎩1 otherwise
• An electrical signal with constant magnitude is known as a
DC signal (Direct Current) – For example, a 9-volts battery.
• An electrical signal that changes its magnitude periodically
at a certain frequency is known as an AC signal (alternating
Current)
– For example, household electric power circuit (110 volts, 60Hz vs.
220 volts 50Hz)
• Although most signals are complex, any signal can be
expressed as a sum of multiple signals that are sine or cosine
waveforms at various amplitudes and frequencies.
– This is known as Fourier Analysis
Discrete Cosine Transform
• If a cosine function is used, the process of
determining the amplitudes of the AC and
DC components of the signal is called a
Cosine Transform, and the integer indices
make it a Discrete Cosine Transform.
– When u=0, F(u) yields the DC coefficient
– When u = 1, 2, ..., 7, F(u) yields the first,
second, ..., seventh AC coefficient.
• The inverse transform uses a sum of the
products of the DC or AC coefficients and the
Discrete Cosine Transform
cosine functions to reconstruct the function
f(i), now known as f~(i).
• Both DCT and IDCT use the same set of
cosine functions, known as basis functions.
• The idea behind Transform Coding is to use
only a few coefficients that result in the
highest energy
Examples (1D-DCT)
Examples (1D-DCT)
Discrete Cosine Transform
• Approximation of the ramp function using a
3-term DCT approximation vs. a 3-term
DFT approximation.