BASIC COMPRESSION TECHNIQUES

Similar documents
encoding without prediction) (Server) Quantization: Initial Data 0, 1, 2, Quantized Data 0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256

Image and Multidimensional Signal Processing

Multimedia Networking ECE 599

Multimedia. Multimedia Data Compression (Lossless Compression Algorithms)

Run-length & Entropy Coding. Redundancy Removal. Sampling. Quantization. Perform inverse operations at the receiver EEE

Lecture 7 Predictive Coding & Quantization

Chapter 10 Applications in Communications

CSEP 521 Applied Algorithms Spring Statistical Lossless Data Compression

Compression methods: the 1 st generation

Compression. Encryption. Decryption. Decompression. Presentation of Information to client site

Lecture 10 : Basic Compression Algorithms

BASICS OF COMPRESSION THEORY

CMPT 365 Multimedia Systems. Lossless Compression

Basic Principles of Video Coding

SPEECH ANALYSIS AND SYNTHESIS

Image Compression. Fundamentals: Coding redundancy. The gray level histogram of an image can reveal a great deal of information about the image

Image Data Compression

Multimedia Information Systems

Image Compression - JPEG

Department of Electrical Engineering, Polytechnic University, Brooklyn Fall 05 EL DIGITAL IMAGE PROCESSING (I) Final Exam 1/5/06, 1PM-4PM

Speech Coding. Speech Processing. Tom Bäckström. October Aalto University

Multimedia Communications. Differential Coding

Digital Systems and Information Part II

Multimedia Communications. Mathematical Preliminaries for Lossless Compression

Basics of DCT, Quantization and Entropy Coding

On Compression Encrypted Data part 2. Prof. Ja-Ling Wu The Graduate Institute of Networking and Multimedia National Taiwan University

4. Quantization and Data Compression. ECE 302 Spring 2012 Purdue University, School of ECE Prof. Ilya Pollak

Source Coding Techniques

CSEP 590 Data Compression Autumn Arithmetic Coding

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

ECE472/572 - Lecture 11. Roadmap. Roadmap. Image Compression Fundamentals and Lossless Compression Techniques 11/03/11.

Time-domain representations

The Equivalence of ADPCM and CELP Coding

2018/5/3. YU Xiangyu

Digital communication system. Shannon s separation principle

Summary of Last Lectures

CSE 408 Multimedia Information System Yezhou Yang

Audio Coding. Fundamentals Quantization Waveform Coding Subband Coding P NCTU/CSIE DSPLAB C.M..LIU

EE5585 Data Compression April 18, Lecture 23

Pulse-Code Modulation (PCM) :

Chapter 2: Source coding

CODING SAMPLE DIFFERENCES ATTEMPT 1: NAIVE DIFFERENTIAL CODING

Implementation of Lossless Huffman Coding: Image compression using K-Means algorithm and comparison vs. Random numbers and Message source

Basic Principles of Lossless Coding. Universal Lossless coding. Lempel-Ziv Coding. 2. Exploit dependences between successive symbols.

Lecture 2: Introduction to Audio, Video & Image Coding Techniques (I) -- Fundaments

Overview. Analog capturing device (camera, microphone) PCM encoded or raw signal ( wav, bmp, ) A/D CONVERTER. Compressed bit stream (mp3, jpg, )

repetition, part ii Ole-Johan Skrede INF Digital Image Processing

Multimedia & Computer Visualization. Exercise #5. JPEG compression

CMPT 365 Multimedia Systems. Final Review - 1

Digital Image Processing Lectures 25 & 26

Lecture 2: Introduction to Audio, Video & Image Coding Techniques (I) -- Fundaments. Tutorial 1. Acknowledgement and References for lectures 1 to 5

3F1 Information Theory, Lecture 3

Basics of DCT, Quantization and Entropy Coding. Nimrod Peleg Update: Dec. 2005

Compression and Coding

Massachusetts Institute of Technology. Problem Set 4 Solutions

