Example: compressing black and white images 2 Say we are trying to compress an image of black and white pixels: CSC310 Information Theory.

Similar documents
Advanced Data Structures and Algorithms

Lecture 16: Feedback channel and source-channel separation

Data Storage and Manipulation

Digital Audio and Video Fidelity. Ken Wacks, Ph.D.

ELEC 691X/498X Broadcast Signal Transmission Fall 2015

Compressed-Sensing-Enabled Video Streaming for Wireless Multimedia Sensor Networks Abstract:

Motion Video Compression

Joint Optimization of Source-Channel Video Coding Using the H.264/AVC encoder and FEC Codes. Digital Signal and Image Processing Lab

Optimization of Multi-Channel BCH Error Decoding for Common Cases. Russell Dill Master's Thesis Defense April 20, 2015

NUMEROUS elaborate attempts have been made in the

Module 8 VIDEO CODING STANDARDS. Version 2 ECE IIT, Kharagpur

COMP 249 Advanced Distributed Systems Multimedia Networking. Video Compression Standards

Distributed Video Coding Using LDPC Codes for Wireless Video

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Implementation of a turbo codes test bed in the Simulink environment

Chapt er 3 Data Representation

Lossless Compression Algorithms for Direct- Write Lithography Systems

Chapter 10 Basic Video Compression Techniques

Chapter 2 Introduction to

Lab 2 Part 1 assigned for lab sessions this week

WYNER-ZIV VIDEO CODING WITH LOW ENCODER COMPLEXITY

MULTIMEDIA COMPRESSION AND COMMUNICATION

Wyner-Ziv Coding of Motion Video

Error Resilience for Compressed Sensing with Multiple-Channel Transmission

Data Representation. signals can vary continuously across an infinite range of values e.g., frequencies on an old-fashioned radio with a dial

Research Topic. Error Concealment Techniques in H.264/AVC for Wireless Video Transmission in Mobile Networks

MULTI-STATE VIDEO CODING WITH SIDE INFORMATION. Sila Ekmekci Flierl, Thomas Sikora

Multimedia Communications. Video compression

AN MPEG-4 BASED HIGH DEFINITION VTR

Video compression principles. Color Space Conversion. Sub-sampling of Chrominance Information. Video: moving pictures and the terms frame and

Audio Compression Technology for Voice Transmission

Autosophy data / image compression and encryption

Bar Codes to the Rescue!

Module 4: Video Sampling Rate Conversion Lecture 25: Scan rate doubling, Standards conversion. The Lecture Contains: Algorithm 1: Algorithm 2:

1/29/2008. Announcements. Announcements. Announcements. Announcements. Announcements. Announcements. Project Turn-In Process. Quiz 2.

Chapter 1. Introduction to Digital Signal Processing

AN UNEQUAL ERROR PROTECTION SCHEME FOR MULTIPLE INPUT MULTIPLE OUTPUT SYSTEMS. M. Farooq Sabir, Robert W. Heath and Alan C. Bovik

ECE 715 System on Chip Design and Test. Lecture 22

Contents. xv xxi xxiii xxiv. 1 Introduction 1 References 4

An Overview of Video Coding Algorithms

8/30/2010. Chapter 1: Data Storage. Bits and Bit Patterns. Boolean Operations. Gates. The Boolean operations AND, OR, and XOR (exclusive or)

Lecture 18: Exam Review

A Study of Encoding and Decoding Techniques for Syndrome-Based Video Coding

Chapter 3 Digital Data

Announcements. Project Turn-In Process. and URL for project on a Word doc Upload to Catalyst Collect It

Digital Television Fundamentals

Data Manipulation. Audio and Image Representation. -Representation, Compression, and Communication Errors. Audio Representation

Pattern Smoothing for Compressed Video Transmission

II. SYSTEM MODEL In a single cell, an access point and multiple wireless terminals are located. We only consider the downlink

EMBEDDED ZEROTREE WAVELET CODING WITH JOINT HUFFMAN AND ARITHMETIC CODING

A Novel Approach towards Video Compression for Mobile Internet using Transform Domain Technique

Announcements. Project Turn-In Process. Project 1A: Project 1B. and URL for project on a Word doc Upload to Catalyst Collect It

