Compression methods: the 1 st generation

Similar documents
Pulse-Code Modulation (PCM) :

Basic Principles of Video Coding

Multimedia Networking ECE 599

Waveform-Based Coding: Outline

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

Objectives of Image Coding

Digital Image Processing Lectures 25 & 26

Image Data Compression

Transform coding - topics. Principle of block-wise transform coding

Transform Coding. Transform Coding Principle

EE 5345 Biomedical Instrumentation Lecture 12: slides

Lecture 7 Predictive Coding & Quantization

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

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

SYDE 575: Introduction to Image Processing. Image Compression Part 2: Variable-rate compression

Multimedia Communications. Differential Coding

Predictive Coding. Prediction Prediction in Images

BASIC COMPRESSION TECHNIQUES

Predictive Coding. Prediction

BASICS OF COMPRESSION THEORY

Principles of Communications

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

CODING SAMPLE DIFFERENCES ATTEMPT 1: NAIVE DIFFERENTIAL CODING

Digital communication system. Shannon s separation principle

Quantization 2.1 QUANTIZATION AND THE SOURCE ENCODER

Lossless Image and Intra-frame Compression with Integer-to-Integer DST

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

Scalar and Vector Quantization. National Chiao Tung University Chun-Jen Tsai 11/06/2014

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

SUBOPTIMALITY OF THE KARHUNEN-LOÈVE TRANSFORM FOR FIXED-RATE TRANSFORM CODING. Kenneth Zeger

E303: Communication Systems

EE 121: Introduction to Digital Communication Systems. 1. Consider the following discrete-time communication system. There are two equallly likely

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

Vector Quantization Encoder Decoder Original Form image Minimize distortion Table Channel Image Vectors Look-up (X, X i ) X may be a block of l

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

Image and Multidimensional Signal Processing

STATISTICS FOR EFFICIENT LINEAR AND NON-LINEAR PICTURE ENCODING

Information and Entropy

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

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

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

Gaussian source Assumptions d = (x-y) 2, given D, find lower bound of I(X;Y)

EE67I Multimedia Communication Systems

ON SCALABLE CODING OF HIDDEN MARKOV SOURCES. Mehdi Salehifar, Tejaswi Nanjundaswamy, and Kenneth Rose

Source Coding for Compression

UNIT I INFORMATION THEORY. I k log 2

IMAGE COMPRESSION IMAGE COMPRESSION-II. Coding Redundancy (contd.) Data Redundancy. Predictive coding. General Model

Intraframe Prediction with Intraframe Update Step for Motion-Compensated Lifted Wavelet Video Coding

Laboratory 1 Discrete Cosine Transform and Karhunen-Loeve Transform

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

ECE533 Digital Image Processing. Embedded Zerotree Wavelet Image Codec

C.M. Liu Perceptual Signal Processing Lab College of Computer Science National Chiao-Tung University

Selective Use Of Multiple Entropy Models In Audio Coding

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

Image Compression using DPCM with LMS Algorithm

Source Coding: Part I of Fundamentals of Source and Video Coding

3 rd Generation Approach to Video Compression for Multimedia

Rate-Distortion Based Temporal Filtering for. Video Compression. Beckman Institute, 405 N. Mathews Ave., Urbana, IL 61801

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

Chapter 10 Applications in Communications

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

CS578- Speech Signal Processing

SIGNAL COMPRESSION. 8. Lossy image compression: Principle of embedding

Multimedia Systems Giorgio Leonardi A.A Lecture 4 -> 6 : Quantization

Contents. Acknowledgments

Module 2 LOSSLESS IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Multimedia Communications. Scalar Quantization

Wavelet Scalable Video Codec Part 1: image compression by JPEG2000

On Optimal Coding of Hidden Markov Sources

Rate-Constrained Multihypothesis Prediction for Motion-Compensated Video Compression

A Systematic Description of Source Significance Information

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

IMAGE COMPRESSION OF DIGITIZED NDE X-RAY RADIOGRAPHS. Brian K. LoveweIl and John P. Basart

Physical Layer and Coding

Quantization. Introduction. Roadmap. Optimal Quantizer Uniform Quantizer Non Uniform Quantizer Rate Distorsion Theory. Source coding.

Lloyd-Max Quantization of Correlated Processes: How to Obtain Gains by Receiver-Sided Time-Variant Codebooks

ELECTRONICS & COMMUNICATIONS DIGITAL COMMUNICATIONS

SCALABLE AUDIO CODING USING WATERMARKING

Source Coding. Scalar Quantization

MARKOV CHAINS A finite state Markov chain is a sequence of discrete cv s from a finite alphabet where is a pmf on and for

