Page 1KUT Graduate Course Data Compression Jun-Ki Min.

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Greedy Algorithms (Huffman Coding)
Data Compressor---Huffman Encoding and Decoding. Huffman Encoding Compression Typically, in files and messages, Each character requires 1 byte or 8 bits.
Data Compression Michael J. Watts
Lecture04 Data Compression.
Compression & Huffman Codes
School of Computing Science Simon Fraser University
Lempel-Ziv Compression Techniques Classification of Lossless Compression techniques Introduction to Lempel-Ziv Encoding: LZ77 & LZ78 LZ78 Encoding Algorithm.
SWE 423: Multimedia Systems
2015/6/15VLC 2006 PART 1 Introduction on Video Coding StandardsVLC 2006 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
CSCI 3 Chapter 1.8 Data Compression. Chapter 1.8 Data Compression  For the purpose of storing or transferring data, it is often helpful to reduce the.
SWE 423: Multimedia Systems Chapter 7: Data Compression (2)
Text Operations: Coding / Compression Methods. Text Compression Motivation –finding ways to represent the text in fewer bits –reducing costs associated.
A Data Compression Algorithm: Huffman Compression
JPEG.
Compression & Huffman Codes Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
2015/7/12VLC 2008 PART 1 Introduction on Video Coding StandardsVLC 2008 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
Data Compression Basics & Huffman Coding
Data dan Teknologi Multimedia Sesi 08 Nofriyadi Nurdam.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Spring 2015 Mathematics in Management Science Binary Linear Codes Two Examples.
Software Research Image Compression Mohamed N. Ahmed, Ph.D.
Basics of Compression Goals: to understand how image/audio/video signals are compressed to save storage and increase transmission efficiency to understand.
Chapter 2 Source Coding (part 2)
Noiseless Coding. Introduction Noiseless Coding Compression without distortion Basic Concept Symbols with lower probabilities are represented by the binary.
15-853Page :Algorithms in the Real World Data Compression II Arithmetic Coding – Integer implementation Applications of Probability Coding – Run.
Entropy coding Present by 陳群元. outline constraints  Compression efficiency  Computational efficiency  Error robustness.
296.3Page 1 CPS 296.3:Algorithms in the Real World Data Compression: Lecture 2.5.
Basics of Data Compression Paolo Ferragina Dipartimento di Informatica Università di Pisa.
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.
Huffman Encoding Veronica Morales.
1 Analysis of Algorithms Chapter - 08 Data Compression.
Prof. Amr Goneid Department of Computer Science & Engineering
Chapter 7 – End-to-End Data Two main topics Presentation formatting Compression We will go over the main issues in presentation formatting, but not much.
Image Compression (Chapter 8) CSC 446 Lecturer: Nada ALZaben.
Multimedia Data Introduction to Lossless Data Compression Dr Sandra I. Woolley Electronic, Electrical.
Compression.  Compression ratio: how much is the size reduced?  Symmetric/asymmetric: time difference to compress, decompress?  Lossless; lossy: any.
ICS 220 – Data Structures and Algorithms Lecture 11 Dr. Ken Cosh.
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.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Introduction to Algorithms Chapter 16: Greedy Algorithms.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Huffman Code and Data Decomposition Pranav Shah CS157B.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 6 – Basics of Compression (Part 1) Klara Nahrstedt Spring 2011.
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
Huffman Codes Juan A. Rodriguez CS 326 5/13/2003.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Digital Image Processing Lecture 22: Image Compression
Lossless Compression(2)
Multi-media Data compression
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.
Images. Audio. Cryptography - Steganography MultiMedia Compression } Movies.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval" Basics
Computer Sciences Department1. 2 Data Compression and techniques.
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.
Data Compression Michael J. Watts
Compression & Huffman Codes
IMAGE COMPRESSION.
Applied Algorithmics - week7
Lempel-Ziv-Welch (LZW) Compression Algorithm
Context-based Data Compression
UNIT IV.
Image Transforms for Robust Coding
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Page 1KUT Graduate Course Data Compression Jun-Ki Min

Page 2KUT Data Compression Huge Data  Large Processing Time Exact Result vs. Approximated Result Lossless Compression Lossy Compression

Page 3KUT Data Compression –Advantage Reduce Storage Requirements Data Transfer Performance –Disadvantage Process Overhead Loss of some subtle information

Page 4KUT General compression techniques –lossy compression DCT, Wavelet, Patricia Trie After compression, the original data representation can never be reconstructed. –lossless compression static : using fixed probability semi adaptive : using preliminary pass of the file to gather static adaptive : dynamically estimating the probability of each symbol

