part2_jpeg - 2 Image Compression Motivation — Size of an...

Info icon This preview shows pages 1–21. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
Image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 12
Image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 14
Image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 16
Image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 18
Image of page 19

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 20
This is the end of the preview. Sign up to access the rest of the 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 -— 90-minutes of video _ 5 o 221 Mbits/sec * 5400 seconds = l49gigBYte-L? a? , fig 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 efficient 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 “wwflmfl—"iF-‘PWH—"h—H n) nl-Ifl1=fl where can “(11.5) 1-H 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 = aflnl + 1031 nun2 + Dir: T)“‘["T‘)] 98m: - Subtract 128 from each element to center the signal " around 0 I Perform DCT on original image surfing) 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 J-PEG " Baseline. one: Quantization Use of quantlzatian tabla for thé DOT-coefficients: . Mapintenml of real numrs to.- 6110 integer number . Allows to use diflmm ruranla [ tor mahmefilcmtl JPEG- Baseline Mode: Entmpv C99m9 I I 63 AC coefficients: . Ordering in ‘zig-zag’ 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 = aflnl + 1031 nun2 + Dir: T)“‘["T‘)] 98m: - Subtract 128 from each element to center the signal " around 0 I Perform DCT on original image surfing) 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“: mun-11111113113131 0“ 11111113111151.11- Humming-133m mil-14311313314313: 113113133141133114113 133113131113131113134 (a) After DOT Sufi-*1}: 313 33 411313-4311.- —33..11134431.-1—14—1 41141111331141-1134 -111—3 3 11 11—11—13 1 —i 1 3 4—3—1 —3 3 1 3 3-31-14 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 .... “kl-l) Sufi-"1} ' um“ I I 413-11 -3*J 1 I] I I 4-] l n I I lllll IIIII IIIII IIIII IIIII H (6) 219—239 Scan —I- 35-3-1 4-311-1 400 1'1r'9r' cannon“ a 10000 ooau0fi°°°°°°fl ‘fifiunflfi Oi i H uficman Encoding (cont) 0 Symbols with higher probabilities are assigned shorter codewords. Symbol Code Probability 3332 31 0 p1: SIB-1%; I s2 100 pg: 332 ' 53 1 10 p3: W32 34: 1110 p4: 1332 - . 55 101 p5: 1x8; =‘lfiz s5 1 111 p3: 1332 ' I Unliorm-length code: I Huffman code: I Optimal (entropy): 5. Entropy coding: __ _ __ I] Run-Length (only "Wail 'Wl'" "0 Assumption: . Long sequences of identical symbols Example: ...ABCEEEEEEDACB... compression symbol special flag Special variant: zero-length 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; fi‘ ' a i tn. I; (E J (Ira-Ff" ‘1 K N. Very general compression scheme 'Independence of: . Image resolution . Image and pixel aspect ratio - Color representation - Image complexity and statistical characteristics Well-defined interchange format of encoded data Implementation In: - Software only - Software and hardware “MOTION JPEG” for video compression - Sequence of JPEG-encoded images ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern