1 Multimedia Compression Algorithms Wen-Shyang Hwang KUAS EE.

Slides:



Advertisements
Similar presentations
Multimedia Data Compression
Advertisements

Lecture04 Data Compression.
Chapter 7 End-to-End Data
Department of Computer Engineering University of California at Santa Cruz Data Compression (3) Hai Tao.
Spatial and Temporal Data Mining
JPEG.
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
JPEG Still Image Data Compression Standard
Hao Jiang Computer Science Department Sept. 27, 2007
Fundamentals of Multimedia Chapter 8 Lossy Compression Algorithms (Wavelet) Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Multimedia Data The DCT and JPEG Image Compression Dr Mike Spann Electronic, Electrical and Computer.
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
1 Lossless Compression Multimedia Systems (Module 2) r Lesson 1: m Minimum Redundancy Coding based on Information Theory: Shannon-Fano Coding Huffman Coding.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
Image Compression: JPEG Multimedia Systems (Module 4 Lesson 1)
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Still Image Conpression JPEG & JPEG2000 Yu-Wei Chang /18.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
Computer Vision – Compression(2) Hanyang University Jong-Il Park.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
Klara Nahrstedt Spring 2011
Page 110/6/2015 CSE 40373/60373: Multimedia Systems So far  Audio (scalar values with time), image (2-D data) and video (2-D with time)  Higher fidelity.
Prof. Amr Goneid Department of Computer Science & Engineering
CMPT 365 Multimedia Systems
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Wavelet-based Coding And its application in JPEG2000 Monia Ghobadi CSC561 final project
Indiana University Purdue University Fort Wayne Hongli Luo
JPEG CIS 658 Fall 2005.
1 Classification of Compression Methods. 2 Data Compression  A means of reducing the size of blocks of data by removing  Unused material: e.g.) silence.
Digital Image Processing Image Compression
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Image Compression – Fundamentals and Lossless Compression Techniques
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
Chapter 9 Image Compression Standards 9.1 The JPEG Standard 9.2 The JPEG2000 Standard 9.3 The JPEG-LS Standard 9.5 Further Exploration Li & Drew1.
Chapter 17 Image Compression 17.1 Introduction Redundant and irrelevant information  “Your wife, Helen, will meet you at Logan Airport in Boston.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
JPEG - JPEG2000 Isabelle Marque JPEGJPEG2000. JPEG Joint Photographic Experts Group Committe created in 1986 by: International Organization for Standardization.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) Image Compression Quantization independent samples uniform and optimum correlated.
Lossless Compression(2)
JPEG.
CS654: Digital Image Analysis
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 4 ECE-C490 Winter 2004 Image Processing Architecture Lecture 4, 1/20/2004 Principles.
Chapter 8 Lossy Compression Algorithms. Fundamentals of Multimedia, Chapter Introduction Lossless compression algorithms do not deliver compression.
Introduction to JPEG m Akram Ben Ahmed
Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5.
Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5.
By Dr. Hadi AL Saadi Lossy Compression. Source coding is based on changing of the original image content. Also called semantic-based coding High compression.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
MP3 and AAC Trac D. Tran ECE Department The Johns Hopkins University Baltimore MD
Chapter 8 Lossy Compression Algorithms
JPEG Compression What is JPEG? Motivation
IMAGE COMPRESSION.
Chapter 9 Image Compression Standards
Discrete Cosine Transform
JPEG.
Image Compression Standards (JPEG)
CMPT 365 Multimedia Systems
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
Presentation transcript:

1 Multimedia Compression Algorithms Wen-Shyang Hwang KUAS EE.

2 Outline Introduce to Compression Lossless Compression Algorithm Lossy Compression Algorithm Image Compression Standards

3 Compression  Compression: the process of coding that will effectively reduce the total number of bits needed to represent certain information.  If compression and decompression processes induce no information loss, then the compression scheme is lossless; otherwise, it is lossy.  Basics of Information Theory Entropy of an information source with alphabet S ={s1,s2,..,sn} is pi : probability that symbol si will occur in S. indicates amount of information contained in si, which corresponds to the number of bits needed to encode si. The entropy specifies the lower bound for the average number of bits to code each symbol in S

4 Lossless Compression  Variable-Length Coding (VLC): the more frequently-appearing symbols are coded with fewer bits per symbol, and vice versa.  Shannon-Fano Algorithm Sort symbols according to the frequency of occurrences. Recursively divide symbols into two parts, each with approximately same counts, until all parts contain only one symbol. Example: Frequency count of the symbols in "HELLO"

5 Huffman Coding  Initialization: Put all symbols on a list sorted according to frequency.  Repeat until the list has only one symbol left: 1.From the list pick two symbols with the lowest frequency counts. Form a Human subtree that has these two symbols as child nodes and create a parent node. 2.Assign the sum of the children's frequency counts to the parent and insert it into the list such that the order is maintained. 3.Delete the children from the list.  Assign a codeword for each leaf based on the path from the root. The contents in the list:

6 Adaptive Huffman Coding  statistics are gathered and updated dynamically as data stream arrives. increments the frequency counts for the symbols Example:Initial code assignment for AADCCDD

7 Dictionary-based Coding  Lempel-Ziv-Welch (LZW) algorithm employs an adaptive, dictionary- based compression technique.  LZW uses fixed-length codewords to represent variable-length strings of symbols/characters that commonly occur together.  Example: LZW compression for string “ ABABBABCABABBA" Output codes are: Instead of sending 14 characters, only 9 codes need to be sent (compression ratio = 14/9 = 1.56).

