SWE 423: Multimedia Systems

Slides:



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

Data Compression CS 147 Minh Nguyen.
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
SIMS-201 Compressing Information. 2  Overview Chapter 7: Compression Introduction Entropy Huffman coding Universal coding.
Data Compression Michael J. Watts
Lecture04 Data Compression.
Compression & Huffman Codes
School of Computing Science Simon Fraser University
CSc 461/561 CSc 461/561 Multimedia Systems Part B: 1. Lossless Compression.
Department of Computer Engineering University of California at Santa Cruz Data Compression (1) 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
SWE 423: Multimedia Systems Chapter 7: Data Compression (2)
SWE 423: Multimedia Systems
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.
Data Compression Basics & Huffman Coding
1 Lossless Compression Multimedia Systems (Module 2) r Lesson 1: m Minimum Redundancy Coding based on Information Theory: Shannon-Fano Coding Huffman Coding.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Basics of Compression Goals: to understand how image/audio/video signals are compressed to save storage and increase transmission efficiency to understand.
Huffman Coding Vida Movahedi October Contents A simple example Definitions Huffman Coding Algorithm Image Compression.
Compression Algorithms Robert Buckley MCIS681 Online Dr. Smith Nova Southeastern University.
8. Compression. 2 Video and Audio Compression Video and Audio files are very large. Unless we develop and maintain very high bandwidth networks (Gigabytes.
Chapter 2 Source Coding (part 2)
Source Coding-Compression
296.3Page 1 CPS 296.3:Algorithms in the Real World Data Compression: Lecture 2.5.
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
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.
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.
File Compression Techniques Alex Robertson. Outline History Lossless vs Lossy Basics Huffman Coding Getting Advanced Lossy Explained Limitations Future.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
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:
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.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Digital Image Processing Lecture 22: Image Compression
Lossless Compression(2)
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
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.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
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.
Lecture 12 Huffman Coding King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
1 SWE 423 – Multimedia System. 2 SWE Multimedia System Introduction  Compression is the process of coding that will effectively reduce the total.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Data Compression: Huffman Coding in Weiss (p.389)
Data Compression Michael J. Watts
Textbook does not really deal with compression.
IMAGE PROCESSING IMAGE COMPRESSION
Digital Image Processing Lecture 20: Image Compression May 16, 2005
IMAGE COMPRESSION.
Data Compression.
Applied Algorithmics - week7
Image Compression The still image and motion images can be compressed by lossless coding or lossy coding. Principle of compression: - reduce the redundant.
Data Compression.
Data Compression CS 147 Minh Nguyen.
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.
CSE 589 Applied Algorithms Spring 1999
Huffman Coding Greedy Algorithm
Presentation transcript:

SWE 423: Multimedia Systems Chapter 7: Data Compression (2)

Outline General Data Compression Scheme Compression Techniques Entropy Encoding Run Length Encoding Huffman Coding

General Data Compression Scheme Encoder (compression) Input Data Codes / Codewords Storage or Networks Codes / Codewords Decoder (decompression) B0 = # bits required before compression B1 = # bits required after compression Compression Ratio = B0 / B1. Output Data

Compression Techniques Coding Type Basis Technique Entropy Encoding Run-length Coding Huffman Coding Arithmetic Coding Source Coding Prediction DPCM DM Transformation FFT DCT Layered Coding Bit Position Subsampling Sub-band Coding Vector Quantization Hybrid Coding JPEG MPEG H.263 Many Proprietary Systems

Compression Techniques Entropy Coding Semantics of the information to encoded are ignored Lossless compression technique Can be used for different media regardless of their characteristics Source Coding Takes into account the semantics of the information to be encoded. Often lossy compression technique Characteristics of medium are exploited Hybrid Coding Most multimedia compression algorithms are hybrid techniques

Entropy Encoding Information theory is a discipline in applied mathematics involving the quantification of data with the goal of enabling as much data as possible to be reliably stored on a medium and/or communicated over a channel. According to Claude E. Shannon, the entropy  (eta) of an information source with alphabet S = {s1, s2, ..., sn} is defined as where pi is the probability that symbol si in S will occur.

Entropy Encoding In science, entropy is a measure of the disorder of a system. More entropy means more disorder Negative entropy is added to a system when more order is given to the system. The measure of data, known as information entropy, is usually expressed by the average number of bits needed for storage or communication. The Shannon Coding Theorem states that the entropy is the best we can do (under certain conditions). i.e., for the average length of the codewords produced by the encoder, l’,  l’

Entropy Encoding Example 1: What is the entropy of an image with uniform distributions of gray-level intensities (i.e. pi = 1/256 for all i)? Example 2: What is the entropy of an image whose histogram shows that one third of the pixels are dark and two thirds are bright?

Entropy Encoding: Run-Length Data often contains sequences of identical bytes. Replacing these repeated byte sequences with the number of occurrences reduces considerably the overall data size. Many variations of RLE One form of RLE is to use a special marker M-byte that will indicate the number of occurrences of a character “c”!# How many bytes are used above? When do you think the M-byte should be used? ABCCCCCCCCDEFGGG is encoded as ABC!8DEFGGG What if the string contains the “!” character? How much is the compression ratio for this example Note: This encoding is DIFFERENT from what is mentioned in your book

Entropy Encoding: Run-Length Many variations of RLE : Zero-suppression: In this case, one character that is repeated very often is the only character used in the RLE. In this case, the M-byte and the number of additional occurrences are stored. When do you think the M-byte should be used, as opposed to using the regular representation without any encoding?

Entropy Encoding: Run-Length Many variations of RLE : If we are encoding black and white images (e.g. Faxes), one such version is as follows: (row#, col# run1 begin, col# run1 end, col# run2 begin, col# run2 end, ... , col# runk begin, col# runk end) (row#, col# run1 begin, col# run1 end, col# run2 begin, col# run2 end, ... , col# runr begin, col# runr end) ... (row#, col# run1 begin, col# run1 end, col# run2 begin, col# run2 end, ... , col# runs begin, col# runs end)

Entropy Encoding: Huffman Coding One form of variable length coding Greedy algorithm Has been used in fax machines, JPEG and MPEG

Entropy Encoding: Huffman Coding Algorithm huffman Input: A set C = {c1 , c2 , ... , cn} of n characters and their frequencies {f(c1) , f(c2 ) , ... , f(cn )} Output: A Huffman tree (V, T) for C. 1. Insert all characters into a min-heap H according to their frequencies. 2. V = C; T = {} 3. for j = 1 to n – 1 4. c = deletemin(H) 5. c’ = deletemin(H) f(v) = f(c) + f(c’) // v is a new node Insert v into the minheap H Add (v,c) and (v,c’) to tree T making c and c’ children of v in T 9. end for

Entropy Encoding: Huffman Coding Example

Entropy Encoding: Huffman Coding Most important properties of Huffman Coding Unique Prefix Property: No Huffman code is a prefix of any other Huffman code For example, 101 and 1010 cannot be Huffman codes. Why? Optimality: The Huffman code is a minimum-redundancy code (given an accurate data model) The two least frequent symbols will have the same length for their Huffman code, whereas symbols occurring more frequently will have shorter Huffman codes It has been shown that the average code length of an information source S is strictly less than  + 1, i.e.  l’ <  + 1