Presentation is loading. Please wait.

Presentation is loading. Please wait.

JPEG Pasi Fränti 16.2.2016.

Similar presentations


Presentation on theme: "JPEG Pasi Fränti 16.2.2016."— Presentation transcript:

1 JPEG Pasi Fränti

2 History of JPEG Standard since 1992 (ISO, CCITT, IEC)
Nothing existed for true color (24-bpp) RGB images. Only method was GIF (8-bits color palette) Lossy (default) + Lossless (not well known) Supports also progressive mode Better methods exists (JPEG 2000, J2K) but JPEG remains the most popular method. William B. Pennabaker, Joan L. Mitchel JPEG: Still Imatge Data Compression Standard Springer Science & Business Media, 1992.

3 JPEG Compression Decompression

4 Discrete cosine transform 1-dimensional
DCT transform Inverse transform Scaling factors

5 Discrete cosine transform 2-dimensional
DCT transform Inverse transform 5

6 DCT

7 DCT basis functions N=8 7

8 DCT basis functions 2-dimensional (N=4)
8

9 Example blocks Flat Original Transformed 10 40.0 0.0 9

10 Example blocks Random texture
Original Transformed 11 15 18 14 13 12 16 19 17 58.8 0.3 -1.8 1.3 -3.9 -2.8 -3.5 2.6 2.7 -1.7 1.2 -3.4 3.0 -0.9 -5.3 1.8 10

11 Example blocks Impulse
Original Transformed 10 20 42.5 1.4 -2.5 -3.2 0.7 -1.4 -1.8 2.5 3.3 4.3 11

12 Example blocks Line (horizontal)
Original Transformed 10 20 50.0 0.0 -5.4 -10.1 13.1 12

13 Example blocks Edge (vertical)
Original Transformed 10 20 60.0 -18.4 0.0 7.7 13

14 Example blocks Edge (horizontal)
Original Transformed 10 20 60.0 0.0 -18.4 7.7 14

15 Example blocks Edge (diagonal)
Original Transformed 10 20 55.0 -11.1 0.0 -0.7 5.0 4.6 -5.0 -1.9 15

16 Example blocks Slope (horizontal)
Original Transformed 10 12 14 16 52.0 -8.9 0.0 -0.6 16

17 Quantization

18 Quantization Quantization equation: Example (q=2): Dequantization:
ci = original coefficient q = quantization factor Dequantization:

19 Possible quantization tables
Uniform More accurate Less accurate 16 1 2 4 8 16 32 64 8 64 128 256

20 Quantization tables in JPEG
Luminance (Y) Chrominance (U,V) 16 11 10 24 40 51 61 12 14 19 26 58 60 55 13 57 69 56 17 22 29 87 80 62 18 37 68 109 103 77 35 64 81 104 113 92 49 78 121 120 101 72 95 98 112 100 99 17 18 24 47 99 21 26 66 56

21 Coding

22 Entropy coding DC coefficient AC coefficients DC coefficient:
Prediction using DC of the previous block Prediction error by Lossless JPEG AC coefficients: Zig zag scanning Subsequent zero values by run-length coding Non-zero values by Huffman coding Alternatively arithmetic coding DC coefficient AC coefficients 42.5 1.4 -2.5 -3.2 0.7 -1.4 -1.8 2.5 3.3 4.3

23 Progressive mode 1 2 3 4 Image blocks: Sequential mode DC AC AC AC …
DC DC DC DC AC AC AC AC AC AC AC AC AC AC AC AC

24 Example

25 Original 139 144 149 153 155 151 156 159 150 160 163 158 161 162 157 Transformed 235.6 -1.0 -12.1 -5.2 2.1 -1.7 -2.7 1.3 -22.6 -17.5 -6.2 -3.2 -2.9 -0.1 0.4 -1.2 -10.9 -9.3 -1.6 1.5 0.2 -0.9 -0.6 -7.1 -1.9 0.9 0.0 0.3 -0.8 1.6 -0.7 0.6 1.8 -0.2 -0.3 1.0 -1.3 -0.4 -1.5 -0.5 1.7 1.1 -2.6 -3.8 -1.8 1.9 1.2

26 Quantization table Quantized 16 11 10 24 40 51 61 12 14 19 26 58 60 55
13 57 69 56 17 22 29 87 80 62 18 37 109 103 77 35 64 71 104 113 92 49 78 121 120 101 72 95 98 112 100 99 Quantized 15 -1 2

27 Dequantized Reconstructed 240 -10 -24 -12 -14 -13 144 146 149 152 154
-10 -24 -12 -14 -13 Reconstructed 144 146 149 152 154 156 148 150 155 157 158 160 161 162 159 163 164

28 Visual quality Original JPEG 1 bpp JPEG 0.5 bpp JPEG bpp

29 JPEG versus PNG

30 The End


Download ppt "JPEG Pasi Fränti 16.2.2016."

Similar presentations


Ads by Google