Download presentation
Presentation is loading. Please wait.
Published byPatricia Chandler Modified over 9 years ago
1
1 Image Compression
2
2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method
3
3 GIF Interlaced Mode
4
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
5 Digitized Documents FAX: T4(Group 3) T6 (Group 4) for ISDN Use modified Huffman codes See Fig 3.11
6
6 JPEG
7
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
8 JPEG Encoding Sequential (baseline) mode Progressive mode Hierarchical mode
9
9 Progressive Mode 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
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
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 Preparation Picture Processing Picture Processing Quantization Entropy Encoding Entropy Encoding Uncompressed Picture Compressed Picture
12
12 JPEG Encoder Schematic
13
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 YC b C r 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
14 Image/Block Preparation Block preparation
15
15 JPEG Compression/Decompression Compression Steps Decompression Steps
16
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
17 Forward DCT (1) In theory, DCT is lossless. In practice, information is lost because of truncation errors in calculation Forward DCT
18
18 Forward DCT(2)
19
19 Forward DCT (3) FDCT 64 DCT coefficients Spatial domain Frequency domain
20
20 Quantization 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
21
21 Entropy Encoding DC coefficients from consecutive DCT blocks Differential encoding AC coefficients Run-length encoding Then, Huffman encoding is used
22
22 Vectoring using zig-zag scan Data reordering: zigzag sequence low frequency comes first (larger values come first)
23
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
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
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
26 Frame Building Frame header contains Width and height of a complete image/picture Number and type of components (CLUT, RGB, YC b C r ) 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
27
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.