Page 5KUT Lossless Compression : Static scheme Dictionary Encoding –Assign an integer to each new world in the input Run Length Encoding(RLE) –Replace sequences of identical values by a count field, followed by an identifier for the repeated value –When the sequence has enough repeated values Differential Encoding(Delta Encoding) –Replace sequences with a code value which defines its relationship to a specific sequence –When data are of uniform size and tend to vary relatively slowly

Page 6KUT Lossless Compression: Example 1 Dictionary Encoding input: ABC ABC BC DDD Compressed Data: Dictionary: ABC =1, BC = 2, DDD=3 RLE input:AAABCCDD Compressed Data: Differential Encoding input: Johnson Jonah Jones Jorgenson Compressed Data: (0) Johnson (2)nah (3)es (2)rgenson

Page 7KUT Lossless Compression: Semi Adaptive Scheme Huffman Encoding –The most frequent characters are assigned shorter codes and the less frequent characters are assigned longer codes –Code Length = log 2 (1/symbol frequency) –Relatively easy to implements –Decompression process is very complex the length of each code to be read is not known until first few bits are interpreted –Frequency distribution for the set of input symbol must be known => maybe two scans.

Page 8KUT Lossless Compression: Example 2 Huffman Code –use a full binary tree 0 or two children –input: a 1 a 7 a 4 a 2 –Compressed Data: a6a6 a5a5 a1a1 a2a2 a4a4 a3a3 a7a7

Page 9KUT Lossless Compression: Adaptive Scheme LZ(Lempel-Ziv) Coding –Adaptive dictionary encoding –Converts variable-length strings into fixed-length codes –Requires only one pass of the original data –The original sequence must be sufficiently long for the procedure to build up enough symbol frequency experience to achieve good compression over the full ensemble

Page 10KUT Lossless Compression:Example 3 LZ –O(n 2 ) for a string of n symbols –new table entry is coded as (i,c) i : the codeword for the existing table entry(12 bit) c : the appended character(8bit) –Input: {A B AB AA ABA} –Compressed Data: {(0,A)(0,B)(1,B)(1,A)(3,A)}

Page 11KUT Arithmetic Encoding Intuition –Represents a message by an interval –Successive symbols of the message reduce the size of the interval in accordance with symbol probabilities –An massage is transformed into an variable sized bit string. the decoder needs some way of knowing when to stop. –sending the size of message –always attach the EOM symbol

Page 12KUT a6a6 a5a5 a1a1 a2a2 a4a4 a3a3 a7a7 [0.0 ~ 0.25) [0.25 ~ 0.45) [0.45 ~ 0.60) [0.60 ~ 0.72) [0.72 ~ 0.82) [0.82~ 0.92) [0.92 ~ 1.0) Arithmetic Encoding: Example input: a 1 a 7 a 4 a 2 Output: initial [.0 ~ 1.0) a 1 =>[.0~.25) a 7 =>[.0+(.25*0.92) ~.0+(.25*1.0)) => [.23 ~.25) a 4 => [.23+(.02*.6 ) ~.23+(.02*.72))=>[.242~.2444) a 2 => [.242+(.002*.25) ~.242+(.002*.45)) =>.2425 ~.2429 choose a binary value among [0.2425~ )

Page 13KUT Lossy Compression Wavelet- Based –Easy to Compute –A useful mathematical tool for hierarchically decomposing functions –Represent a function in terms of a coarse overall shape –Haar Wavelet The Haar basis is the simplest wavelet basis Fast to compute and easy to implement

Page 14KUT Haar Wavelet Given a one dimensional data [ ] –Recursive pairwise averagine and differencing at different resolutions –The wavelet transform of the original data is given by [ ] c0= (a1+a2+a3+a4)/4 c1 = (a1+a2-a3-a4)/4 c2 = (a1-a2)/2 c3 = (a3-a4)/2 Resolution AverageDetail 4[ ] 2[8 4][1, -1] 1[6][2]

Page 15KUT Reconstruction of Data : Use an Error Tree Example e.g.) d3 = c0-c1+c3 = 6-2+(-1) = 3

Page 16KUT Haar Wavelet Compression A large number of the detail coefficients turn out to be very small in magnitude Removing these small coefficients introduces small errors Lossy compression e.g.) For original data [ ] –haar wavelet coefficients is [ ] –Let us take two coefficients, 6, 2 only –Then, we have [ ] –Reconstructed Data = [ ]

Page 17KUT Energe Preservation and Tresholding Energy(X) =  i=1 N x i 2 =  i=1 N w i 2 –x i is original value and w i is wavelet coefficient L2-norm ( squared error)  i=1 N ( x i –y i ) 2 =  i=1 N (w i -w i ) 2 =  i=k+1 N w i 2 since w i is 0 if i > k+1