VC 12/13 T16 Video Compression

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

Lecture 8 JPEG Compression (Part 3)

06/12/2017. Image compression. Image compression. Image compression. Image compression. Coding redundancy: image 1 has four gray levels

Image coding and compression

Digital Video Processing

Digital Image Representation Image Compression

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

Video Compression An Introduction

CMPT 365 Multimedia Systems. Media Compression - Image

Fundamentals of Video Compression. Video Compression

Lecture 6: Compression II. This Week s Schedule

Computer and Machine Vision

Compression II: Images (JPEG)

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

Lecture 8 JPEG Compression (Part 3)

Lecture Coding Theory. Source Coding. Image and Video Compression. Images: Wikipedia

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

IMAGE COMPRESSION TECHNIQUES

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

7: Image Compression

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

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

Lecture 5: Compression I. This Week s Schedule

Introduction ti to JPEG

VC 11/12 T14 Visual Feature Extraction

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

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

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

JPEG Compression. What is JPEG?

Digital Image Processing

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

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

VC 10/11 T4 Colour and Noise

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

compression and coding ii

Lecture 3 Image and Video (MPEG) Coding

CS 335 Graphics and Multimedia. Image Compression

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

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

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

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

Week 14. Video Compression. Ref: Fundamentals of Multimedia

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

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

Ch. 2: Compression Basics Multimedia Systems

Laboratoire d'informatique, de Robotique et de Microélectronique de Montpellier Montpellier Cedex 5 France

MPEG-4: Simple Profile (SP)

Image Coding and Compression

7.5 Dictionary-based Coding

Multimedia Networking ECE 599

Repetition 1st lecture

( ) ; For N=1: g 1. g n

Wireless Communication

Compression of Stereo Images using a Huffman-Zip Scheme

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

Part 1 of 4. MARCH

PREFACE...XIII ACKNOWLEDGEMENTS...XV

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Chapter 1. Digital Data Representation and Communication. Part 2

VC 17/18 TP14 Pattern Recognition

Ian Snyder. December 14, 2009

COMP 249 Advanced Distributed Systems Multimedia Networking. The Video Data Type Coding & Compression Basics

VC 10/11 T9 Region-Based Segmentation

Module 7 VIDEO CODING AND MOTION ESTIMATION

IMAGE COMPRESSION. Chapter - 5 : (Basic)

Image Compression - An Overview Jagroop Singh 1

Image Compression Algorithm and JPEG Standard

Video coding. Concepts and notations.

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

AUDIOVISUAL COMMUNICATION

Image Compression. CS 6640 School of Computing University of Utah

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

Image Coding and Data Compression

Data and information. Image Codning and Compression. Image compression and decompression. Definitions. Images can contain three types of redundancy

Course Syllabus. Website Multimedia Systems, Overview

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

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

JPEG Modes of Operation. Nimrod Peleg Dec. 2005

Topic 5 Image Compression

JPEG. Wikipedia: Felis_silvestris_silvestris.jpg, Michael Gäbler CC BY 3.0

VIDEO SIGNALS. Lossless coding

Image Processing Computer Graphics I Lecture 15

Image Processing. Blending. Blending in OpenGL. Image Compositing. Blending Errors. Antialiasing Revisited Computer Graphics I Lecture 15

Multimedia Systems Video II (Video Coding) Mahdi Amiri April 2012 Sharif University of Technology

MULTIMEDIA AND CODING

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

The Core Technology of Digital TV

A NEW ENTROPY ENCODING ALGORITHM FOR IMAGE COMPRESSION USING DCT

Mahdi Amiri. February Sharif University of Technology

JPEG: An Image Compression System. Nimrod Peleg update: Nov. 2003

Digital Image Processing

G64PMM - Lecture 3.2. Analogue vs Digital. Analogue Media. Graphics & Still Image Representation

TKT-2431 SoC design. Introduction to exercises

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

Introduction to Video Compression

Image and Video Coding I: Fundamentals

DCT Based, Lossy Still Image Compression

Forensic analysis of JPEG image compression

IMAGE COMPRESSION USING FOURIER TRANSFORMS

Using animation to motivate motion

Transcription:

VC 12/13 T16 Video Compression Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos Miguel Tavares Coimbra

Outline The need for compression Types of redundancy Image compression Video compression

Topic: The need for compression The need for compression Types of redundancy Image compression Video compression

Images are great!

But... Images need storage space... A lot of space! Size: 1024 x 768 pixels RGB colour space 8 bits per color = 2,6 MBytes

What about video? VGA: 640x480, 3 bytes per pixel -> 920KB per image. Each second of video: 23 MB Each hour of vídeo: 83 GB The death of Digital Video

What if...? We exploit redundancy to compress image and video information? Image Compression Standards Video Compression Standards Explosion of Digital Image & Video Internet media DVDs Digital TV...

Compression Data compression Reduce the quantity of data needed to store the same information. In computer terms: Use fewer bits. How is this done? Exploit data redundancy. But don t we lose information? Only if you want to...

Types of Compression Lossy We do not obtain an exact copy of our compressed data after decompression. Very high compression rates. Increased degradation with sucessive compression / decompression. Lossless We obtain an exact copy of our compressed data after decompression. Lower compression rates. Freely compress / decompress images. It all depends on what we need...

Topic: Types of redundancy The need for compression Types of redundancy Image compression Video compression

Coding Redundancy Information Theory The most common values should be encoded with fewer bits. Huffman coding Smallest possible number of code symbols per source symbols. Lossless. LZW coding Creates additional values for common sequences of values (e.g. sequence of black pixels). GIF, TIFF, PDF. Exploits the spatial redundancy of images!

