Compressing a 1D Discrete Signal

Similar documents
Compressing a 1D Discrete Signal

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

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

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

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

Multimedia Networking ECE 599

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

6.003: Signals and Systems. Sampling and Quantization

RLE = [ ; ], with compression ratio (CR) = 4/8. RLE actually increases the size of the compressed image.

Image Data Compression

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

Image Compression - JPEG

Waveform-Based Coding: Outline

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

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

Transform Coding. Transform Coding Principle

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

Justify all your answers and write down all important steps. Unsupported answers will be disregarded.

Principal Components Analysis

Basic Principles of Video Coding

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

BASICS OF COMPRESSION THEORY

Lec 04 Variable Length Coding (VLC) in JPEG

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

Multimedia & Computer Visualization. Exercise #5. JPEG compression

Digital Speech Processing Lecture 10. Short-Time Fourier Analysis Methods - Filter Bank Design

EE16B - Spring 17 - Lecture 12A Notes 1

Lec 05 Arithmetic Coding

Compression and Coding

Introduction to Video Compression H.261

2. the basis functions have different symmetries. 1 k = 0. x( t) 1 t 0 x(t) 0 t 1

Digital Image Processing. Image Enhancement: Filtering in the Frequency Domain

CSE 408 Multimedia Information System Yezhou Yang

Image and Multidimensional Signal Processing

Lecture 4 - Spectral Estimation

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

JPEG and JPEG2000 Image Coding Standards

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

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

Numerical Analysis. Carmen Arévalo Lund University Arévalo FMN011

Basics of DCT, Quantization and Entropy Coding

CS 4495 Computer Vision. Frequency and Fourier Transforms. Aaron Bobick School of Interactive Computing. Frequency and Fourier Transform

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

Contents. Signals as functions (1D, 2D)

HARMONIC VECTOR QUANTIZATION

Examples of the Fourier Theorem (Sect. 10.3). The Fourier Theorem: Continuous case.

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

Contents. Signals as functions (1D, 2D)

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

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

The Fourier Transform (and more )

Overview. Signals as functions (1D, 2D) 1D Fourier Transform. 2D Fourier Transforms. Discrete Fourier Transform (DFT) Discrete Cosine Transform (DCT)

Wavelets & Mul,resolu,on Analysis

CMPT 365 Multimedia Systems. Final Review - 1

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

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

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone

Fault Tolerance Technique in Huffman Coding applies to Baseline JPEG

COSC460 Honours Report. A Fast Discrete Tchebichef Transform Algorithm for Image Compression

Contents. Signals as functions (1D, 2D)

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides)

EE67I Multimedia Communication Systems

Wavelet Scalable Video Codec Part 1: image compression by JPEG2000

EE5356 Digital Image Processing

Polynomial Methods for Component Matching and Verification

Intelligent Visual Prosthesis

Entropy Encoding Using Karhunen-Loève Transform

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

Source Coding for Compression

Image Filtering, Edges and Image Representation

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

Module 4 MULTI- RESOLUTION ANALYSIS. Version 2 ECE IIT, Kharagpur

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

Image Transforms. Digital Image Processing Fundamentals of Digital Image Processing, A. K. Jain. Digital Image Processing.

Multidimensional Signal Processing

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

Fast Fourier Transform

Noise Reduction of JPEG Images by Sampled-Data H Optimal ε Filters

Ch. 15 Wavelet-Based Compression

Where and how can linear algebra be useful in practice.

Rate Bounds on SSIM Index of Quantized Image DCT Coefficients

Frequency2: Sampling and Aliasing

Compression and Coding. Theory and Applications Part 1: Fundamentals

More on Fourier Series

Survey of JPEG compression history analysis

IMAGE ENHANCEMENT: FILTERING IN THE FREQUENCY DOMAIN. Francesca Pizzorni Ferrarese

Seismic compression. François G. Meyer Department of Electrical Engineering University of Colorado at Boulder

A Complete Video Coding Chain Based on Multi-Dimensional Discrete Cosine Transform