Digital Representation

Video Transmission. Thomas Wiegand: Digital Image Communication Video Transmission 1. Transmission of Hybrid Coded Video. Channel Encoder.

Chapter 2. Advanced Telecommunications and Signal Processing Program. E. Galarza, Raynard O. Hinds, Eric C. Reed, Lon E. Sun-

Audiovisual Archiving Terminology

COE328 Course Outline. Fall 2007

COSC3213W04 Exercise Set 2 - Solutions

Minimax Disappointment Video Broadcasting

Multimedia Communications. Image and Video compression

Error Resilient Video Coding Using Unequally Protected Key Pictures

HEVC: Future Video Encoding Landscape

Comunicação de Áudio e Vídeo, Fernando Pereira

Understanding IP Video for

Performance Evaluation of Error Resilience Techniques in H.264/AVC Standard

CS 61C: Great Ideas in Computer Architecture

Intra-frame JPEG-2000 vs. Inter-frame Compression Comparison: The benefits and trade-offs for very high quality, high resolution sequences

Implementation of an MPEG Codec on the Tilera TM 64 Processor

FACSIMILE: CODING AND TRANSMISSION OF BILEVEL IMAGES

Lecture 23: Digital Video. The Digital World of Multimedia Guest lecture: Jayson Bowen

Research Article. ISSN (Print) *Corresponding author Shireen Fathima

1843 First facsimile patent (England, nº 9745) registered by Mr. Alexander Bain telephone has not been invented until 1876!

Digital Video Telemetry System

Link download full: Test Bank for Business Data Communications Infrastructure Networking and Security 7th Edition by William

Modeling and Optimization of a Systematic Lossy Error Protection System based on H.264/AVC Redundant Slices

Interframe Bus Encoding Technique for Low Power Video Compression

AC103/AT103 ANALOG & DIGITAL ELECTRONICS JUN 2015

RECOMMENDATION ITU-R BT.1203 *

Design for Test. Design for test (DFT) refers to those design techniques that make test generation and test application cost-effective.

University of Bristol - Explore Bristol Research. Peer reviewed version. Link to published version (if available): /ISCAS.2005.

Logic Design II (17.342) Spring Lecture Outline

Speeding up Dirac s Entropy Coder

HDMI Demystified April 2011

Design of Fault Coverage Test Pattern Generator Using LFSR

PAPER Wireless Multi-view Video Streaming with Subcarrier Allocation

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

Embedding Multilevel Image Encryption in the LAR Codec

Video 1 Video October 16, 2001

Understanding IP Video for

Visual Communication at Limited Colour Display Capability

Chapter 1: Data Storage. Copyright 2015 Pearson Education, Inc.

TRAFFIC SURVEILLANCE VIDEO MANAGEMENT SYSTEM

CS311: Data Communication. Transmission of Digital Signal - I

Video coding standards

Lossless Compression With Context And Average Encoding And Decoding And Error Modelling In Video Coding

UC Berkeley UC Berkeley Previously Published Works

New forms of video compression

Analysis of Video Transmission over Lossy Channels

Introduction to Digital Signal Processing (DSP)

Spatial Error Concealment Technique for Losslessly Compressed Images Using Data Hiding in Error-Prone Channels

Transcription:

CSC310 Information Theory Lecture 1: Basics of Information Theory September 11, 2006 Sam Roweis Example: compressing black and white images 2 Say we are trying to compress an image of black and white pixels: e.g. the image above is 10 rows by 50 columns, so it has 500 pixels. If we encode white with 0 and black with 1, it takes 500 bits ( binary digits ) to store this image. Can we do better? Hmm... Well, there are more white than black pixels. And both tend to come in clumps together. Can we exploit these observations to make our encoding shorter? What is Information Theory? 1 Information Theory is the formal study of the (related) problems of data compression and data communication (error correction). Data compression: the task of taking a sequence of symbols and re-representing them in a more compact way but so that we can still recover the original sequence. Examples: Compressing computer files (e.g. gzip). Compressing images (e.g. jpeg,gif). Compressing audio/video (e.g. mpeg). Communication: transmitting and storing sequences of symbols reliably when the medium we are using introduces errors. Examples: ECC memory Error corrections on CDs. Cell phone and space probe transmissions. Send only black pixels 3 One idea is to encode only the black pixels, by encoding the row and starting/ending columns for each run of black as binary #s. This requires (4+6+6)=16 bits per run (can you see why?). In the image above, there are 54 black runs, so it would cost 54x16 = 864 bits to encode this image. That s worse than the 500 bit encoding we started with!

