Lecture 12: Compression

Similar documents
Chapter 1. Digital Data Representation and Communication. Part 2

CS 335 Graphics and Multimedia. Image Compression

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Fundamentals of Video Compression. Video Compression

Compression; Error detection & correction

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5.

Compression; Error detection & correction

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013

Part 1 of 4. MARCH

Lecture 5: Compression I. This Week s Schedule

Digital Image Representation Image Compression

Topic 5 Image Compression

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay

Megapixel Video for. Part 2 of 4. Brought to You by. Presented by Video Security Consultants

TKT-2431 SoC design. Introduction to exercises

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

Multimedia Networking ECE 599

VC 12/13 T16 Video Compression

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

Source Coding Techniques

Wireless Communication

Lecture 8 JPEG Compression (Part 3)

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding

Department of electronics and telecommunication, J.D.I.E.T.Yavatmal, India 2

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

TKT-2431 SoC design. Introduction to exercises. SoC design / September 10

A COMPRESSION TECHNIQUES IN DIGITAL IMAGE PROCESSING - REVIEW

Video Compression An Introduction

Image Coding and Data Compression

IMAGE COMPRESSION TECHNIQUES

So, what is data compression, and why do we need it?

Interactive Progressive Encoding System For Transmission of Complex Images

Video Compression MPEG-4. Market s requirements for Video compression standard

DCT Based, Lossy Still Image Compression

What is multimedia? Multimedia. Continuous media. Most common media types. Continuous media processing. Interactivity. What is multimedia?

JPEG Compression Using MATLAB

Image and Video Compression Fundamentals

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami

ELE 201, Spring 2014 Laboratory No. 4 Compression, Error Correction, and Watermarking

Module 7 VIDEO CODING AND MOTION ESTIMATION

Compression. storage medium/ communications network. For the purpose of this lecture, we observe the following constraints:

Image Compression - An Overview Jagroop Singh 1

Multimedia. What is multimedia? Media types. Interchange formats. + Text +Graphics +Audio +Image +Video. Petri Vuorimaa 1

Lecture 6: Compression II. This Week s Schedule

7.5 Dictionary-based Coding

IMAGE COMPRESSION- I. Week VIII Feb /25/2003 Image Compression-I 1

Digital Image Processing

Professor Laurence S. Dooley. School of Computing and Communications Milton Keynes, UK

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

Image Pyramids and Applications

Course Syllabus. Website Multimedia Systems, Overview

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

ECE 499/599 Data Compression & Information Theory. Thinh Nguyen Oregon State University

AUDIOVISUAL COMMUNICATION

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding.

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

Image, video and audio coding concepts. Roadmap. Rationale. Stefan Alfredsson. (based on material by Johan Garcia)

Mahdi Amiri. February Sharif University of Technology

An Analytical Review of Lossy Image Compression using n-tv Method

Lossless Compression Algorithms

ESE532: System-on-a-Chip Architecture. Today. Message. Project. Expect. Why MPEG Encode? MPEG Encoding Project Motion Estimation DCT Entropy Encoding

Introduction ti to JPEG

CSCD 443/533 Advanced Networks Fall 2017

2.2: Images and Graphics Digital image representation Image formats and color models JPEG, JPEG2000 Image synthesis and graphics systems

Interframe coding A video scene captured as a sequence of frames can be efficiently coded by estimating and compensating for motion between frames pri

Digital Image Representation. Image Representation. Color Models

CHAPTER 6. 6 Huffman Coding Based Image Compression Using Complex Wavelet Transform. 6.3 Wavelet Transform based compression technique 106

DIGITAL IMAGE PROCESSING WRITTEN REPORT ADAPTIVE IMAGE COMPRESSION TECHNIQUES FOR WIRELESS MULTIMEDIA APPLICATIONS

IMAGE COMPRESSION. October 7, ICSY Lab, University of Kaiserslautern, Germany

A NEW ENTROPY ENCODING ALGORITHM FOR IMAGE COMPRESSION USING DCT

CS 260: Seminar in Computer Science: Multimedia Networking

Lecture Information Multimedia Video Coding & Architectures

Hybrid Image Compression Using DWT, DCT and Huffman Coding. Techniques

Image Compression Algorithm and JPEG Standard

Steven A. Morley, K.S. Thyagarajan, A. Chris Irvine QUALCOMM Incorporated San Diego, CA

Data Representation. Types of data: Numbers Text Audio Images & Graphics Video

CMPT 365 Multimedia Systems. Media Compression - Image

Compression II: Images (JPEG)

Huffman Code Application. Lecture7: Huffman Code. A simple application of Huffman coding of image compression which would be :

IMAGE COMPRESSION. Chapter - 5 : (Basic)

7: Image Compression

AN ANALYTICAL STUDY OF LOSSY COMPRESSION TECHINIQUES ON CONTINUOUS TONE GRAPHICAL IMAGES

JPEG 2000 compression

EFFICIENT DEISGN OF LOW AREA BASED H.264 COMPRESSOR AND DECOMPRESSOR WITH H.264 INTEGER TRANSFORM

HYBRID TRANSFORMATION TECHNIQUE FOR IMAGE COMPRESSION

Multimedia Communications ECE 728 (Data Compression)

Lecture 8 JPEG Compression (Part 3)

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology

University of Mustansiriyah, Baghdad, Iraq

CS101 Lecture 12: Image Compression. What You ll Learn Today