Video Coding with Motion Compensation for Groups of Pictures

Estimation-Theoretic Delayed Decoding of Predictively Encoded Video Sequences

The Secrets of Quantization. Nimrod Peleg Update: Sept. 2009

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

Chapter 3 Current SAR Data Compression Techniques 3.1 Introduction

SCELP: LOW DELAY AUDIO CODING WITH NOISE SHAPING BASED ON SPHERICAL VECTOR QUANTIZATION

Digital Signal Processing 2/ Advanced Digital Signal Processing Lecture 3, SNR, non-linear Quantisation Gerald Schuller, TU Ilmenau

PCM Reference Chapter 12.1, Communication Systems, Carlson. PCM.1

Audio /Video Signal Processing. Lecture 2, Quantization, SNR Gerald Schuller, TU Ilmenau

EE368B Image and Video Compression

THE dictionary (Random House) definition of quantization

Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER? Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER?

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

EE5356 Digital Image Processing


+ (50% contribution by each member)

Linear, Worst-Case Estimators for Denoising Quantization Noise in Transform Coded Images

Half-Pel Accurate Motion-Compensated Orthogonal Video Transforms

sine wave fit algorithm

Multimedia Communications. Mathematical Preliminaries for Lossless Compression

Transcription:

Compression methods: the 1 st generation 1998-2017 Josef Pelikán CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 1 / 32

Basic terminology S x1, x2,... x n Source alphabet: Probability of occurence of the symbol x i is p i Code K of the symbol x i has length d i Message (source string) is sequence: X x, x,... x 1 2 i i i k Entropy (information) of the symbol x i : E i log 2 p i bits Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 2 / 32

Basic terminology II Average entropy (information) of a symbol: n AE p E p log p i1 i i n i1 i 2 i bits Message entropy: k E X pi log p j 2 j1 i j bits Length of the message X: L X k d i j1 j bits Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 3 / 32

Basic terminology III Code redundancy K for message X: R K L X E X d p log 2 p i i i j1 Average length of a codeword for the code K: Average redundancy of the code K: k n i1 j j j ALK n i1 AR K AL K AE pi di log 2 p p i d i i bits bits bits Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 4 / 32

Image compression terminology k, j, k Source sample (pixel value): u u Sample after quantization (reconstructed): u k j k, u, k, j, k Sample prediction: u u k, j, k Prediction error: e e Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 5 / 32

Reconstruction quality Mean squared error (MSE): RMS 2 N M 1 ui, j u, MN i1 j1 i j 2 Signal to noise ratio: SNR 10 log10 P 2 RMS 2 db P is range of source values, e.g.: SNR 10 255 log10 RMS 2 2 db Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 6 / 32

Pulse-code modulation (PCM) continuous analog signal digital channel time sampling, quantization, coding (modulation) sample and hold quantizer digital modulation u t R everything is continuous u t R real values in discrete time r t N discrete values in discrete time Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 7 / 32

Quantization ti, i 1, 2,... L 1 ti ti 1 Decision values: ri, i 1, 2,... L Reconstruction values: q: t, t r i i 1 i output r 9 r 8 r 7 input r 5 Examples: A-law, m-law t 1 t 2 t 3 t 7 t 8 t 9 t 10 r 4 r 3 r 2 r 1 Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 8 / 32

Linear quantizer Best for uniformly distributed source values: t t k 1 q k r t q k 1 k q t L t L 2 1 1 t 1 output input q q r 1 dead zone Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 9 / 32

Lloyd-Max quantizer Minimizes mean squared error of the quantization: E E u u 2 x u x p x 2 dx t 1 r r k 2 k1 k r xp x dx p x dx k t k1 k1 t k t T t 1 1 p(x).. probability density function of x (discr. histogram) t t k Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 10 / 32

Predictive compression neighbour samples are dependent (spatial correlation) pixel values usually change slowly implementation using predictor function previous (neighbour) samples are using to predict recent value only residuals are coded (differences between predicted and actual values) if successful, residuals have smaller amplitude Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 11 / 32

Predictive quantization DPCM encoder (Differential Pulse-Code Modulation): u k + - u k e k quantizer predictor & memory u k e k + + encoder k k k u u e ek uk uk prediction: k k1 k2 u P u, u,... Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 12 / 32

Predictive quantization II DPCM decoder: decoder e k + u k + predictor & memory u k u k Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 13 / 32

Delta modulation quantizer has only two output levels (+q,-q) basically a thresholding circuit prediction is implemented by a delay circuit k k1 k k k1 u u e u u output signal needs not be quantized integrator circuit instead of predictor analog signal coding (audio) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 14 / 32