EE 5345 Biomedical Instrumentation Lecture 12: slides

Digital Communications III (ECE 154C) Introduction to Coding and Information Theory

EE5356 Digital Image Processing. Final Exam. 5/11/06 Thursday 1 1 :00 AM-1 :00 PM

UNIT I INFORMATION THEORY. I k log 2

Reduce the amount of data required to represent a given quantity of information Data vs information R = 1 1 C

Lecture 3 : Algorithms for source coding. September 30, 2016

3F1 Information Theory, Lecture 3

ITCT Lecture IV.3: Markov Processes and Sources with Memory

Information and Entropy. Professor Kevin Gold

Waveform-Based Coding: Outline

SIGNAL COMPRESSION Lecture 7. Variable to Fix Encoding

Vector Quantizers for Reduced Bit-Rate Coding of Correlated Sources

1. Basics of Information

at Some sort of quantization is necessary to represent continuous signals in digital form

EE368B Image and Video Compression

Real-Time Audio and Video

Lecture 8: Shannon s Noise Models

A study of image compression techniques, with specific focus on weighted finite automata

Compression. What. Why. Reduce the amount of information (bits) needed to represent image Video: 720 x 480 res, 30 fps, color

Lecture 4 : Adaptive source coding algorithms

Introduction p. 1 Compression Techniques p. 3 Lossless Compression p. 4 Lossy Compression p. 5 Measures of Performance p. 5 Modeling and Coding p.

Text Compression. Jayadev Misra The University of Texas at Austin December 5, A Very Incomplete Introduction to Information Theory 2

Review of Quantization. Quantization. Bring in Probability Distribution. L-level Quantization. Uniform partition

Information Theory. Week 4 Compressing streams. Iain Murray,

Lecture 20: Quantization and Rate-Distortion

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

CSEP 590 Data Compression Autumn Dictionary Coding LZW, LZ77

Stream Codes. 6.1 The guessing game

ESE 250: Digital Audio Basics. Week 4 February 5, The Frequency Domain. ESE Spring'13 DeHon, Kod, Kadric, Wilson-Shah

Kotebe Metropolitan University Department of Computer Science and Technology Multimedia (CoSc 4151)

Predictive Coding. Prediction Prediction in Images

! Where are we on course map? ! What we did in lab last week. " How it relates to this week. ! Compression. " What is it, examples, classifications

Predictive Coding. Prediction

ELEC 515 Information Theory. Distortionless Source Coding

Compression. Reality Check 11 on page 527 explores implementation of the MDCT into a simple, working algorithm to compress audio.

Bandwidth: Communicate large complex & highly detailed 3D models through lowbandwidth connection (e.g. VRML over the Internet)

IMAGE COMPRESSION-II. Week IX. 03/6/2003 Image Compression-II 1

ECS 452: Digital Communication Systems 2015/2. HW 1 Due: Feb 5

CSCI 2570 Introduction to Nanocomputing

Lab 9a. Linear Predictive Coding for Speech Processing

CS578- Speech Signal Processing

Source Coding for Compression

Lecture 1: Shannon s Theorem

Chapter 2 Date Compression: Source Coding. 2.1 An Introduction to Source Coding 2.2 Optimal Source Codes 2.3 Huffman Code

Information and Entropy

Transcription:

BASIC COMPRESSION TECHNIQUES N. C. State University CSC557 Multimedia Computing and Networking Fall 2001 Lectures # 05

Questions / Problems / Announcements? 2 Matlab demo of DFT Low-pass windowed-sinc filter design Filtering Matlab files are online try them! Compressing the castle?

Prediction-Based Encoding 3 Suppose specific sequences of symbols are predictable, according to some algorithm After i-1 symbols have been encoded, predict the i th symbol Principles involved Redundancy removal subtract a predicted value from the input value predictor In other words, successive input samples are correlated Entropy reduction quantize difference between input sample and predicted value quantizer

