Multimedia Networking ECE 599

Similar documents
Image Compression - JPEG

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

Image Data Compression

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

Basic Principles of Video Coding

Waveform-Based Coding: Outline

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

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

Transform Coding. Transform Coding Principle

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

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

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

CSE 408 Multimedia Information System Yezhou Yang

Objective: Reduction of data redundancy. Coding redundancy Interpixel redundancy Psychovisual redundancy Fall LIST 2

Predictive Coding. Prediction Prediction in Images

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

Compression methods: the 1 st generation

Lecture 7 Predictive Coding & Quantization

Real-Time Audio and Video

BASICS OF COMPRESSION THEORY

Predictive Coding. Prediction

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

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

Compression and Coding

BASIC COMPRESSION TECHNIQUES

Image Compression. Qiaoyong Zhong. November 19, CAS-MPG Partner Institute for Computational Biology (PICB)

Digital communication system. Shannon s separation principle

Objectives of Image Coding

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

Image and Multidimensional Signal Processing

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

Information and Entropy

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

6. H.261 Video Coding Standard

CSE 126 Multimedia Systems Midterm Exam (Form A)

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

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

EE67I Multimedia Communication Systems

Wavelet Scalable Video Codec Part 1: image compression by JPEG2000

CODING SAMPLE DIFFERENCES ATTEMPT 1: NAIVE DIFFERENTIAL CODING

Compressing a 1D Discrete Signal

6.003: Signals and Systems. Sampling and Quantization

INTERNATIONAL ORGANISATION FOR STANDARDISATION ORGANISATION INTERNATIONALE DE NORMALISATION ISO/IEC JTC1/SC29/WG11 CODING OF MOVING PICTURES AND AUDIO

on a per-coecient basis in large images is computationally expensive. Further, the algorithm in [CR95] needs to be rerun, every time a new rate of com

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

Basics of DCT, Quantization and Entropy Coding

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

Digital Image Processing Lectures 25 & 26

JPEG Standard Uniform Quantization Error Modeling with Applications to Sequential and Progressive Operation Modes

ECE533 Digital Image Processing. Embedded Zerotree Wavelet Image Codec

Compression and Coding. Theory and Applications Part 1: Fundamentals

Source Coding for Compression

Compressing a 1D Discrete Signal

JPEG and JPEG2000 Image Coding Standards

STATISTICS FOR EFFICIENT LINEAR AND NON-LINEAR PICTURE ENCODING

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

VID3: Sampling and Quantization

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

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

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

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

Modern Digital Communication Techniques Prof. Suvra Sekhar Das G. S. Sanyal School of Telecommunication Indian Institute of Technology, Kharagpur

Introduction to Video Compression H.261

Module 5 EMBEDDED WAVELET CODING. Version 2 ECE IIT, Kharagpur

Fault Tolerance Technique in Huffman Coding applies to Baseline JPEG

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

Can the sample being transmitted be used to refine its own PDF estimate?

2018/5/3. YU Xiangyu

Multimedia & Computer Visualization. Exercise #5. JPEG compression

Vector Quantizers for Reduced Bit-Rate Coding of Correlated Sources

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

Half-Pel Accurate Motion-Compensated Orthogonal Video Transforms

Multimedia Information Systems

Module 4. Multi-Resolution Analysis. Version 2 ECE IIT, Kharagpur

Video Coding with Motion Compensation for Groups of Pictures

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

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

3 rd Generation Approach to Video Compression for Multimedia

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

INTEGER SUB-OPTIMAL KARHUNEN-LOEVE TRANSFORM FOR MULTI-CHANNEL LOSSLESS EEG COMPRESSION

Principles of Communications

SCALABLE AUDIO CODING USING WATERMARKING

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

Compression and Coding. Theory and Applications Part 1: Fundamentals

Analysis of Fractals, Image Compression and Entropy Encoding

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

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

Wavelets and Multiresolution Processing

LORD: LOw-complexity, Rate-controlled, Distributed video coding system

LOSSLESS INTRA CODING IN HEVC WITH INTEGER-TO-INTEGER DST. Fatih Kamisli. Middle East Technical University Ankara, Turkey

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

Image Compression Basis Sebastiano Battiato, Ph.D.

Multimedia Communications. Differential Coding

Multimedia. Multimedia Data Compression (Lossless Compression Algorithms)

Detailed Review of H.264/AVC

The Choice of MPEG-4 AAC encoding parameters as a direct function of the perceptual entropy of the audio signal

Pulse-Code Modulation (PCM) :

Multimedia Communications Fall 07 Midterm Exam (Close Book)

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