Huffman Coding Developed by David A. Huffman while he was a Ph.D. student at MIT. Variable-length code. Entropy encoding algorithm. Optimal for a symbol-by-symbol coding. Lossless. http://en.wikipedia.org/wiki/huffman_coding

Normal representation: 2 bits/symbol Entropy of the source: 1.73 bits/symbol Huffman code: 1.83 bits/symbol

Spatial Redundancy How spatially redundant is this... Image?

What about this one?

How to exploit this? Correlation between neighboring pixels. E.g. A white line can be coded with two numbers: [nr. Pixels; colour]. Mathematics: Lossless LZW Coding GIF... Lossy The DCT Transform JPEG...

LZW Coding (Lempel-Ziv-Welch) In a nutshell: Uses a string translation table. Maps fixed length codes to strings. Why is this great for images? Imagine pixels as chars. Common sequences of pixels are mapped by a single code. How many codes are needed to represent a white line? http://en.wikipedia.org/wiki/lzw

Discrete Cosine Transform (DCT) Can be seen as a cut-down version of the DFT: Use only the real part but... Has double the resolution so... It has the same number of coefficients. Why do we use it?

Why DCT? Energy compacting potential superior to DFT.

Visual significance of coefficients Zero Frequency 8x8 blocks Resulting image if all energy is concentrated on this coefficient Horizontal Frequency Vertical Frequency

Temporal redundancy Consecutive images of a video stream do not vary much. Some areas don t change at all (background). Others only change their spatial location (moving objects). Object Background

How do we exploit this? Send image differences Consecutive images are very similar. Difference images are spatially much more redundant than real images. Exploit spatial redundancy of difference images! Motion vectors What if the camera moves? What if objects move? Use motion estimation before calculating the difference image!

Motion estimation Tries to find where an area of the image was in a previous image. Objective: Minimize the difference between these two blocks. In fact: We don t really care whether this is the same object or not... I-frame P-frame...... Obtains Motion Vectors

Block Matching Search for a similar block in a neighboring region Full search is too expensive. Variations: 3SS [Koga81], LogS [JJ81], N3SS [Li94], 4SS [PM96],... Various cost functions used: MAD, MSD, CCF, PDC,... Noisy approximation to optical flow. Aperture and blank wall problems. Confidence measures? Frame N 1 MAD( dx, dy) mn MSD( dx, dy) 1 mn Frame N+1 n / 2 m / 2 i n / 2 j m / 2 n / 2 m / 2 F( i, j) G( i dx, j dx) F( i, j) G( i dx, j dx) i n / 2 j m / 2 2

Three-Step Search (3SS) Algorithm Test 8 points around the centre. Choose lowest cost. Test 8 points around the new point with a lower step. Etc... Very popular Fast. Moderate accuracy. Easy to implement in hardware.

Psicovisual redundancy Human visual system Different sensitivity to different information. Human processing We only see some parts of the image. Our brain completes the rest.

Human sensitivity We notice errors in homogenous regions. Low frequencies. We notice errors in edges. High frequencies. We don t notice noise in textured areas. Medium frequencies.

Topic: Image compression The need for compression Types of redundancy Image compression Video compression

Lossless Compression Some types of images are not adequate for lossy compression. Logos Text Medical images (??) Etc. Our sensitivity to errors in these situations is too high.

Graphics Interchange Format (GIF) Lossless. 8 bpp format. 256 colour palette. LZW data compression. Popular for logos, text and simple images. Allows animations. http://en.wikipedia.org/wiki/image:rot ating_earth_%28large%29.gif

Lossy Compression Acceptable for most real images and situations. Very popular: JPEG. We can control the level of compression vs. Quality of the resulting image. How do we do this?

Lossy Image Compression Most popular: JPEG Colour space: YCbCr Colour less important than intensity. DCT. Quantization. Zig-Zag Run-Length Huffman encoding DCT Zig-Zag RLE

Chroma Format 4:2:0 Chroma Format 4:2:2 Chroma Format Chrominance Luminance 4:4:4 Chroma Format Psico-visual redundancy

DCT Concentrate energy into a smaller number of coefficients

Quantization Lossy Process! Give higher importance to low spatial frequencies

Zig-Zag scanning Smaller quantization. Less zeros. Higher quantization. More zeros. Create long sequences of zeros Huffman Coding

Considerations We can control compression via a quantization factor. The higher the factor, the higher the number of zeros in the DCT > Better Huffman coding. Problem: High quantization factors produce compression artifacts.

Small compression

Medium compression

High compression

Topic: Video compression The need for compression Types of redundancy Image compression Video compression

Exploiting temporal redundancy Using all other redundancies for JPEG: Compression factor - 10:1 Exploiting temporal redundancy for MPEG-2: Compression factor 100:1 Temporal redundacy is of vital importance to video compression!

Video Compression H.261, H.263, DivX, MPEG 1, MPEG-2 Images compressed as JPEG. Image prediction. Motion estimation. DVD, Digital TV,

Intra-frame and Inter-frame prediciton

MPEG Motion estimation Motion vectors: B Images P Images Point to areas in: I Images P Images Groups Of Pictures: Consider error propagation. Consider compression levels.

Decoder Model

Compressed Domain Processing Encoded Multimedia Stream Decoding Process Decompressed Image Compressed Domain Image Domain Can t we exploit this information? DC Images Motion Flow... Decoding Function Decoding cost (%) Bit stream header parsing 0.44 Huffman decoding and inverse quantization 19.00 Inverse 8x8 DCT 22.10 Motion compensation 38.64 Colour transformation and display 19.82

Resources Gonzalez & Woods Chapter 6 MPEG Compression - http://mia.ece.uic.edu/~papers/www/multi mediastandards/chapter7.pdf Image Coding Fundamentals http://videocodecs.blogspot.com/2007/05/i mage-coding-fundamentals_08.html