1 / 65

CH 8. Image Compression

CH 8. Image Compression. 8.1 Fundamental 8.2 Image compression model 8.3 Elementary of information theory 8.4 Error-free(Lossless) compression 8.5 Lossy compression-JPEG 8.6 Image compression standards. Final Exam. Final Exam Registration: until 4 th July(Mon)

carraway
Télécharger la présentation

CH 8. Image Compression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CH 8. Image Compression 8.1 Fundamental 8.2 Image compression model 8.3 Elementary of information theory 8.4 Error-free(Lossless) compression 8.5 Lossy compression-JPEG 8.6 Image compression standards

  2. Final Exam • FinalExam Registration: until 4th July(Mon) • Final Exam Date & Time: 20th July(Wed), 2016 10:00-12:00 • Place: Z613 ( D436) • Evaluation sheet

  3. How is HVS sensitivity? • Lossy encoding Frequency sensitivity of Human Visual System

  4. Lossy Methods - Taxonomy

  5. Lossy Compression • Transform the image into some other domain to reduce interpixelredundancy. ~ (N/n)2 subimages

  6. Example: Fourier Transform Note that the magnitude of the FT decreases, as u, v increase! K << N K-1 K-1

  7. Transform Selection • T(u,v) can be computed using various transformations, for example: • DFT • DCT (Discrete Cosine Transform) • KLT (Karhunen-LoeveTransformation) or Principal Component Analysis (PCA) • JPEG using DCT for handling interpixelredundancy.

  8. DCT (Discrete Cosine Transform) Forward: Inverse: if u=0 if v=0 if v>0 if u>0

  9. DCT (cont’d) • Basis functions for a 4x4 image (i.e., cosines of different frequencies).

  10. DCT (cont’d) DFT WHT DCT Using 8 x 8 sub-images yields 64 coefficients per sub-image. Reconstructed images by truncating 50% of the coefficients More compact transformation RMS error: 2.32 1.78 1.13

  11. DCT (cont’d) • Sub-image size selection: Reconstructions 2 x 2sub-images 4 x 4sub-images 8 x 8sub-images original

  12. DCT (cont’d) • DCT minimizes "blocking artifacts" (i.e., boundaries between subimagesdo not become very visible). DFT has n-point periodicity DCT has 2n-point periodicity

  13. JPEG Compression

  14. JPEG - Steps 1. Divide image into 8x8 subimages. For each subimage do: 2.Shift the gray-levels in the range [-128, 127] 3.Apply DCT  64 coefficients 1 DC coefficient: F(0,0) 63 AC coefficients: F(u,v)

  15. Example [-128, 127] (non-centered spectrum)

  16. JPEG Steps 4.Quantize the coefficients (i.e., reduce the amplitude of coefficients that do not contribute a lot). Q(u,v): quantization table

  17. Example • Simple Quantization Table Q[i][j]

  18. Example (cont’d) Quantization

  19. JPEG Steps (cont’d) 5.Order the coefficients using zig-zagordering - Creates long runs of zeros (i.e., ideal for run-length encoding)

  20. JPEG Steps (cont’d) 6.Encode coefficients: 6.1 Form “intermediate” symbol sequence. 6.2 Encode “intermediate” symbol sequence into a binary sequence.

  21. Intermediate Symbol Sequence – DC coeff symbol_1 (SIZE)symbol_2 (AMPLITUDE) DC (6) (61) SIZE: # bits need to encode the coefficient

  22. DC (6) (61)  1110 111101

  23. DC Coefficient Encoding symbol_1 symbol_2 (SIZE) (AMPLITUDE) predictive coding:

  24. Intermediate Symbol Sequence – AC coeff symbol_1 (RUN-LENGTH, SIZE)symbol_2 (AMPLITUDE) end of block AC (0, 2) (-3) RUN-LENGTH: run of zeros preceding coefficient SIZE: # bits for encoding the amplitude of coefficient Note: If RUN-LENGTH > 15, use symbol (15,0) ,

  25. Example: AC Coefficients Encoding AC (0,2) (-3)  (01 00)

  26. Final Symbol Sequence 1110 111101 01 00 100 0100 ……….

  27. What is the effect of the “Quality” parameter? (8k bytes) (58k bytes) (21k bytes) higher compression lower compression

  28. What is the effect of the “Quality” parameter? (cont’d)

  29. Effect of Quantization: homogeneous 8 x 8 block

  30. Effect of Quantization: homogeneous 8 x 8 block (cont’d) Quantized De-quantized

  31. Effect of Quantization: homogeneous 8 x 8 block (cont’d) Reconstructed Error is low! Original

  32. Effect of Quantization: non-homogeneous 8 x 8 block

  33. Effect of Quantization: non-homogeneous 8 x 8 block (cont’d) Quantized De-quantized

  34. Effect of Quantization: non-homogeneous 8 x 8 block (cont’d) Reconstructed Error is high! Original:

  35. 8.6 Image compression standards • JPEG supports several different modes • Sequential Mode – Baseline • Progressive Mode • Hierarchical Mode • Lossless Mode • The default mode is “sequential” • Image is encoded in a single scan (left-to-right, top-to-bottom).

  36. Progressive JPEG • Image is encoded in multiple scans, in order to produce a quick, rough decoded image when transmission time is long. Sequential Progressive

  37. Progressive JPEG (cont’d) • Each scan encodes a subset of DCT coefficients. • We’ll examine the following algorithms: (1) Progressive spectral selection algorithm (2) Progressive successive approximation algorithm (3) Combined progressive algorithm

  38. Progressive JPEG (cont’d) (1) Progressive spectral selection algorithm • Group DCT coefficients into several spectral bands • Send low-frequency DCT coefficients first • Send higher-frequency DCT coefficients next

  39. Example

  40. Progressive JPEG (cont’d) (2) Progressive successive approximation algorithm • Send all DCT coefficients but with lower precision. • Refine DCT coefficients in later scans.

  41. Example

  42. Example after 0.9s after 1.6s after 3.6s

  43. Progressive JPEG (cont’d) (3) Combined progressive algorithm • Combines spectral selection and successive approximation.

  44. Hierarchical JPEG • Hierarchical mode encodes the image at different resolutions. • Image is transmitted in multiple passes with increased resolution at each pass.

More Related