DPCM (cont.) 4 Terminology Input signal at time k = s(k) Predicted value at time k = s(k k-1) Prediction error at time k = e(k) = s(k) s(k k-1) Quantized prediction error at time k = e q (k) Digitized approximation to input at time k = s(k) Quantization Linear PCM, for example Step size may be adjusted, or adapted, dynamically (details omitted; see Gibson if interested)

Differential PCM (DPCM) 5 + s(k) e(k) e q (k) s(k k-1) Q + + e q (k) + + s(k k-1) s(k) P(z) s(k) P(z) Encoder Decoder

DPCM Predictor Adaptation 6 Prediction accomplished via convolution (filtering) s(k k-1) = a 1 s(k-1)+a 2 s(k-2)+ a N s(k-n) Adapting the prediction: constantly strive to reduce the prediction error Example of backwards adaptation a i (k+1) = αa i (k)+g(k+1)e q (k+1) α is constant weighting factor near 1 G(k+1) is vector gain computed to minimize the prediction error (details omitted; see Gibson if interested) There is no need to transmit the a i s, since the decoder can run exactly the same prediction adaptation algorithm

Example Media-Specific Predictors 7 Images: the jth Pixel in a row will have the same color as the (j-1)th pixel Video: the jth frame will have the same content as the (j- 1)th frame

LZW Compression 8 Given: an alphabet of input symbols Pixel colors, ascii characters, Goal: Construct a "dictionary" of input symbol sequences (ISS s) and output (replacement) symbols desired: output symbols should be shorter than the ISS s they replace Initially, the dictionary contains only the individual input symbols sequences of length 1 Scanning input from start to finish add each newly-encountered ISS to the dictionary replace each ISS found in the dictionary with the matching output symbol then skip over the matched ISS, and continue

Example (LZW Encoding) 9 Assume 12-bit output symbols, 8-bit (ASCII) input symbols First 256 entries in dictionary = the alphabet of input symbols A =65, B =66, C =67, Example of input data to compress: BABAABAAA (=9*8=72 bits) Encoder Encoder Input Output B 66 A 65 BA 256 AB 257 A 65 AA 260 CodeWord Added String 256 BA 257 AB 258 BAA 259 ABA 260 AA

LZW Decoding 10 Given the encoded (output) data, and the initial dictionary values Do not need the entire dictionary! For each output symbol encountered Replace with the input sequence from the dictionary And, create new entry in the dictionary If an output symbol is not found in dictionary, it can still be recovered It must be the same as the immediately-previous sequence, with the last symbol repeated

Example (LZW Decoding) 11 Encoded string = 66 65 256 257 65 260 D e c o d e r D e c o d e r C o d e W o r d S t r in g Input O u t p u t Added 66 B 65 A 256 BA 256 BA 257 AB 257 AB 258 BAA 65 A 259 ABA 260 AA 260 AA

LZW Dictionary Problems 12 Dictionary fills up during construction? Options Expand table size dynamically Purge table and start over if compression ratio too low

Lossy Compression Methods 13 (We've already seen DPCM, ADPCM) (We'll do transform coding later when we talk about audio and image compression) Source coding

Source Coders (Synthesis) 14 Complex data may be produced by simple mechanism. Examples: speech from the vocal tract bitmap from a drawing tool musical sound from an instrument image that is a flowchart or block diagram

Source Coders (cont.) 15 Compression idea: record the state of the mechanism, instead of the output it produces Decompression: *synthesize* the data by modeling the mechanism

Example (Source Coding) 16 Compressing a performance on the piano Record the keys pressed, when, how long, and how forcefully Decompression: synthesize a realistic-sounding piano note with the right pitch at the right time with the right volume MIDI recording!

Source Coding Tradeoffs 17 Huge amount of compression Quality loss because synthesis is not perfect

Sources of Information 18 [Crane97] A Simplified Approach to Image Processing Chapter 9, section on LZW [Gibson98] Digital Compression for Multimedia Section 5.3, highlights only