Download presentation
Presentation is loading. Please wait.
Published bySharyl Cummings Modified over 9 years ago
1
COMPRESSION AND DECOMPRESSION 10/22/20151 A.Aruna, Assistant Professor, Faculty of Information Technology
2
Introduction Video and audio have much higher storage requirements than text Data transmission rates (in terms of bandwidth requirements) for sending continuous media are considerably higher than text Efficient compression of audio and video data, including some compression standards
3
COMPRESSION Compression is a reduction in the number of bits needed to represent data. save storage capacity speed file transfer decrease costs for storage hardware and network bandwidth. 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 3
4
10/22/20154 Multimedia Compression Audio, image and video require vast amounts of data 320x240x8bits grayscale image: 77Kb 1100x900x24bits color image: 3MB 640x480x24x30frames/sec: 27.6 MB/sec Low network’s bandwidth doesn't allow for real time video transmission Slow storage or processing devices don't allow for fast playing back Compression reduces storage requirements A.Aruna, Assistant Professor, Faculty of Information Technology
5
10/22/20155 Classification of Techniques Lossless: recover the original representation. Mechanisms: Packbits encoding(Run Length Encoding) CCITT Group 3 1D CCITT Group 3 2D CCITT Group 4 Lempel – Ziv and Welch Algorithm LZW A.Aruna, Assistant Professor, Faculty of Information Technology
6
Classification of Techniques Lossy: recover a representation similar to the original one graphics, audio, video and images Mechanisms: Joint Photographic Experts Group Moving Picture Experts Group Intel DVI CCITT H.26l Video Coding Algorithm Fractals 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 6
7
BINARY IMAGE COMPRESSION Used for Documents (Black & White) Continuous Tone Information Office & Business Document Handwritten Text Line Graphics Engineering Drawing Scanning Documents 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 7
8
BINARY IMAGE COMPRESSION Scanning Process Scanline – Top to Bottom, Left to right Composed of Various Objects CCD Array Sensor – B/W Dots- Memory Eg: Faxing – 1 Page – 20 seconds 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 8
9
Packbits Encoding or Runlength Encoding Simplest and earliest Data Compression Schemes Binary Image Consecutive Repeated – Two Bytes First Byte – No.of times Character is Repeated Second Byte – Character itself 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 9
10
Packbits Encoding or Runlength Encoding 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 10
11
CCITT Group 3 1-D Compression Based on Runlength Encoding Facsimile & Early document Imaging System Large Size even after Compression Modified Runlength encoding is Huffman Encoding 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 11
12
CCITT Group 3 1-D Compression Huffman Encoding Variable Length Encoding Shorter Code – Frequently Longer code – Less Frequently Probability of Occurrence of white and black Pixel It is based on a coding Tree, which is constructed based on the probability of occurrences of white pixels and black pixels in the run length or bit streams 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 12
13
CCITT Group 3 1-D Compression probability of occurrences of bit stream of length Rn = P(Rn) 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 13
14
10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 14
15
10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 15
16
Large Pixel Sequences 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 16
17
Example 16 White Pixel = 101010 - Frequently 16 Black Pixel = 0000010111 Quicker decoding Tree Structure to be constructed 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 17
18
Makeup code : length in Multiples of 64 pixels Terminating code: length less than 64 pixels 132 white pixels is 100101011 Make up code for 128 = 10010 Terminating code for 4 = 1011 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 18
19
Coding Tree 16 white 101010 and black pixel 0000010111 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 19 1 0 1 0 1 0
20
CCITT Group 3 2D Compression 2-dimensional coding Images are divided into several groups of K lines the first line of each group is encoded using CCITT Group 3 1D method The rest of lines are encoded using some "differencial schemes" Typically compression ratio 10 ~ 20 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 20
21
CCITT Group 3 2D Compression The "K-factor" allows more error- free transmission World-wide fassimile standard The 2D scheme uses a combination of additional codes called vertical code, pass code, and horizontal code 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 21
22
CCITT Group 3 2D Compression 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 22
23
CCITT Group 3 2D Compression Only one pass code, i.e. 0001 and one horizontal code, i.e. 001 If vertical code and horizontal code are not applied, then the horizontal code is appied Horizontal Code + Group 3 1D Code = 001 + markup code + terminating code 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 23
24
COLOR, GRAY SCALE& STILL VIDEO IMAGE COMPRESSION 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 24 http://cs.stanford.edu/people/eroberts/courses/so co/projects/data- compression/lossy/jpeg/coeff.htm
25
INTRODUCTION Adds a another Dimension to image. Indicate the states Red - ? Green? Adds Depth to the image – Background & Dense in Nature Presenting Information 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 25
26
In Physics? Visible Light – Electromagnetic Spectrum Radiation or Radiant Energy Frequency Ranges ?????????? Radiant Energy is measured in terms Wavelength & Frequency Relationship?????? Velocity of light c = 3 x 10 8 Meters 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 26
27
10/22/2015 A.Aruna, Assistant Professor, Faculty of Information Technology 27
28
COLOR Primary Color Complementary Color Approaches Additive Subtrative 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 28
29
COLOR CHARACTERISTICS Luminance or Brightness – Emitted or reflected from object Hue – Color Appearances Saturation – Color Intensity 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 29
30
COLOR MODELS Chromacity Model RGB Model HSI Model CMY Model YUV or YUI Model B/W TV or COLOR IMAGE COMPOSITION 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 30
31
JOINT PHOTOGRAPHIC EXPERTS GROUP COMPRESSION JPEG – Joint ISO & CCITT Working Committee - exclusively for Still Image Joint Committee – MPEG – Full Motion Standards Works with colour and greyscale images Up to 24 bit colour images Suitable for many applications e.g., satellite, medical, general photography... 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 31
32
10/22/201532 JPEG Modes of Operation Sequential DCT: the image is encoded in one left-to-right, top-to-bottom scan Progressive DCT: the image is encoded in multiple scans (if the transmission time is long, a rough decoded image can be reproduced) Hierarchical: encoding at multiple resolutions Lossless : exact reproduction A.Aruna, Assistant Professor, Faculty of Information Technology
33
JPEG Standards Level Baseline – Maintain High Compression Ratio Special Lossless Function – No Loss of Data Extended System – Various Encoding Variable Length Encoding Progressive Length Encoding Hierarchical Encoding 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 33
34
OVERVIEW OF JPEG STANDARDS Components Baseline Sequential Codec – DCT Coefficients, Quantization And Entropy Encoding DCT Progressive Mode – Multiple Scans – Until Reached Picture Quality (Based on Quantization) Predictive Lossless Encoding Hierarchical Mode – Different Resolution 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 34
35
JPEG IMPLEMENTATION Discrete Cosine Transformation Reduce the level in Gray Scale and Color Image ( 2D – Amplitude & Frequency) Reduce Series of Data Remove The redundant data ( time to frequency Domain) 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 35
36
10/22/201536A.Aruna, Assistant Professor, Faculty of Information Technology
37
DCT 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 37
38
INPUT 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 38 140144147140 155179175 144152140147140148167179 152155136167163162152172 168145156160152155136160 162148156148140136147162 147167140155 140136162 136156123167162144140147 148155136155152147 136
39
OUTPUT 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 39 186-1815-923-9-1419 21-3426-9-1111147 -10-24-26-183-20 -8-514-15-8-3 8 1081-1118 15 4-2-1888-41-7 91-34-7-2 0-8-2214-60
40
Quantization Precision of Integer – Reduce No. of bits is used to store the values 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 40
41
10/22/201541 Quantization Step Reduces the amplitude of coefficients which contribute little or nothing to 0 Discards information which is not visually significant Quantization coefficients Q(u,v) are specified by quantization tables A set of 4 tables are specified by JPEG A.Aruna, Assistant Professor, Faculty of Information Technology
42
10/22/201542 Quantization Tables for (i=0; i < 64; i++) for (j=0; j < 64; j++) Q[i,j] = 1 + [ (1+i+j) quality]; quality = 1: best quality, lowest compression quality = 25: poor quality, highest compression A.Aruna, Assistant Professor, Faculty of Information Technology
43
10/22/201543 Entropy Encoding Encodes sequences of quantized DCT coefficients into binary sequences AC: (runlength, size) (amplitude) DC: (size, amplitude) runlength: number consecutive 0’s, up to 15 takes up to 4 bits for coding (39,4)(12) = (15,0)(15,0)(7,4)(12) amplitude: first non-zero value size: number of bits to encode amplitude 0 0 0 0 0 0 476: (6,9)(476) A.Aruna, Assistant Professor, Faculty of Information Technology
44
10/22/201544 Huffman coding Converts each sequence into binary First DC following with ACs Huffman tables are specified in JPEG Each (runlength, size) is encoded using Huffman coding Each (amplitude) is encoded using a variable length integer code (1,4)(12) => (11111101101100) A.Aruna, Assistant Professor, Faculty of Information Technology
45
10/22/201545 Example of Huffman table A.Aruna, Assistant Professor, Faculty of Information Technology
46
VIDEO COMPRESSION 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 46
47
INTRODUCTION Distribute the information to larger places Application Video teleconferencing Digital Telephony 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 47
48
STANDARDS P*64 (CCITT) – Video Conferencing JPEG (ISO)- Still Image MPEG (ISO) – Stored Video 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 48
49
Requirements for Full Motion Video Compression Random Access – Indexing VCR Paradigm – play,fast,forward,rewind,stop,search forward, etc., Audio & Video Synchronization Multiplexing multiple compressed Audio and Video Bit Streams Editability Playback Device Flexibility 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 49
50
CCITT H.261 Video Coding Algorithm(px64) Developed in 1990’s Videophone and Video Conferencing CIF (Common Interchange File Formats) & QCIF(Quarter CIF) Hierarchical Block Structure – Encoding Data DCT & DPCM 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 50
51
AUDIO COMPRESSION ADAPTIVE DIFFERENCIAL PULSE CODE MODULATION 10/22/2015A.Aruna, Assistant Professor, Faculty of Information Technology 51
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.