8 Lossless Image Compression  Approaches of Differential Coding of Images: Given an original image I(x, y), using a simple difference operator we can define a difference image d(x, y) as follows: Due to spatial redundancy existed in normal images I, the difference image d will have a narrower histogram and hence a smaller entropy Distributions for Original versus Derivative Images. (a,b): Original gray-level image and its partial derivative image; (c,d): Histograms for original and derivative images.

9 Lossless JPEG  The Predictive method: 1.Forming a differential prediction: A predictor combines the values of up to three neighboring pixels as the predicted value for the current pixel, indicated by `X' in Figure. The predictor can use any one of the seven schemes listed in the below Table. 2.Encoding: The encoder compares the prediction with the actual pixel value at the position `X' and encodes the difference using one of the lossless compression techniques, e.g., the Human coding scheme.

10 Lossy Compression Algorithms  lossy compression Compressed data is not the same as the original data, but a close approximation of it. Yields a much higher compression ratio than that of lossless compression.  Distortion Measures mean square error (MSE)  2, where xn, yn, and N are the input data sequence, reconstructed data sequence, and length of the data sequence respectively. signal to noise ratio (SNR), in decibel units (dB), where is the average square value of the original data sequence and is the MSE. peak signal to noise ratio (PSNR), Which measures the size of the error relative to the peak value of the signal X peak

11 Rate-Distortion Theory  Rate: average number of bits required to represent each source symbol.  Provides a framework for the study of tradeoffs between Rate and Distortion. Typical Rate Distortion Function. D is a tolerable amount of distortion, R(D) specifies the lowest rate at which the source data can be encoded while keeping the distortion bounded above by D. D=0, have a lossless compression of source R(D)=0 (D max ), max. amount of distortion

12 Quantization  Three different forms of quantization. Uniform: partitions the domain of input values into equally spaced intervals. Two types -  Midrise: even number of output levels (a)  Midtread: odd number of output levels (b); zero: one of output Nonuniform: companded (Compressor/Expander) quantizer. Vector Quantization.

13 Companded and Vector quantization  A compander consists of a compressor function G, a uniform quantizer, and an expander function G −1.  Vector Quantization (VQ)

14 Transform Coding  If Y is the result of a linear transform T of the input vector X in such a way that the components of Y are much less correlated, then Y can be coded more efficiently than X.  Discrete Cosine Transform (DCT) to decompose the original signal into its DC and AC components Spatial frequency: how many times pixel values change across an image block. IDCT is to reconstruct (re-compose) the signal.  2D DCT and 2D IDCT (Definition of DCT) (2D DCT) (2D IDCT)

15 1D DCT basis functions Fourier analysis !

16 DFT (Discrete Fourier Transform)  DCT is a transform that only involves the real part of the DFT.  Continuous Fourier transform: Euler ’ s formula  Discrete Fourier Transform: Graphical illustration of 8 X 8 2D-DCT basis. White (1), Black (0) To obtain DCT coefficients, just form the inner product of each of these 64 basis image with an 8 X 8 block from an origial image.

17 Wavelet-Based Coding  Objective: to decompose input signal (for compression purposes) into components that are easier to deal with, have special interpretations, or have some components that can be thresholded away.  Its basis functions are localized in both time and frequency.  Two types of wavelet transforms: continuous wavelet transform (CWT) and the discrete wavelet transform (DWT)  Discrete wavelets are again formed from a mother wavelet, but with scale and shift in discrete steps.  DWT forms an orthonormal basis of L2(R).  Multiresolution analysis provides the tool to adapt signal resolution to only relevant details for a particular task.

18 Image Compression Standards  JPEG (Joint Photographic Experts Group) an image compression standard accepted as an international standard in a lossy image compression method by using DCT  Useful when image contents change relatively slowly  human less to notice loss of very high spatial frequency component  Visual acuity is much greater for gray than for color.

19 Main Steps in JPEG Image Compression  Transform RGB to YIQ or YUV and subsample color.  DCT on image blocks.  Quantization.  Zig-zag ordering and run-length encoding.  Entropy coding.

20 JPEG Image Compression  DCT on image blocks Each image is divided into 8X8 blocks. 2D DCT is applied to each block image f(i,j), with output being the DCT coefficients F(u,v) for each block.  Quantization F(u,v) represents a DCT coefficient, Q(u,v) is a “ quantization matrix" entry, and ^ F(u,v) represents the quantized DCT coefficients which JPEG will use in the succeeding entropy coding  Zig-zag ordering and run-length encoding RLC on AC coefficients make to hit a long run of zeros: a zig-zag scan used to turn the 8X8 matrix into a 64-vector

21 JPEG2000 Standard  To provide a better rate-distortion tradeoff and improved subjective image quality.  To provide additional functionalities lacking in JPEG standard.  addresses the following JPEG problems: Lossless and Lossy Compression Low Bit-rate Compression large Images Single Decompression Architecture Transmission in Noisy Environments Progressive Transmission Region of Interest Coding Computer Generated Imagery Compound Documents

22 Properties of JPEG2000 Image Compression  Uses Embedded Block Coding with Optimized Truncation (EBCOT) algorithm which partitions each subband LL, LH, HL, HH produced by the wavelet transform into small blocks called “ code blocks".  A separate scalable bitstream is generated for each code block => improved error resilience. Code block structure of EBCOT.

23 Region of Interest Coding in JPEG2000  Particular regions of the image may contain important information, thus should be coded with better quality than others.  A scaling-based method ( MXSHIFT) to scale up the coefficients in the ROI so that they are placed into higher bitplanes. Region of interest (ROI) coding of an image using a circularly shaped ROI. (a) 0.4 bpp, (b) 0.5 bpp, (c) 0.6bpp, and (d) 0.7 bpp.