Run-length encoding 4 Another idea is to scan out the image (left to right, top to bottom), and encode runs of white/black pixels. (Assume the size of the image is known.) Say we use 8 bits per run, with the first bit to tell us the colour, and the other 7 bits the length of the run (from 0 to 127 in binary). In the image above, there are 55 white and 54 black runs, so the total size would be 8x(55+54)=872 bits. That s slightly worse than 864 and still worse than 500. Actually, we only need to send the colour of the first run (why?), but that only saves us 108 bits, still leaving 764. Modeling the Source 6 Moral of the story: the more knowledge about our source we incorporate into our compression scheme, the better off we are (as long as the knowledge is correct). The most common way to incorporate knowledge is to build a probabilistic model of the sorts of inputs you expect to see. Given such a model, information theory can help us solve the mathematical and algorithmic problem of efficiently encoding sequences from the source. E.g. we might model black and white images using the conditional probability that a pixel is black given a certain number of pixels above it and left of it. If we somehow know enough about the source to specify these probabilities we can use a static model; more likely we ll have to learn them as we go through the image an adaptive model. Send rectangles of black 5 Rather than sending each row s runs on its own, we could encode the top left and bottom right coordinates of rectangles containing all black pixels. Each rectangle requires 2*(4+8)=24 bits. In the image above, there are 20 black rectangles, so it would cost 20x20 = 400 bits to encode this image. Finally, a bit better than 500! Other ideas: use fewer bits per run; don t allow runs of length zero; use different schemes for black vs. white runs; divide the image into sub-images and encode only those which aren t all white;... What s the best we could ever do, on average? 7 Can we say anything about the best scheme we could possibly come up with to compress images like Hi Mom? Surprisingly, if we model images (or any other sequence of symbols) as coming from a probabilistic source, and imagine using a fixed encoder over and over again to compress whatever the source produces, we can say something (quite strong) about the best average compression we could ever achieve. In particular, then there is a hard lower limit, called the source entropy below which no scheme can losslessly compress. This is Shannon s famous Noiseless Coding Theorem (1948). Limits performance, given a source model. Many algorithms exist which perform nearly optimally with respect to these limits. But often quite hard to get good source models; therein lies the art of applying information theory to real world problems.

Model all data/messages as strings of binary digits8 In order to be able to perform algorithmic and mathematical analyses of the problems of data compression and communication, we will model all data/messages to be transmitted or compressed as strings of binary digits (bits). For our purposes, the content of the message is irrelevant; the bits could come from a file, as a stream of digitized audio over a wireless channel, as an email or HTML page over the web. The physical medium of the communication channel is also irrelevant; it could be a noisy radio link, a disk drive, or a phone line. We care only about statistical structure in message/noisy channel. For compression, we want to find patterns that occur non-randomly which we can exploit to achieve compression. For communication, we want to design an encoding scheme that is robust to the kind of distortions our channel will introduce. Error Probability vs. Rate 10 Here are the plots are for P = 0.1. 0.1 0.08 0.06 0.04 0.02 0 R5 R61 R3 more useful codes 0 0.2 0.4 0.6 0.8 1 Rate R1 0.1 0.01 1e-05 1e-10 1e-15 R5 R61 R3 more useful codes 0 0.2 0.4 0.6 0.8 1 Rate R1 Example: Error Correction in Noisy Channels 9 Suppose we are trying to send a sequence of bits through a channel that sometimes randomly flips a bit from 0 1 or vice versa. How can we encode the original sequence so that we can still recover it reliably at the other end? Simple idea: repetition code. Send each bit k times. Effective transmission rate is now 1/k. e.g. with k = 2 to send 01101 we actually send 0011110011 with k = 3 to send 01101 we actually send 000111111000111 The decoder looks at groups of k received bits and replaces each group with the bit that occurs most often in the group (which you can prove is the best thing to do) or requests resend. Example, with k = 3 sequence 01101 000111111000111 transmission received code 010111101100101 01101 decoded How much does this improve reliability (vs. rate reduction)? Analysis of the Repetition Code 11 Assume each bit of our transmission gets flipped with some probability P, independently for each bit. (May not be true.) Sender: repeat each bit k times. Receiver: take majority vote. For odd k, we make a decoding error if a group has > k/2 errors. Probability of decoding an original bit correctly k i=(k+1)/2 P i. If P = 0.2 and we are sending message of only 8 bits: k = 1 p(message-ok) = 0.851; rate=1.0 k = 2 p(message-ok) = 0.996; rate 0.365 k = 3 p(message-ok) = 0.999; rate=0.333 Of course, our rate of transmission goes down by a factor of k. As we increase k, we can drive p(correct) to 1, but we also drive our transmission rate to zero at the same time. Is this inevitable?

