Foundation of Video Coding Part II: Scalar and Vector Quantization

Slides:



Advertisements
Similar presentations
Aggregating local image descriptors into compact codes
Advertisements

2806 Neural Computation Self-Organizing Maps Lecture Ari Visa.
Sampling and Pulse Code Modulation
CELLULAR COMMUNICATIONS 5. Speech Coding. Low Bit-rate Voice Coding  Voice is an analogue signal  Needed to be transformed in a digital form (bits)
CSE 589 Applied Algorithms Spring 1999 Image Compression Vector Quantization Nearest Neighbor Search.
The Mean Square Error (MSE):. Now, Examples: 1) 2)
2015/6/15VLC 2006 PART 1 Introduction on Video Coding StandardsVLC 2006 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
Spatial and Temporal Data Mining
Adaptive Rao-Blackwellized Particle Filter and It’s Evaluation for Tracking in Surveillance Xinyu Xu and Baoxin Li, Senior Member, IEEE.
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
Frederic Payan, Marc Antonini
© 2005, it - instituto de telecomunicações. Todos os direitos reservados. Gerhard Maierbacher Scalable Coding Solutions for Wireless Sensor Networks IT.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
Lattices for Distributed Source Coding - Reconstruction of a Linear function of Jointly Gaussian Sources -D. Krithivasan and S. Sandeep Pradhan - University.
Part 3 Vector Quantization and Mixture Density Model CSE717, SPRING 2008 CUBS, Univ at Buffalo.
2015/7/12VLC 2008 PART 1 Introduction on Video Coding StandardsVLC 2008 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
Review Rong Jin. Comparison of Different Classification Models  The goal of all classifiers Predicating class label y for an input x Estimate p(y|x)
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
©2003/04 Alessandro Bogliolo Background Information theory Probability theory Algorithms.
Context-Based Adaptive Entropy Coding Xiaolin Wu McMaster University Hamilton, Ontario, Canada.
EE513 Audio Signals and Systems Statistical Pattern Classification Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Computer Vision – Compression(2) Hanyang University Jong-Il Park.
Frame by Frame Bit Allocation for Motion-Compensated Video Michael Ringenburg May 9, 2003.
CS 395 T Real-Time Graphics Architectures, Algorithms, and Programming Systems Spring’03 Vector Quantization for Texture Compression Qiu Wu Dept. of ECE.
IMAGE COMPRESSION USING BTC Presented By: Akash Agrawal Guided By: Prof.R.Welekar.
CSIE Dept., National Taiwan Univ., Taiwan
Mathematical Preliminaries. 37 Matrix Theory Vectors nth element of vector u : u(n) Matrix mth row and nth column of A : a(m,n) column vector.
CMPT 365 Multimedia Systems
CE Digital Signal Processing Fall 1992 Waveform Coding Hossein Sameti Department of Computer Engineering Sharif University of Technology.
Overview of Supervised Learning Overview of Supervised Learning2 Outline Linear Regression and Nearest Neighbors method Statistical Decision.
1 PCM & DPCM & DM. 2 Pulse-Code Modulation (PCM) : In PCM each sample of the signal is quantized to one of the amplitude levels, where B is the number.
MACHINE LEARNING 8. Clustering. Motivation Based on E ALPAYDIN 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2  Classification problem:
Chapter 17 Image Compression 17.1 Introduction Redundant and irrelevant information  “Your wife, Helen, will meet you at Logan Airport in Boston.
Compression-based Texture Merging “ Unsupervised Segmentation of Natural Images via Lossy Data Compression ” Allen Y. Yang, John Wright, Shankar Sastry,
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization.
Ultraspectral Sounder Data Compression
Project 11: Determining the Intrinsic Dimensionality of a Distribution Okke Formsma, Nicolas Roussis and Per Løwenborg.
Source Coding Efficient Data Representation A.J. Han Vinck.
PCM & DPCM & DM.
A Fast LBG Codebook Training Algorithm for Vector Quantization Presented by 蔡進義.
Vector Quantization Vector quantization is used in many applications such as image and voice compression, voice recognition (in general statistical pattern.
Vector Quantization CAP5015 Fall 2005.
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) Image Compression Quantization independent samples uniform and optimum correlated.
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) Image Compression Review of Basics Huffman coding run length coding Quantization.
Chapter 8 Lossy Compression Algorithms. Fundamentals of Multimedia, Chapter Introduction Lossless compression algorithms do not deliver compression.
Faculty of Information Engineering, Shenzhen University Liao Huilian SZU TI-DSPs LAB Aug 27, 2007 Optimizer based on particle swarm optimization and LBG.
Rate Distortion Theory. Introduction The description of an arbitrary real number requires an infinite number of bits, so a finite representation of a.
Graphics II Image Processing I. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia Technology course of University.
Presentation III Irvanda Kurniadi V. ( )
PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 1: INTRODUCTION.
S.R.Subramanya1 Outline of Vector Quantization of Images.
Chapter 8 Lossy Compression Algorithms
Pyramid Vector Quantization
JPEG Compression What is JPEG? Motivation
An Image Database Retrieval Scheme Based Upon Multivariate Analysis and Data Mining Presented by C.C. Chang Dept. of Computer Science and Information.
The Johns Hopkins University
Outline Introduction Signal, random variable, random process and spectra Analog modulation Analog to digital conversion Digital transmission through baseband.
Chapter 3 向量量化編碼法.
Context-based Data Compression
2018/9/16 Distributed Source Coding Using Syndromes (DISCUS): Design and Construction S.Sandeep Pradhan, Kannan Ramchandran IEEE Transactions on Information.
Overview of Supervised Learning
Scalar Quantization – Mathematical Model
Department of Electrical and Computer Engineering
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.
A Data Hiding Scheme Based Upon Block Truncation Coding
PCM & DPCM & DM.
EE513 Audio Signals and Systems
第 四 章 VQ 加速運算與編碼表壓縮 4-.
Chair Professor Chin-Chen Chang Feng Chia University
Hiding Information in VQ Index Tables with Reversibility
Presentation transcript:

Foundation of Video Coding Part II: Scalar and Vector Quantization Video Processing & Communications Foundation of Video Coding Part II: Scalar and Vector Quantization Yao Wang Polytechnic University, Brooklyn, NY11201 yao@vision.poly.edu Based on: Y. Wang, J. Ostermann, and Y.-Q. Zhang, Video Processing and Communications, Prentice Hall, 2002.

Outline Overview of video coding systems Scalar Quantization Vector Quantization Rate-distortion characterization of lossy coding Operational rate distortion function Rate distortion bound (lossy coding bound) ©Yao Wang, 2003 Coding: Quantization

Components in a Coding System ©Yao Wang, 2003 Coding: Quantization

Lossy Coding Original source is discrete Original source is continuous Lossless coding: bit rate >= entropy rate One can further quantize source samples to reach a lower rate Original source is continuous Lossless coding will require an infinite bit rate! One must quantize source samples to reach a finite bit rate Lossy coding rate is bounded by the mutual information between the original source and the quantized source that satisfy a distortion criterion Quantization methods Scalar quantization Vector quantization ©Yao Wang, 2003 Coding: Quantization

Scalar Quantization General description Uniform quantization MMSE quantizer Lloyd algorithm ©Yao Wang, 2003 Coding: Quantization

SQ as Line Partition ©Yao Wang, 2003 Coding: Quantization

Function Representation ©Yao Wang, 2003 Coding: Quantization

Distortion Measure General measure: Mean Square Error (MSE) ©Yao Wang, 2003 Coding: Quantization

Uniform Quantization Uniform source: Each additional bit provides 6dB gain! ©Yao Wang, 2003 Coding: Quantization

Minimum MSE (MMSE) Quantizer or (Nearest Neighbor Condition) (Centroid Condition) Nearest neighbor condition: Centroid condition: Special case: uniform source MSE optimal quantizer = Uniform quantizer ©Yao Wang, 2003 Coding: Quantization

High Resolution Approximation For a source with arbitrary pdf, when the rate is high so that the pdf within each partition region can be approximated as flat: ©Yao Wang, 2003 Coding: Quantization

Lloyd Algorithm Iterative algorithms for determining MMSE quantizer parameters Can be based on a pdf or training data Iterate between centroid condition and nearest neighbor condition

Vector Quantization General description Nearest neighbor quantizer MMSE quantizer Generalized Lloyd algorithm ©Yao Wang, 2003 Coding: Quantization

Vector Quantization: General Description Motivation: quantize a group of samples (a vector) together, to exploit the correlation between these samples Each sample vector is replaced by one of representative vectors (or patterns) that often occur in the signal Applications: Color quantization: Quantize all colors appearing in an image to L colors for display on a monitor that can only display L distinct colors at a time – Adaptive palette Image quantization: Quantize every NxN block into one of the L typical patterns (obtained through training). More efficient with larger block size, but block size are limited by complexity. ©Yao Wang, 2003 Coding: Quantization

