1 / 27

Image Compression

Image Compression. GIF: Graphics Interchange Format. Basic mode. A LZW method. Dynamic mode. GIF Interlaced Mode. TIFF: Tagged Image File Format. Supports pixel resolution up to 48 bits (16x3) Intended for transfer both images and digitized documents Code #1: uncompressed format

chuck
Download Presentation

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. Image Compression

  2. GIF: Graphics Interchange Format Basic mode A LZW method Dynamic mode

  3. GIF Interlaced Mode

  4. TIFF: Tagged Image File Format • Supports pixel resolution up to 48 bits (16x3) • Intended for transfer both images and digitized documents • Code #1: uncompressed format • Code # 2, 3, 4: digitized document • Code # 5: LZW-comprfessed

  5. Digitized Documents • FAX: • T4(Group 3) • T6 (Group 4) for ISDN • Use modified Huffman codes • See Fig 3.11

  6. JPEG

  7. What is the JPEG? • JPEG: Joint Photographic Experts Group • general-purpose compression standard of for continuous-tone still image (gray scale and color) • jointly developed by ITU-T and ISO • Encoding modes • Lossless mode • Sequential DCT-based mode (baseline mode) • Progressive DCT-based mode • Hierarchical mode

  8. JPEG Encoding Hierarchical mode Sequential (baseline) mode Progressive mode

  9. Progressive Mode • Each image component is encoded in multiple scans • Successive refinement on a rough image untill reaching the requested quality • Bit rate is same with that of sequential mode • a kind of data re-ordering • Preview image can be generated without he need to completely decode the image

  10. Hierarchical Mode • A progressive presentation • Encodes an image at multiple resolutions • For a low resolution display device a ‘best’ image is available • Hierarchical mode : without receiving unnecessary data for higher resolution • Progressive mode : only after the total transmission time for the full-resolution • Hierarchical mode is more effective in network environment

  11. Major Steps of Image Compression • Picture (Image) Preparation • analogue-to-digital conversion through sampling • A picture is divided into blocks of 8x8 pixels • Picture (Image) Processing: source coding • forward DCT • Quantization: lossy • mapping of the real numbers into integers • Entropy Encoding: lossless • Run length coding • Huffman coding or Arithmetic coding Picture Preparation Picture Processing Quantization Entropy Encoding Compressed Picture Uncompressed Picture

  12. JPEG Encoder Schematic

  13. Image Preparation • Separation of source image into color components • 1 ~ 255 components (or plane) • e.g.) 1 component for gray-scale image, 3 components for RGB, or YCbCr • Each component may have different horizontal resolution • e.g.) YUV: 4:2:0 format • Subdivision of components into 8x8 pixel blocks • noninterleaved date ordering: component by component • interleaved data ordering

  14. Image/Block Preparation Block preparation

  15. JPEG Compression/Decompression Compression Steps Decompression Steps

  16. Discrete Cosine Transform • One-dimensional DCT: used in audio • Two-dimensional DCT: used in image • Spatial or temporal domain  frequency domain • Each 8x8 block of samples is transformed • Intuition • Sampled values usually vary slightly from point to point • Coefficient of the low frequency  high value • Coefficient of high frequencies  small or zero • Human eyes is highly sensitive at low-intensity levels, whereas its sensitivity is greatly reduced at high-intensity levels • A reduction of the number of high-frequency DCT coefficients weakly affects image quality

  17. Forward DCT (1) • In theory, DCT is lossless. • In practice, information is lost because of truncation errors in calculation • Forward DCT

  18. Forward DCT(2)

  19. Forward DCT (3) 64 DCT coefficients FDCT Frequency domain Spatial domain

  20. 64 DCT coefficients are quantized according to an quantization table specified by application. Lossy Quantization levels are different for each frequency more precise level for low freq. determined by experiments Quantization matrices are suggested by JPEG Quantization

  21. Entropy Encoding • DC coefficients from consecutive DCT blocks • Differential encoding • AC coefficients • Run-length encoding • Then, Huffman encoding is used

  22. Vectoring using zig-zag scan • Data reordering: zigzag sequence • low frequency comes first (larger values come first)

  23. Differential Encoding • DC coefficients in consecutive quantized blocks • 12, 13, 11, 11, 10, … •  12, 1, -2, 0, -1, … • Encoded in the form (SSS, value), where SSS: # of bits needed to encode the value

  24. Run-length Encoding • Remaining 63 AC coefficients in the vector may contain long strings of zeros • Use RLE: (skip, value), where skip: # of zeros in the run, value: next nonzero coefficient • (0,6)(0,7)(0,3)(0,3)(0,3)(0,2)(0,2)(0,2)(0,2)(0,0)(0,0) indicates the end of the string for this block • The value field is encoded in the form SSS/value

  25. Huffman Encoding • JPEG provides the Huffman code tables used with DC and AC coefficients for both luminance and chrominance • Arithmetic encoding is also specified in JPEG, but protected by patent

  26. Frame header contains Width and height of a complete image/picture Number and type of components (CLUT, RGB, YCbCr) Digitization format (4:2:2, 4:2:0, etc) Scan: contains a component Scan header contains Identity of components (R/G/B) # of bits used to digitize each component Quantization table Frame Building

  27. JPEG Decoding • In progressive mode, first the DC and low-frequency coefficients of each block are sent • In hierarchical mode, the total image is first sent using a low resolution – i.e. 320x240 – then at high resolution 640x480

More Related