Image coding and compression

Robert Matthew Buckley. Nova Southeastern University. Dr. Laszlo. MCIS625 On Line. Module 2 Graphics File Format Essay

CoE4TN4 Image Processing. Chapter 8 Image Compression

INF5063: Programming heterogeneous multi-core processors. September 17, 2010

Audio and video compression

Transcription:

Lecture 12: Compression The Digital World of Multimedia Prof. Mari Ostendorf

Announcements Lab3: Finish this week Lab 4: Finish *at least* parts 1-2 this week Read the lab *before* lab You probably need to spend some time outside of lab to finish by next week Reminder: Books are on reserve in the engineering library. HW 4: Involves reading online articles don t wait until the last minute

Lab 4: Image Processing & Photo Mosaic Mosaic: Replace KxK block in the original with a KxK block from a picture set, choosing the one with the most similar color properties (3-dimensional distance for each region of the block)

Goals for Today Basics of Compression Lossless compression Orsak et al. 6.1-6.4 Cyganski & Orr Chpt 7 Image compression Cyganski & Orr Chpt 8

COMPRESSION What is compression? Representing an signal (sound, image or video) with fewer total bits Compression ratio = (# bits in original)/(# bits in compressed image) Why bother? Storage: You can fit more songs & videos on your IPOD Communication: faster downloads; real-time video conferencing Compression involves: Encoding: typically transform to a form that differs from normal audio/image presentation Decoding: undo the transformations done in encoding Compress, Encode Storage or Communication Decompress, Decode

Example: JPEG Encoding/Compression Transform: Encode Divide the image into blocks of 8x8 pixels Storage or Comm. Perform the discrete cosine transform (DCT) on each block Quantize the coefficients in each block (lossy step) Lossless compression Reorder according to increasing spatial frequency Use entropy (or arithmentic) coding on the resulting values Decoding/Decompression Undo lossless coding & reordering Reconstruct the signal Perform inverse DCT on quantized coefficients for each blocks Put the blocks back together Decode

Two Types of Compression Lossless compression (fewer bits, same sound/image) Takes advantage of redundancy (the next word in a sequence is more predictable when given the previous words) relative frequency (some words occur more than others) Lossy compression (fewer bits, some differences from the original) Takes advantage of human perception Usually gives better compression ratio

Lossy vs. Lossless Compression? Lossy: good for signals that humans perceive (sound, images, video) Lossless: good for written documents, financial data Of course, often you use both! (as in mpeg & jpeg) What about medical signals, biometric signals, or other signals to be analyzed by the doctor or a computer for decision making? Practically possible to use lossy compression, but what about legal issues (malpractice suits) Changes in technology could change the choice of what to keep

Many Meanings of Frequency Audio signal processing: Frequency content Time resolution: sampling frequency (sampling rate = 1/sampling interval in samples/sec) Image processing: Frequency content (spatial frequency) Spatial resolution: pixels per inch (image equivalent to sampling frequency) Color: Different colors correspond to different frequencies of light (frequency= 1/wavelength) Lossless coding: Frequency of codeword/symbol used

Lossless Compression Fewer bits + no change to the final signal Basic idea: Allow a variable-length code Leverage information about frequency, i.e. use Short codes for more frequent things Long codes for infrequent things Make sure that you can tell symbols apart

Example: Run-length Coding Code the number of repetitions of a symbol Example 1: 36/25 = 1.44 compression factor 100000000011100001111111100000000000 (36 bits) 1(1) (9) (3) (4) (8) (11) (1+6*4 = 25 bits, using 4 bit code) 1 0001 1001 0011 0100 1000 1011 Example 2: 26/13=2 (max run known), 26/20=1.3 (no max length) 11111111110000011111111111 (26 bits) 1(10) (5) (11) (1+3*4 = 13 bits, using 4 bit code) 1(7) 1(3) 0(5) 1(7) 1(4) (5*4=20 bits, using 1 value + 3-bit code) Most effective if it can take advantage of long repeating strings

Example: Morse Code.103 E..080 T _.064 A._.057 N _..063 O _.051 S.058 I...022 C _._.?? Ä._._.001 Q._?? É.._..??,.. Frequent letters (a,e,i,n,t) have 1-2 taps per letter. Less frequent letters (c,q,z,..., foreign symbols) have 3-4 taps each. Numbers & foreign symbols have 4-5 taps. Punctuation: 6 taps Identifiability: _._. C vs. NN?

Example: Entropy Coding Takes advantage of unbalanced distribution Like the 20 questions game: answers to questions are 0/1 bits Stop asking questions when you have the answer The first questions you ask are the ones that give the most information (more frequent cases have fewer bits) Entropy coding helps. High Entropy Medium Entropy Zero Entropy No benefit from entropy coding No need to send anything!

What if Your Frequencies are Wrong? Codeword Case I Case II Case III Case IV 1 0.25 0.60 0.97 0.1 01 0.25 0.25 0.01 0.2 001 0.25 0.10 0.01 0.3 0001 0.25 0.05 0.01 0.4 Avg bits/word 2.5 1.6 0.99 3.0 Avg bits/word = Σ i freq(i)*length(i) Note: if code and frequencies are mismatched, bit rate is worse than using fixed-length code (00,01,10,11).

How do you know the frequencies? Design different codes for different sources Learn frequencies from other examples of that source type Attach code identifier to coded document Design code for the document Count occurrences in the document Attach the whole code to the coded document