VQ as Space Partition Every point in a region (Bl) is replaced by (quantized to) the point indicated by the circle (gl) ©Yao Wang, 2003 Coding: Quantization

Distortion Measure General measure: MSE: ©Yao Wang, 2003 Coding: Quantization

Nearest Neighbor (NN) Quantizer Challenge: How to determine the codebook? ©Yao Wang, 2003 Coding: Quantization

Complexity of NN VQ Complexity analysis: Example: Fast algorithms: Must compare the input vector with all the codewords Each comparison takes N operations Need L=2^{NR} comparisons Total operation = N 2^{NR} Total storage space = N 2^{NR} Both computation and storage requirement increases exponentially with N! Example: N=4x4 pixels, R=1 bpp: 16x2^16=2^20=1 Million operation/vector Apply to video frames, 720x480 pels/frame, 30 fps: 2^20*(720x480/16)*30=6.8 E+11 operations/s ! When applied to image, block size is typically limited to <= 4x4 Fast algorithms: Structured codebook so that one can conduct binary tree search Product VQ: can search subvectors separately ©Yao Wang, 2003 Coding: Quantization

MMSE Vector Quantizer Necessary conditions for MMSE Nearest neighbor condition Generalized centroid condition: MSE as distortion: ©Yao Wang, 2003 Coding: Quantization

Caveats  Both quantizer satisfy the NN and centroid condition, but the quantizer on the right is better! NN and centroid conditions are necessary but NOT sufficient for MSE optimality! ©Yao Wang, 2003 Coding: Quantization

Generalized Lloyd Algorithm (LBG Algorithm) Start with initial codewords Iterate between finding best partition using NN condition, and updating codewords using centroid condition ©Yao Wang, 2003 Coding: Quantization

Example

Rate-Distortion Characterization of Lossy Coding Operational rate-distortion function of a quantizer: Relates rate and distortion: R(D) A vector quantizer reaches different point on its R(D) curve by using different number of codewords Can also use distortion-rate function D(R) Rate distortion bound for a source Minimum rate R needed to describe the source with distortion <=D RD optimal quantizer: Minimize D for given R or vice versa Typical D(R) curve ©Yao Wang, 2003 Coding: Quantization

Lossy Coding Bound (Shannon Lossy Coding Theorem) IN(F,G): mutual information between F and G, information provided by G about F QD,N: all coding schemes (or mappings q(g|f)) that satisfy distortion criterion dN(f,g)<=D h(F): differential entropy of source F RG(D): RD bound for Gaussian source with the same variance ©Yao Wang, 2003 Coding: Quantization

RD Bound for Gaussian Source i.i.d. 1-D Gaussian: i.i.d. N-D Gaussian with independent components: N-D Gaussian with covariance matrix C: Gaussian source with power spectrum (FT of correlation function) ©Yao Wang, 2003 Coding: Quantization

Summary Coding system: Quantization: original data -> model parameters -> quantization-> binary encoding Quantization: Scalar quantization: Uniform quantizer MMSE quantizer (Nearest neighbor and centroid condition) Vector quantization Nearest neighbor quantizer MMSE quantizer Generalized Lloyd alogorithm Can be realized by lattice quantizer (not discussed here) Rate distortion characterization of lossy coding Bound on lossy coding Operational RD function of practical quantizers ©Yao Wang, 2003 Coding: Quantization

Homework 8 Reading assignment: Written assignment Computer assignment Sec. 8.5-8.7, 8.3.2,8.3.3 Written assignment Prob. 8.8,8.11,8.14 Computer assignment Option 1: Write a program to perform vector quantization on a gray scale image using 4x4 pixels as a vector. You should design your codebook using all the blocks in the image as training data, using the generalized Lloyd algorithm. Then quantize the image using your codebook. You can choose the codebook size, say, L=128 or 256. If your program can work with any specified codebook size L, then you can observe the quality of quantized images with different L. Option 2: Write a program to perform color quantization on a color RGB image. Your vector dimension is now 3, containing R,G,B values. The training data are the colors of all the pixels. You should design a color palette (i.e. codebook) of size L, using generalized Lloyd algorithm, and then replace the color of each pixel by one of the color in the palette. You can choose a fixed L or let L be a user-selectable variable. In the later case, observe the quality of quantized images with different L. ©Yao Wang, 2003 Coding: Quantization