This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 2. Image Compression _+ Motivation — Size of an image 9 640*480 @ 24 bitsfplxel = 921,600 bytes
— One second of a Vldeo stream
9 921,600 bytes * 30 frames/sec = 22] Mbit/see
— 90minutes of video _ 5
o 221 Mbits/sec * 5400 seconds = l49gigBYteL?
a? , ﬁg Fundamental Methods + The following signal processing techniques
are used to reduce the size of an image — Subsampling
— Transform Coding
— Entropy Coding
+ Popular Standards: JPEG Subsampling 4 Recall YUV and Y’CbCr schemes which has one brightness component and two color
components + Humans are more sensitive on the changes
in brightness than the changes in colors + Thus, sampling the color components less
frequently than the brightness comp ht \
can save the number of pixels ‘ Example of Subsampling 4:' 2:1 huriznntal dummpling, 'nn verti K
cal dnwsampling I K 4 Y samples for every 2 Ch and 2 Cr {5 55
samples “i? _
. .1 (f v :7} Subsampling (cont) : reduction in both vertical and horizontal directions were; ._  ”1.» W e: Differentresolutions "for Iumiha‘h‘ce and cIiIéimman'ce possIbIe * '
 Luminance Y:high resolution
. Chrominance U, V: lower resolution Examples: . __
. 4:2:2: double resolUtion for luminance Coding
of four
pixels:  4:1;0‘: uv like mm :1; but only for ”one of'two interleed (half)fram JPEG 5..lmage Preparatian Example 4:2:2 YUV, 4:1 :1 YUV, and Y'UV9 Coding
 kumina‘nee (Y):  brightness o sampling frequency 13.5 MHz
. Chrominancai (U, V): 0 color differences . sampling frequency 6.75 MHz .. .3 m, 2’». System Components 0 Major components of compruclon m: i'r'ltlnpy
*!‘H mimg (11) mm CL. Lin, TILE). Discrete Cosine Transform
(DCT) +DCT is the discrete analog of the consine
transform 9 Transformation from spatial to frequency
domain § Redistribute redundancy to enable more
efﬁcient entropy encoding , 7S
r” / .‘ + Most current video compression st ds l” x
are DCT—based i . Assumptions.
 Data In the transformed domain is easier to compreSS
. Related processing is feasible Example: Fourier Transformation
————————————~—~—* frequency .._
domain 132+ time domain <~————————~——
Inverse Fourier Transformation FFT: Fast Fourier Transformation
DCT: Discrete Cosine Transformation General F arm of DC T 0 Mil term 0! DOT for NxN matrix ”—1 "—1 2 l k I '
at.»  Em.ww[ E E “wwﬂmﬂ—"iF‘PWH—"h—H n) nlIﬂ1=ﬂ where can “(11.5) 1H
arnrnlm, . 11...,“ DCT Example 0 Example for 313 image block with range [0.253]: T 1'
swing) = %C{kl)0[k2)[n z “n z 'ainl.nz)eoa(
I H 1 = aﬂnl + 1031 nun2 + Dir: T)“‘["T‘)] 98m:  Subtract 128 from each element to center the signal
" around 0
I Perform DCT on original image surﬁng) to yield S(k1,k2)
I Apply quantization matrix, T(k1.k2), on result of DCT to
yield
S(k1,k2)=NlNT(S(k1 ,k2)/T(k1 #2)),
where NINT is nearest integer function JPEG " Baseline. one: Quantization Use of quantlzatian tabla for thé DOTcoefﬁcients:
. Mapintenml of real numrs to. 6110 integer number
. Allows to use diﬂmm ruranla [ tor mahmeﬁlcmtl JPEG Baseline Mode: Entmpv C99m9 I I 63 AC coefficients:
. Ordering in ‘zigzag’ form A001 A007  _ _/
DC A077 . reason: coefficients in lower right corner are likely to be zero
 Huffman coding of all coefficients:
. Transformation into a code
Q. where amount of bits depends on frequency of respective value
 Subsequent runlength coding of zeros DCT Example 0 Example for 313 image block with range [0.253]: T 1'
swing) = %C{kl)0[k2)[n z “n z 'ainl.nz)eoa(
I H 1 = aﬂnl + 1031 nun2 + Dir: T)“‘["T‘)] 98m:  Subtract 128 from each element to center the signal
" around 0
I Perform DCT on original image surﬁng) to yield S(k1,k2)
I Apply quantization matrix, T(k1.k2), on result of DCT to
yield
S(k1,k2)=NlNT(S(k1 ,k2)/T(k1 #2)),
where NINT is nearest integer function (1) Original Frame I"""1"5’" 131143 133134143131
11.113311411413114“:
mun11111113113131 0“ 11111113111151.11
Humming133m
mil14311313314313:
113113133141133114113
133113131113131113134 (a) After DOT Suﬁ*1}: 313 33 4113134311.
—33..11134431.1—14—1
411411113311411134
111—3 3 11 11—11—13 1
—i 1 3 4—3—1 —3 3
1 3 33114 11 3
4 4 4—1—33 1 4
3 1 4—4—14 3 1 DC T Example (cont. ) (2) Subtract "128" ""I'W' 3331—34133333431 5515—11455535141
5144' 43 545145335
454'! 5145513133!
545' 51 455435145
5151 51 515541441
5151 51 545541145
5151 53 515541141 (4) Quantization Matrix 1:11.11; . 15111111514 411 51 51
1111141515 55 ill 55
1413151444 5? 55 55
1411111! 51 5'? BI 51
1511315555 11191031”!
1.4355554511114113 51
41541551111111131“
115155551111I1I5” DC T Example (cont. ) (5) After Dlvlnlon by MW“ matrix .... “kll)
Suﬁ"1} ' um“ I I 41311
3*J 1 I] I I
4] l n I I
lllll
IIIII
IIIII
IIIII
IIIII H (6) 219—239 Scan —I 3531 43111 400 1'1r'9r' cannon“ a 10000
ooau0ﬁ°°°°°°ﬂ ‘ﬁﬁunﬂﬁ Oi i H uﬁcman Encoding (cont) 0 Symbols with higher probabilities are assigned shorter
codewords. Symbol Code Probability 3332
31 0 p1: SIB1%; I s2 100 pg: 332 '
53 1 10 p3: W32
34: 1110 p4: 1332  .
55 101 p5: 1x8; =‘lﬁz
s5 1 111 p3: 1332 ' I Unliormlength code:
I Huffman code: I Optimal (entropy): 5. Entropy coding: __ _ __ I]
RunLength (only "Wail 'Wl'" "0 Assumption:
. Long sequences of identical symbols Example:
...ABCEEEEEEDACB... compression symbol special flag Special variant: zerolength encoding
 onIV rebetition of zeroes count J PEG 0Became an ISO international standard in
1992 + Use most of the techniques introduced
earlier § Both. of the sequential and progressive
presentations are supported I / ' I ___r ...__...._\~ I __
$0“
a '15 1r; ﬁ‘
' a
i tn. I;
(E
J (IraFf" ‘1 K N. Very general compression scheme 'Independence of:
. Image resolution
. Image and pixel aspect ratio
 Color representation
 Image complexity and statistical characteristics Welldefined interchange format of encoded data Implementation In:
 Software only  Software and hardware “MOTION JPEG” for video compression
 Sequence of JPEGencoded images ...
View
Full Document
 Fall '15
 Johnathanliu
 DCT, nearest integer function, original image surﬁng, quantization matrix

Click to edit the document details