Compression and Coding. Theory and Applications Part 1: Fundamentals

18.085: Summer 2016 Due: 3 August 2016 (in class) Problem Set 8

The Frequency Domain, without tears. Many slides borrowed from Steve Seitz

Contents. Acknowledgments

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum

ESS Finite Impulse Response Filters and the Z-transform

TTIC 31230, Fundamentals of Deep Learning David McAllester, April Information Theory and Distribution Modeling

Objectives of Image Coding

Midterm Summary Fall 08. Yao Wang Polytechnic University, Brooklyn, NY 11201

CEG4311 Digital Image Processing Dec. 21, Professor: Eric Dubois

Proyecto final de carrera

Mysteries Around Graph Laplacian Eigenvalue 4

Transcription:

Compressing a D Discrete Signal Divide the signal into 8blocks. Subtract the sample mean from each value. Compute the 8 8covariancematrixforthe blocks. Compute the eigenvectors of the covariance matrix. Compute the KL transform of each block. Threshold each transformed block to create long runs of zeros. Compute differences of KL transform coefficients in raster scan order. Run length encode differences. Huffman-code run-lengths. Huffman-code labels.

Average Over all Initial Positions Given a D discrete signal f of length, construct an 8 8covariancematrixforthe8consecutive values starting at all initial positions n: C = = [ ] T [ ] fn+0 f n+7 fn+0 f n+7 n=0 f n+0 f n+0 f n+0 f n+ f n+0 f n+7 f n+ f n+0 f n+ f n+ f n+ f n+7...... f n+7 f n+0 f n+7 f n+ f n+7 f n+7. Because the covariance matrix is an average over all initial positions, there can be no dependence on n: f n+i f n+ j = f m+i f m+ j. It follows that C is circulant and the eigenvectors of C are sampled harmonic signals!

Compressing a D Discrete Signal (revised) Divide the signal into 8blocks. Subtract the sample mean from each value. Compute DFT of each block. Threshold each transformed block to create long runs of zeros. Compute differences of thresholded DFT coefficients in raster scan order. Run length encode differences. Huffman-code run-lengths. Huffman-code labels.