Information Theory and Coding Techniques

Transcription:

Multimedia Networking ECE 599 Prof. Thinh Nguyen School of Electrical Engineering and Computer Science Based on lectures from B. Lee, B. Girod, and A. Mukherjee 1

Outline Digital Signal Representation Audio/Video Lossy Compression DPCM Transform coding JPEG 2

Digital Signal Representation Loss from A/D conversion Aliasing (worse than quantization loss) due to sampling Loss due to quantization Analog signals sampling A/D converter quantization Digital signals Digital Signal processing D/A converter Analog signals 3

Signal representation For perfect re-construction, sampling rate (Nyquist s frequency) needs to be twice the maximum frequency of the signal. However, in practice, loss still occurs due to quantization. Finer quantization leads to less error at the expense of increased number of bits to represent signals. 4

Audio sampling Human hearing frequency range: 20 Hz to 20 Khz. Voice:50Hz to 2 KHz What is the sampling rate to avoid aliasing? (worse than losing information) Audio CD : 44100Hz 5

Audio quantization Sample precision resolution of signal Quantization depends on the number of bits used. Voice quality: 8 bit quantization, 8000 Hz sampling rate. (64 kbps) CD quality: 16 bit quantization, 44100Hz (705.6 kbps for mono, 1.411 Mbps for stereo). 6

Pulse Code Modulation (PCM) The 2 step process of sampling and quantization is known as Pulse Code Modulation. Used in speech and CD recording. audio signals sampling quantization bits No compression, unlike MP3 7

DPCM (Differential Pulse Code Modulation) 8

DPCM (Differential Pulse Code Modulation) Simple example: Code the following value sequence: 1.4 1.75 2.05 2.5 2.4 Quantization step: 0.2 Predictor: current value = previous quantized value + quantized error. Error = 1.75-1.4 = 0.35 =>.4 Prediction value = 1.4 + 0.4 = 1.8 Error = 2.05-1.8 = => 0.25 => 0.2 Prediction value = 1.8 +.2 = 2.0 Error = 2.5 2.05 = 0.45=> 0.4 Prediction value = 2.0 +.4 = 2.4 Send 0.4, 0.2, 0.4, 9

DPCM - Image Linear predictor 0 1/4 1/4 1/2 10

DPCM - Image 11

Transmission errors in a DPCM system For a linear DPCM decoder, the transmission error response is superimposed to the reconstructed signal. For a stable DPCM decoder, the transmission response decay. For variable length coding, e.g. Huffman, loss of synchronization due to a single bit error can lead to many prediction error samples. 12

Transmission errors in a DPCM system 13

DPCM-Video Interframe coding exploits similarity of temporal successive pictures. Important interframe coding methods Adaptive intra-interframe coding Conditional replenishment Motion-compensated prediction 14

15

