Department of Computer Engineering University of California at Santa Cruz Data Compression (1) Hai Tao.

Slides:



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

15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression CS 147 Minh Nguyen.
Multimedia Communications EG 371 and EG 348
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Image Compression, Transform Coding & the Haar Transform 4c8 – Dr. David Corrigan.
School of Computing Science Simon Fraser University
CSc 461/561 CSc 461/561 Multimedia Systems Part B: 1. Lossless Compression.
SWE 423: Multimedia Systems
Department of Computer Engineering University of California at Santa Cruz Data Compression (3) Hai Tao.
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.
Spatial and Temporal Data Mining
Compression JPG compression, Source: Original 10:1 Compression 45:1 Compression.
Department of Computer Engineering University of California at Santa Cruz Video Compression Hai Tao.
A Data Compression Algorithm: Huffman Compression
Computer Science 335 Data Compression.
Data Compression Basics
Klara Nahrstedt Spring 2014
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
Lossless Compression - I Hao Jiang Computer Science Department Sept. 13, 2007.
Department of Computer Engineering University of California at Santa Cruz Data Compression (2) Hai Tao.
Lossless Compression in Multimedia Data Representation Hao Jiang Computer Science Department Sept. 20, 2007.
Chapter 2 Source Coding (part 2)
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) 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.
1 Analysis of Algorithms Chapter - 08 Data Compression.
Prof. Amr Goneid Department of Computer Science & Engineering
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 6 – Basics of Compression (Part 1) Klara Nahrstedt Spring 2010.
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
Multimedia Specification Design and Production 2012 / Semester 1 / L3 Lecturer: Dr. Nikos Gazepidis
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
Image Compression (Chapter 8) CSC 446 Lecturer: Nada ALZaben.
Group No 5 1.Muhammad Talha Islam 2.Karim Akhter 3.Muhammad Arif 4.Muhammad Umer Khalid.
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.
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
COMPRESSION. Compression in General: Why Compress? So Many Bits, So Little Time (Space) CD audio rate: 2 * 2 * 8 * = 1,411,200 bps CD audio storage:
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 8. Greedy Algorithms.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
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.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Project Proposal Audio Compression Variants
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) Image Compression Review of Basics Huffman coding run length coding Quantization.
Lossless Decomposition and Huffman Codes Sophia Soohoo CS 157B.
Multi-media Data compression
1 Data Compression Hae-sun Jung CS146 Dr. Sin-Min Lee Spring 2004.
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.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
Dr. Hadi AL Saadi Image Compression. Goal of Image Compression Digital images require huge amounts of space for storage and large bandwidths for transmission.
1 Part A Multimedia Production Chapter 2 Multimedia Basics Digitization, Coding-decoding and Compression Information and Communication Technology.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
RICO HARTONO JAHJA SOURCE CODING: PART IV.
Data Compression Michael J. Watts
Introduction to Lossless Compression
Design & Analysis of Algorithm Huffman Coding
Lecture 10: data compression
Data Compression.
Lecture 10: data compression
Data Compression.
Data Compression CS 147 Minh Nguyen.
Analysis & Design of Algorithms (CSCE 321)
Chapter 11 Data Compression
Huffman Coding CSE 373 Data Structures.
CSE 589 Applied Algorithms Spring 1999
Judith Molka-Danielsen, Oct. 02, 2000
15 Data Compression Foundations of Computer Science ã Cengage Learning.
CSE 589 Applied Algorithms Spring 1999
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Department of Computer Engineering University of California at Santa Cruz Data Compression (1) Hai Tao

Department of Computer Engineering University of California at Santa Cruz Data Compression – Why ? n Storing or transmitting multimedia data requires large space or bandwidth The size of one hour 44K sample/sec 16-bit stereo (two channels) audio is 3600x44000x2x2= 633.6MB, which can be recorded on one CD (650 MB). MP3 compression can reduce this number by factor of 10 The size of a 500x500 color image is 750KB without compression (JPEG can reduced this by a factor of 10 to 20) The size of one minute real-time, full size, color video clip is 60x30x640x480x3= 1.659GB. A two-hour movie requires 200GB. MPEG2 compression can bring this number down to 4.7 GB (DVD)

Department of Computer Engineering University of California at Santa Cruz Compression methods Entropy Coding Run-length Coding Huffman Coding Arithmetic Coding Prediction DPCM DM Transformation FFT Source CodingDCT Layered Coding Bit Position Sub-sampling Sub-band Coding Vector Quantization Hybrid Coding JPEG MPEG H.261 DV1 RTV, DV1 PLV

Department of Computer Engineering University of California at Santa Cruz Run-length coding n Example: A scanline of a binary image is Total of 50 bits However, strings of consecutive 0’s or 1’s can be represented more efficiently 0(23) 1(1) 0(12) 1(1) 0(13) If the counts can be represented using 5 bits, then we can reduce the amount of data to 5+5*5=30 bits. A compression ratio of 40%

Department of Computer Engineering University of California at Santa Cruz Huffman coding n Example: 4 letters in language “A” “B” “S” “Z” To uniquely encode each letter, we need two bits A- 00 B-01 S-10 Z – 11 A message “AAABSAAAAZ” is encoded with 20 bits Now how about assign A- 0 B-100 S-101 Z – 11 The same message can be encoded using 15 bits The basic idea behind Huffman coding algorithm is to assign shorter codewords to more frequently used symbols

Department of Computer Engineering University of California at Santa Cruz Huffman coding – Problem statement n Given a set of N symbols S={s i, i=1,…N} with probabilities of occurrence P i, i=1,…N, find the optimal encoding of the the symbol to achieve the minimum transmission rate (bits/symbol) n Example: Five symbols, A,B,C,D,E with probabilities of P(A)=0.16, P(B)=0.51 P(C)=0.09 P(D)=0.13 P(E)=0.11 Without Huffman coding, 3 bits are needed for each symbol

Department of Computer Engineering University of California at Santa Cruz Huffman Coding - Algorithm n Algorithm Each symbol is a leave node in a tree Combining the two symbols or composite symbols with the least probabilities to form a new parent composite symbols, which has the combined probabilities. Assign a bit 0 and 1 to the two links Continue this process till all symbols merged into one root node. For each symbol, the sequence of the 0s and 1s from the root node to the symbol is the code word n Example

Department of Computer Engineering University of California at Santa Cruz Huffman Coding - Example n Step 1 n Step 2 n Step 3 P(C)=0.09)P(E)=0.11) P(CE)=0.20) P(D)=0.13)P(A)=0.16) P(AD)=0.29) P(C)=0.09)P(E)=0.11) P(CE)=0.20) P(D)=0.13)P(A)=0.16) P(AD)=0.29) P(ACDE)=0.49) 1 0

Department of Computer Engineering University of California at Santa Cruz Huffman Coding - Example n Step 4 n Step 5 A=000, B=1, C=011, D=001, E=010 Expected bits/symbol is 3*( )+1*0.51=3*0.49+1*0.51=1.98bit/symbol Compression ratio is 1.02/3=34% P(C)=0.09)P(E)=0.11) P(CE)=0.20) P(D)=0.13)P(A)=0.16) P(AD)=0.29) P(ACDE)=0.49) 1 0 P(ABCDE)=1) P(B)=0.51) 1 0