Symmetric Extension Given a vector f of length construct a vector g of length such that { f (n) if 0 n g(n)= f ( n ) if n. The DFT of g shifted by one-half is: ( G(m) = jπ(n + g(n) exp ) n=0 for 0 m. Recall that ( jπ(n + exp ) ( π(n + = cos ) ( π(n + + j sin ). ow, because g is symmetric: ( π(n + g(n) j sin ) = 0. n=0 Consequently G(m) = n=0 ( π(n + g(n) cos ).

Symmetric Extension (contd.) Dividing the sum into two parts and substituting f (n) for g(n) in the first part and f ( n ) for g(n) in the second part yields G(m)= n=0 n= We now observe that ( π(n + f (n)cos ) + ( π(n + f ( n )cos ). ( π(n + f ( n )cos ) ( π(n + = f ( )cos ) when n. It follows that [ ( G(m) = π(n + f (n) cos ) ( π(n + + cos )] n=0 ( = π(n + f (n)cos ). n=0

Discrete Cosine Transform The Discrete Cosine Transform is defined as follows: ( F(m) = π(n + f (n)cos ). n=0 Because the DCT is a real valued transform there is no need for complex arithmetic. Unlike f which had a discontinuity at f (0), g is continuous at both g(0) and g()! For this reason, the energy in the DCT representation of a function is localized in fewer non-zero values.

Periodicity of DFT and DCT Figure : The DCT is the unique half of the real part of the DFT of a length symmetric extension of a length signal shifted by one-half.

Periodicity of D DFT and DCT Figure : Periodicity of the D Discrete Fourier Transform (DFT). Figure 3: Periodicity of D Discrete Cosine Transform (DCT).

JPEG Divide image into 8 8blocks. Center gray values (i.e., subtract 8). Compute the DCT of each block. Quantize DCT coefficients using quantization table. Compute differences of quantized DCT coefficients along zigzag path. Run-length encode differences. Huffman-code run-lengths. Huffman-code labels. Joint Photographic Experts Group

Example Block 5 55 6 66 70 6 64 73 63 59 55 90 09 85 69 7 6 59 68 3 44 04 66 73 63 58 7 54 06 70 69 67 6 68 04 6 88 68 70 79 65 60 70 77 68 58 75 85 7 64 59 55 6 65 83 87 79 69 68 65 76 78 94 Figure 4: JPEG compression (top) and decompression (bottom) algorithms.

Subtracting 8 f = 76 73 67 6 58 67 64 55 65 69 73 38 9 43 59 56 66 69 60 5 6 4 6 55 65 70 57 6 6 58 59 6 67 60 4 40 60 58 49 63 68 58 5 60 70 53 43 57 64 69 73 67 63 45 4 49 59 60 63 5 50 34 Figure 5: Subtracting 8 from blocks.

DCT of 8 8Block 4 7 x=0 7 y=0 F(u,v)= ( ) ( ) π(x + )u π(y + )v f (x,y)cos cos 6 6 F = Figure 6: Discrete cosine transform of blocks. 45.38 30.9 6.0 7.4 56. 0.0.39 0.46 4.47.86 60.76 0.5 3.5 7.09 8.54 4.88 46.83 7.37 77.3 4.56 8.9 9.93 5.4 5.65 48.53.07 34.0 4.76 0.4 6.30.83.95. 6.55 3.0 3.95.87.75.79 3.4 7.73.9.38 5.94.38 0.94 4.30.85.03 0.8 0.4.4 0.88 3.0 4. 0.66 0.7 0.4.07 4.9.7 0.0 0.50.68

JPEG Basis Functions Figure 7: JPEG basis functions.

Block Quantization Q = 6 0 6 4 40 5 6 4 9 6 58 60 55 4 3 6 4 40 57 69 56 4 7 9 5 87 80 6 8 37 56 68 09 03 77 4 35 55 64 8 04 3 9 49 64 78 87 03 0 0 7 9 95 98 00 03 99 G(u,v)= F(u,v) Q(u,v) + 0.5 G = Figure 8: Quantize blocks. 6 3 6 0 0 0 4 0 0 0 3 5 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Difference Encode along Zigzag Path Figure 9: Zigzag scan order. Figure 0: Difference encode blocks. Table : AC Coefficient Encoding Scheme. 4bits 4bits 8bits zero run length category amplitude

Rescaling Block F(u,v)=G(u,v) Q(u,v) Figure : Rescale blocks. F = 46 33 60 3 48 40 0 0 0 4 56 9 6 0 0 0 4 3 80 4 40 0 0 0 4 7 44 9 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Inverse DCT 4 7 u=0 7 v=0 f (x,y)= [ ] π(x + )u F(u,v)cos cos 6 [ ] π(y + )v 6 f = Figure : Inverse discrete cosine transform of blocks. 66 63 7 68 56 65 68 46 7 73 7 46 0 4 66 57 70 78 68 7 0 4 6 63 63 73 6 8 7 4 60 58 58 65 6 7 6 40 68 50 57 57 64 58 48 66 7 47 53 46 6 74 65 63 6 45 47 34 53 74 60 47 47 4

Reconstruction Errors f f = 0 0 4 6 4 9 6 4 8 7 4 9 8 4 0 8 3 5 8 3 3 4 0 8 8 8 6 4 0 3 6 6 0 3 5 8 4 0 6 5 6 4 3 5 3 7

Adding 8 6 65 57 60 7 63 60 8 57 55 56 8 08 87 6 7 58 50 60 48 4 67 65 65 55 66 0 55 4 68 70 70 63 67 0 88 60 78 7 7 64 70 80 6 56 8 75 8 67 54 63 65 66 83 8 94 75 54 68 8 8 87 Figure 3: Add 8 to blocks.

Conclusion The DCT is really the KL transform of the block in disguise! The quantization table tells us which eigenvectors are most important perceptually. Compression ratios of 8 to without perceptible differences are typical.