Transform Coding Why transform Coding? Purpose of transformation is to convert the data into a form where compression is easier Transformation yields energy compaction Facilitates reduction of irrelevant information The transform coefficients can now be quantized according to their statistical properties. This transformation will reduce the correlation between the pixels (decorrelate X, the transform coefficients are assumed to be completely decorrelated (Redundancy Reduction). 16

How Transform Coders Work Divide the image into 2x1 blocks Typical transforms are 8x8 or 16x16 17

Joint Probability Distribution Observe the Joint Probability Distribution or the Joint Histogram. 18

Joint Probability Distribution Observe the Joint Probability Distribution or the Joint Histogram. 19

Correlated Pixels Since adjacent pixels x 1 and x 2 are highly correlated the joint probability p(x 1, x 2 ) is concentrated around the line FF and variances are equal because they are the samples of the same image. 20

Pixel Correlation Map X ave1 =100, X var1 =2774 X ave2 =100, X var2 =2761 x 2 x 1 21

Rotated Pixels Rotated 45 degrees Y = A X y ave1 =141, y var1 =5365 y ave2 =0.13, y var2 = 170 Energy is packed to y 1. Can apply entropy coder on y 2. y 2 Rotation matrix A cosθ sinθ 2 2 = sinθ cosθ = Ο θ = 45 2 2 y 1 22

Reconstruct the Image Recover X from Y. Since Y = AX, so X = A -1 Y Reverse matrix A 1 cosθ sinθ 2 2 = sinθ cosθ = Ο θ = 45 2 2 23

Idea of Transform Coding Transform the input pixels Y 0,Y 1,Y 2,...,Y N-1 into coefficients Y 0,Y 1,...,Y N-1 (real values) The coefficients are have the property that most of them are near zero. Most of the energy is compacted into a few coefficients. Scalar quantize the coefficient This is bit allocation. Important coefficients should have more quantization levels. Entropy encode the quantization symbols 24

Transform Coding Block Diagram Transmitter Original Image f(j,k) F(u,v) F*(uv) Segment into n*n Blocks Receiver Forward Transform Quantization and Coder Channel Combine n*n Blocks Inverse Transform Decoder Reconstructed Image f(j,k) F(u,v) F*(uv) 25

Discrete Cosine Transform (DCT) For conventional image data having reasonably high inter-element correlation. Avoids the generation of the spurious spectral components which is a problem with DFT and has a fast implementation which avoids complex algebra. 26

Basic Cosine Transform The basic Cosine Transform is: where: 27

Inverse Cosine Transform The inverse cosine transform is: where: 28

Fast Cosine Transform 2D basis functions of the DCT: Apply 1D horizontal DCT then 1D vertical DCT Fast algorithm for scaled 8-DCT 5 multiplications 29 additions. 29

Amplitude distribution of the DCT coefficients Histograms for 8x8 DCT coefficient amplitudes measured for natural images DC coefficient is typically uniformly distributed. The distribution of the AC coefficients have a Laplacian distribution with zero-mean. 30

Importance of Coefficients The DC coefficient is the most important. The AC coefficients become less important as they are farther from the DC coefficient. Example bit allocation table: 31

Karhunen Loève Transform (KLT) Karhunen Loève Transform (KLT) yields decorrelated transform coefficients. Basis functions are eigenvectors of the covariance matrix of the input signal. KLT achieves optimum energy concentration. Disadvantages: KLT dependent on signal statistics KLT not separable for image blocks Transform matrix cannot be factored into sparse matrices 32

Other Transforms Wavelets DFT BWT 33

JPEG JPEG stands for Joint Photographic Expert Group A standard image compression method is needed to enable interoperability of equipment from different manufacturer It is the first international digital image compression standard for continuous-tone images (grayscale or color) 34

JPEG very good or excellent compression rate, reconstructed image quality, transmission rate be applicable to practically any kind of continuous-tone digital source image good complexity have the following modes of operations: sequential encoding progressive encoding lossless encoding hierarchical encoding 35

JPEG Encoder Block Diagram 36

JPEG Main operations Quantization Different quantization level for different DC and AC coefficients Zig-zag Scan Why? -- to group low frequency coefficients in top of vector. Maps 8 x 8 to a 1 x 64 vector Differential Pulse Code Modulation (DPCM) on DC component DC component is large and varied, but often close to previous value. Encode the difference from previous 8 x 8 blocks -- DPCM Run Length Encode (RLE) on AC components 1 x 64 vector has lots of zeros in it Keeps skip and value, where skip is the number of zeros and value is the next non-zero component. Send (0,0) as end-of-block sentinel value. Entropy Coding (Huffman, arithmetic, ) Differential DC and run-length AC values 37

DCT Quantization Table (Luminance) F'[u, v] = round ( F[u, v] / q[u, v] ). 38

DCT Zig-Zag-Scan The variances of the DCT transform coefficients are decreasing in a zig-zag manner approximately. zig-zag-scan + run-level-coding 39

Example 40

JPEG Progressive Model Why progressive model? Quick transmission Image built up in a coarse-to-fine passes First stage: encode a rough but recognizable version of the image Later stage(s): the image refined by successive scans till get the final image Two ways to do this: Spectral selection send DC, AC coefficients separately Successive approximation send the most significant bits first and then the least significant bits 41

JPEG Lossless Model Sample values DPCM Descriptors Differential pulse code modulation Predictors for lossless coding selection value prediction strategy 0 no prediction 1 A 2 B 3 C 4 A+B-C 5 A+(B-C)/2 6 B+(A-C)/2 7 (A+B)/2 C A B X 42

JPEG Hierarchical Model Hierarchical model is an alternative of progressive model (pyramid) Steps: filter and down-sample the original images by the desired number of multiplies of 2 in each dimension Encode the reduced-size image using one of the above coding model Use the up-sampled image as a prediction of the origin at this resolution, encode the difference Repeat till the full resolution image has been encode 43

JPEG-2000 JPEG 2000 is the upcoming standard for Still Pictures Major change from the current JPEG is that wavelets will replace DCT as the means of transform coding. Among many things it will address: Low bit-rate compression performance, Lossless and lossy compression in a single codestream, Transmission in noisy environment where bit-error is high, Application to both gray/color images and bi-level (text) imagery, natural imagery and computer generated imagery, Interface with MPEG-4, Content-based description. 44

Example of Wavelet filters (5/3) 45