Delta modulation II DM encoder: u t e t e t LP filter + u t + threshold integrator & delay DM decoder: e integrator t u t LP filtr Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 15 / 32

DM flaws u t u t slope overload granularity granularity reduction three-state DM (+q,0,-q) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 16 / 32

DPCM Markov chain (order of p) mean value of the current sample is linearly dependent on p previous samples nonlinear predictors polynomials are more popular 2D and ND predictors match 2D image characteristics (3D in case of video) u p k aj uk j j1 Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 17 / 32

2D DPCM B C D A uk aa bb cc dd optimal case: a b d c 0. 95 ac 0 B/W image: DPCM is in theory by cca 20dB better than PCM (ratio 3-3.5 : 1) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 18 / 32

Adaptive predictive techniques predictor sets for different correlation directions (horizontal, vertical, oblique,..) algorithm can adapt itselft picks more effective predictor (max correlation) adaptive gain control (quantization error) quality (distortion) of quantization is controlled acording to variance of predictor error image region classification quick adaptation to local pixel neighbourhood block classification e.g. 1616px blocks, ~4 patterns Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 19 / 32

Transform methods General scheme: transform quantizer coder T Q C C -1 Q -1 T -1 decoder dequantizer expander inverse transform Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 20 / 32

Transform methods II try to process the whole image block (vector) at once can be extended to block quantization reducing maximum amount of redundancy (among components of coded vector) actually used transform function is important transform function 1D (image scanline) 2D (the whole image, blocks KK) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 21 / 32

Transform function T the most important information should be concentrated in a small number of coefficients throwing away of the rest of coefficients leads to a big compression ratio quantization distortion or dropping coefficients should have as little effect on image quality as possible output coefficients should be little/not dependent computation efficiency: T and T -1 (SW, HW) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 22 / 32

Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 23 / 32 1D linear transform methods A Q 1 Q 2... Q N linear transform N quantizers u u u u N 1 2... v v v N 1 2... v v v v v N 1 2... decorrelation

Karhunen-Loeve transform input values (vector components) have the Gaussian distribution covariance matrix (dependency of the components) is known goal: to define transform coder with minimum RMS error and maximum decorrelation: optimal Karhunen-Loeve transform coefficients (v i ) are completely independent big time complexity (covariance matrix eigenvectors) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 24 / 32

Practical transforms suboptimal transforms a little bit worse than optimal KLT better eficiency: fast algorihtms in O(N log N), O(N) goniometric transforms (Fourier, sin, cos, Hartley) complex & real arithmetics, good decorrelation Walsh-type transforms partially constant functions, only additive operations are needed (Hadamard), very fast implementations wavelets (Haar, CDF(9,7),...) good representation of inhomogeneous data, hierarchical Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 25 / 32

Zonal coding of coefficients Accuracy according to information value (variance) of coefficients. Example of the bit-allocation: 7 5 3 2 1 1 1 0 5 3 3 2 1 1 1 0 3 3 2 2 1 1 0 0 2 2 2 1 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Zonal method (only a fixed region/zone is transferred) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 26 / 32

Threshold coding Only K coefficients with biggest amplitudes are transferred. Example (actual coefficient values): 14-5 4 8 7-3 1 0 8-3 5 4-4 1-1 0-9 6-8 5 3 3 0 0 7 3 6 1 1 4 0 2 4 1-5 0-2 1 0 0-3 -1 4 2 0-2 0 1 3-2 -2 0 0 1 0 0 0 0-1 0 1 0 0 0 Transferred zone is different block to block (address coding) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 27 / 32

Adaptive transform methods (statistical) analysis of image blocks transform algorithm adaptates to actual data transform function switching (parameter-sets switching) zone adaptation (set of transferred coefficients) quantizer adaptation Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 28 / 32

Hybrid methods Transform & predictive approach together DPCM coder T... DPCM DPCM coder coder MUX thrown-away coefficients transform Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 29 / 32

Interpolation methods only some pixels/samples are coded omitted samples are reconstructed by interpolation linear interpolation (higher-order polynomials are not much better) static methods set of encoded samples is constant dynamic methods adaptation to image characteristics (e.g. variance) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 30 / 32

Alternating interpolation Half of the pixels is encoded, adaptive linear interpolation is used for the rest: B A X C D X A C nebo B or D 2 2 (the one with less diference) Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 31 / 32

The End More information: A. Jain: Image Data Compression: A Review, Proceedings of the IEEE, vol.69, #3, 1981 A. Jain: Fundamentals of Digital Image Processing, Prentice-Hall, 1989 ed. by H.-M. Hang, J. Woods: Handbook of Visual Communications, Academic Press, San Diego, 1995 Still1g 2017 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 32 / 32