The Surprising Answer: No! 12 Amazingly, using smarter schemes than repetition, it turns out that we actually can transmit with arbitrarily small error at a finite (non-zero) rate called the capacity of the channel. This is Shannon s famous Noisy Coding Theorem (1948). For example, in our channel with P = 0.1, the capacity turns out to be 0.531, in other words we can obtain virtually zero errors while only transmitting less than twice as many bits are in the original message. But there is a catch: to achieve arbitrarily small errors, we need to encode the original message in long blocks of bits (not just one bit at a time). This creates a large delay at the decoder since we have to wait for a whole block to be decoded before we can see the bits at the start of the block. Requirements on the Encoder and Decoder 14 In compression, we require that d(e(s)) = s s (i.e. the encoder and decoder functions compose to identity). Our goal is to make the size of e(s) as small as possible, on average (averaged over our source distribution). We want the encoder to remove redundancy from input sequences. In transmission, r will have noise added to it by some (stochastic) noise function n(r) = r called the channel. Our goal is to make d(n(e(s))) = s almost always, without making e(s) too big (now averaged over both the source and noise distributions). We want the encoder to add redundancy to the input sequence. Mathematical Setup 13 We can formalize compression and communication as specific mathematical problems. We always start with a sequence of symbols s = s 1,s 2,...,s N from a finite alphabet A. (e.g. ASCII strings). During compression/transmission we will convert this sequence into a new sequence r = r 1,r 2,...,r M (using a possibly different alphabet B) and then back into s during decompression/reception. Our goal is to come up with two functions: an encoder e(s) = r and a decoder d(r). In both cases, we want to be able to recover the original string from its encoded version, while keeping the length of the encoding short. Measuring how well we do 15 In compression, we want our encoding to be as small as possible. In transmission, we want to maximize the rate at which we can send/receive over the noisy channel, while still achieving acceptably good recovery of the original data. In many cases (e.g. compressing computer files, reading/writing to memory chips) we require lossless recovery, which means that the recovered sequence of symbols is exactly identical to the original. In other cases (e.g. images, audio, video) we are willing to accept some distortion, meaning that the recovered sequence may be slightly different than the original. Of course, this often means we can compress/transmit much more aggressively. We may also require that the encoding or decoding process be fast, have small delay or use only a small amount of processor power or extra memory (e.g. streaming audio).

What this course will cover 16 The mathematical theory behind solving the problems of compression and communication, culminating in two famous theorems proved by Claude Shannon in 1948 that give us limits on how well any method can do. Practical algorithms (which took much longer to appear) for actually doing compression/communication that are almost optimal according to the theory. Examples: arithmetic coding, linear codes, low-density parity check codes. Modelling issues; i.e. how we can take a real world problem and cast in into the mathematical form necessary for us to analyze it with Shannon s theorems and apply known algorithms to it. Examples: source modeling using dictionary methods such as PPM and Lempel-Ziff (on which gzip is based); channel models such as binary symmetric channels. Background Needed 17 You ll need certain tools to understand the theory and algorithms we will cover this term: Probability and Statistics Linear Algebra Modular Arithmetic Basic Programming Possible Extra Topics (time permitting) Shannon s rate-distortion theory for lossy data compression. Practical algorithms for lossy data compression. Information theory with continuous random variables (as opposed to discrete symbols). Other applications of information theory in biology, physics, etc.