Thomas Wiegand: Digital Image Communication Transform Coding - 1 Transform Coding Transform Coding • Principle of block-wise transform coding • Properties of orthonormal transforms • Discrete cosine transform (DCT) • Bit allocation for transform coefficients • Entropy coding of transform coefficients • Typical coding artifacts • Fast implementation of the DCT Thomas Wiegand: Digital Image Communication Transform Coding - 2 Transform Coding Principle Transform Coding Principle • Transform coder (T ) / decoder ( T -1 ) structure u i v • Insert entropy coding ( ) and transmission channel T Τ −1 • Structure Quantizer u v T T -1 U V U V T -1 u U i V i channel b b T v α β α β γ α β γ 1 γ −
15
Embed
Transform Coding - HHIip.hhi.de/imagecom_G1/assets/pdfs/transform_coding_03.pdfThomas Wiegand: Digital Image Communication Transform Coding - 14 Discrete Cosine Transform and Discrete
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Thomas Wiegand: Digital Image Communication Transform Coding - 1
Transform CodingTransform Coding
• Principle of block-wise transform coding
• Properties of orthonormal transforms
• Discrete cosine transform (DCT)
• Bit allocation for transform coefficients
• Entropy coding of transform coefficients
• Typical coding artifacts
• Fast implementation of the DCT
Thomas Wiegand: Digital Image Communication Transform Coding - 2
Exploit horizontal and vertical dependencies by processing blocks
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 7
Separable Separable OrthonormalOrthonormal Transforms, ITransforms, I• Problem: size of vectors N*N (typical value of N: 8)• An orthonormal transform is separable, if the transform of a signal
block of size N*N-can be expressed by
• The inverse transform is
• Great practical importance: transform requires 2 matrix multiplications of size N*N instead one multiplication of a vector of size1*N2 with a matrix of size N2*N2
• Reduction of the complexity from O(N4) to O(N3)
N*N transform coefficients
N*N block of input signal
Orthonormal transform matrix of size N* N
1−U=TuT
T=u T UT
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 8
Separable 2-D transform is realized by two 1-D transforms• along rows and • columns of the signal block
N*N block ofpixels
column-wise N-transform
row-wiseN-transform
N*N block oftransform
coefficients
N
N
Separable Separable OrthonormalOrthonormal Transforms, IITransforms, II
u Tu TTuT
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 9
Criteria for the Selection of a Particular TransformCriteria for the Selection of a Particular Transform
DCT coding with increasingly coarse quantization, block size 8x8
quantizer step size quantizer step size quantizer step sizefor AC coefficients: 25 for AC coefficients: 100 for AC coefficients: 200
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 26
• Efficiency as a function of block size NxN, measured for 8 bit Quantization in the original domain and equivalent quantization inthe transform domain.
• Block size 8x8 is a good compromise between coding efficiency and complexity
Influence of DCT Block SizeInfluence of DCT Block Size
=Memoryless entropy of original signalmean entropy of transform coefficients
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 27
DCT matrix factored into sparse matrices (Arai, Agui, and Nakajima; 1988):
1M =
1 1
1 1
1 1 1 1 1 -1
-1 1
0
0S =
0s1s
2s3s
4s5s
6s7s
0
0
P =
1 1
1 1
1 1
1 1
2M =
1 1
1 1 -1 1
1 1 1
1 -1 1
0
0
3M =
1 1
1
1
0
0
C2
-C2C4
C4
-C6
-C6
4M =
1 1 1 -1
1 1 1
1 1
1 1
0
0
5M =
1 1 1 1 1 -1
1 -1 -1 -1
1 1 1 1
1
0
0
6M =
1 1 1 1
1 1 1 1 1 -1
1 -1 1 -1
1 -10
0
0 0
FastFast DCT Algorithm IDCT Algorithm I
= ⋅= ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅1 2 3 4 5 6
y M xS P M M M M M M x
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 28
Signal flow graph for fast (scaled) 8-DCT according to Arai, Agui, Nakajima:
x0
x1
x2
x3
x5
x6
x7
a5
a4
a3
a2
a1
s 0
s 4
s 2
s 6
s 3
s 1
s 7
s 5
y0
y4
y2
y6
y5
y1
y7
y3
x4
u m umMultiplication:
u+vv
u
vu-v
u
Addition:
Fast DCT Algorithm II Fast DCT Algorithm II
scaling
only 5 + 8Multiplications(direct matrixmultiplication:64 multiplications)
65
264
43
0622
41
16
714
122
1
Ca
)kscos(CCCa
...k;C
sCa
sCCa
Ca
K
K
K
==+=
=⋅
==⋅
=−=
=
from: Girod
Thomas Wiegand: Digital Image Communication Transform Coding - 29
Transform Coding: Summary Transform Coding: Summary • Orthonormal transform: rotation of coordinate system in
signal space
• Purpose of transform: decorrelation, energy concentration
• KLT is optimum, but signal dependent and, hence, without a fast algorithm
• DCT shows reduced blocking artifacts compared to DFT
• Bit allocation proportional to logarithm of variance
• Threshold coding + zig-zag scan + 8x8 block size is widely used today (e.g. JPEG, MPEG-1/2/4, ITU-T H.261/2/3)
• Fast algorithm for scaled 8-DCT: 5 multiplications, 29 additions