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

Similar documents
Topic 5 Image Compression

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

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

1.Define image compression. Explain about the redundancies in a digital image.

Image Coding and Compression

Image coding and compression

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

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

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

Image Coding and Data Compression

IMAGE COMPRESSION. Chapter - 5 : (Basic)

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

Digital Image Processing

Lossless Compression Algorithms

VC 12/13 T16 Video Compression

IMAGE COMPRESSION TECHNIQUES

CoE4TN4 Image Processing. Chapter 8 Image Compression

Lecture 6: Compression II. This Week s Schedule

Source Coding Basics and Speech Coding. Yao Wang Polytechnic University, Brooklyn, NY11201

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

Ch. 2: Compression Basics Multimedia Systems

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

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

EE67I Multimedia Communication Systems Lecture 4

Affable Compression through Lossless Column-Oriented Huffman Coding Technique

Multimedia Networking ECE 599

Image Compression - An Overview Jagroop Singh 1

IMAGE COMPRESSION TECHNIQUES

CS 335 Graphics and Multimedia. Image Compression

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

compression and coding ii

Lecture 5: Compression I. This Week s Schedule

VIDEO SIGNALS. Lossless coding

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

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson

Chapter 5 VARIABLE-LENGTH CODING Information Theory Results (II)

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

David Rappaport School of Computing Queen s University CANADA. Copyright, 1996 Dale Carnegie & Associates, Inc.

Multimedia Systems. Part 20. Mahdi Vasighi

Image Compression Compression Fundamentals

Image Compression. CS 6640 School of Computing University of Utah

Digital Image Processing (EI424)

Sparse Transform Matrix at Low Complexity for Color Image Compression

PSD2B Digital Image Processing. Unit I -V

Entropy Coding. - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic Code

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

Image coding and compression

yintroduction to compression ytext compression yimage compression ysource encoders and destination decoders

A Novel Image Compression Technique using Simple Arithmetic Addition

Intro. To Multimedia Engineering Lossless Compression

Image Compression. Chapter 8 江铭炎教授 / 博导. Digital Image Processing Using MATLAB 网址 : 信息学院 => 精品课程 => 数字图像处理. Chapter 8 Image Compression

3. (a) Prove any four properties of 2D Fourier Transform. (b) Determine the kernel coefficients of 2D Hadamard transforms for N=8.

Ch. 2: Compression Basics Multimedia Systems

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

Engineering Mathematics II Lecture 16 Compression

Digital Image Processing

DIGITAL IMAGE COMPRESSION TECHNIQUES

Lecture 8 JPEG Compression (Part 3)

Data Compression. An overview of Compression. Multimedia Systems and Applications. Binary Image Compression. Binary Image Compression

Chapter 1. Digital Data Representation and Communication. Part 2

Chapter 7 Lossless Compression Algorithms

Statistical Image Compression using Fast Fourier Coefficients

Introduction to Digital Image Processing

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

Image Processing Computer Graphics I Lecture 15

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

Fundamentals of Video Compression. Video Compression

CMPT 365 Multimedia Systems. Media Compression - Image

Figure-2.1. Information system with encoder/decoders.

2-D SIGNAL PROCESSING FOR IMAGE COMPRESSION S. Venkatesan, Vibhuti Narain Rai

6. Finding Efficient Compressions; Huffman and Hu-Tucker

Image Compression for Mobile Devices using Prediction and Direct Coding Approach

ITCT Lecture 8.2: Dictionary Codes and Lempel-Ziv Coding

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

CHAPTER 1 Encoding Information

Lempel-Ziv-Welch (LZW) Compression Algorithm

DCT Based, Lossy Still Image Compression

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

Comparison of Image Compression Techniques: Huffman and DCT

Lecture 12: Compression

IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

JNTUWORLD. 4. Prove that the average value of laplacian of the equation 2 h = ((r2 σ 2 )/σ 4 ))exp( r 2 /2σ 2 ) is zero. [16]

Error Resilient LZ 77 Data Compression

Intensity Transformation and Spatial Filtering

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

Lecture 6 Review of Lossless Coding (II)

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

Image Compression Algorithm and JPEG Standard

Compressing Data. Konstantin Tretyakov

Text Compression. Jayadev Misra The University of Texas at Austin July 1, A Very Incomplete Introduction To Information Theory 2

A Comprehensive Review of Data Compression Techniques

EE-575 INFORMATION THEORY - SEM 092

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

Shape Coding For Arbitrarily Shaped Object

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

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

AN OPTIMIZED LOSSLESS IMAGE COMPRESSION TECHNIQUE IN IMAGE PROCESSING

IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations

Distributed source coding

Lecture 8 JPEG Compression (Part 3)

Transcription:

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

Reading.. Chapter 8 Sections 8.1, 8.2 8.3 (selected topics) 8.4 (Huffman, run-length, loss-less predictive) 8.5 (lossy predictive, transform coding basics) 8.6 Image Compression Standards (time permitting) 02/25/2003 Image Compression-I 2

Image compression Objective: To reduce the amount of data required to represent an image. Important in data storage and transmission Progressive transmission of images (internet, www) Video coding (HDTV, Teleconferencing) Digital libraries and image databases Medical imaging Satellite images 02/25/2003 Image Compression-I 3

IMAGE COMPRESSION Data redundancy Self-information and Entropy Error-free and lossy compression Huffman coding Predictive coding Transform coding 02/25/2003 Image Compression-I 4

Lossy vs Lossless Compression Compression techniques Information preserving (loss-less) Images can be compressed and restored without any loss of information. Application: Medical images, GIS Lossy Perfect recovery is not possible but provides a large data compression. Example : TV signals, teleconferencing 02/25/2003 Image Compression-I 5

Data Redundancy CODING: Fewer bits to represent frequent symbols. INTERPIXEL / INTERFRAME: Neighboring pixels have similar values. PSYCHOVISUAL: Human visual system can not simultaneously distinguish all colors. 02/25/2003 Image Compression-I 6

Coding Redundancy Fewer number of bits to represent frequently occurring symbols. Let p r (r k ) = n k / n, k = 0,1,2,.., L-1; L # of gray levels. Let r be represented by l (r k k ) bits. Therefore average # of bits required to represent each pixel is L 1 Lavg = l( rk ) pr( rk) ( A) k= 0 Usually l(r k ) = m bits (constant). L = mp ( r ) = m avg r k k 02/25/2003 Image Compression-I 7

Coding Redundancy (contd.) Consider equation (A): It makes sense to assign fewer bits to those r k for which p r (r k ) are large in order to reduce the sum. this achieves data compression and results in a variable length code. More probable gray levels will have fewer # of bits. L 1 Lavg = l( rk ) pr( rk) ( A) k= 0 02/25/2003 Image Compression-I 8

Coding: Example Example (From text) r p ( r) Code l( r) r k r k k 0 r 1 r r 2 3 r r 4 5 r 6 r 7 = 0 0.19 11 2 = = = = = = 1 7 2 7 3 7 4 7 5 7 6 7 0.25 01 2 0.21 10 2 0.16 001 3 0.08 0001 4 0.06 00001 5 0.03 000001 6 = 1 0.02 000000 6 L avg = ρ( rk) l( rk) = 27. Bits 10% less code 02/25/2003 Image Compression-I 9

Inter-pixel/Inter-frame spatial. N(x,y) f(x,y) Depends on f (x, y ), (x, y ) ε N xy N xy : Neighbourhood of pixels around (x,y) Interframe f(x,y,t 3 ) f(x,y,t 2 ) f(x,y,t 1 ) f(x,y,t 0 ) f(x, y, t i ) i=1, 2, 3,... are related to each other. This can be exploited for video compression. 02/25/2003 Image Compression-I 10

Pixel Correlations 02/25/2003 Image Compression-I 11

Runlength Coding 02/25/2003 Image Compression-I 12

Psychovisual Human visual system has limitations ; good example is quantization. conveys infromation but requires much less memory/space. (Example: Figure 8.4 in text; matlab) 02/25/2003 Image Compression-I 13

Quantization 02/25/2003 Image Compression-I 14

IGS Code(Table 8.2) 02/25/2003 Image Compression-I 15

General Model General compression model f(x,y) Source encoder Channel encoder Channel Channel decoder Source decoder g(x,y) Source encoder f(x,y) Mapper Quantizer Symbol encoder To channel 02/25/2003 Image Compression-I 16

Source Encoder Mapper: Designed to reduce interpixel redundancy. example: Run length encoding results in compression. Transfrom to another domain where the coefficients are less correlated then the original. Ex: Fourier transfrom. Quantizer: reduces psychovisual redundancies in the image - should be left out if error-free encoding is desired. Symbol encoder: creates a fixed/variable length code - reduces coding redundancies. 02/25/2003 Image Compression-I 17

Source Decoder from channel symbol decoder Inverse mapper ^ f(x,y) Note: Quantization is NOT reversible Question(s): Is there a minimum amount of data that is sufficient to completely describe an image without any loss of information? How do you measure information? 02/25/2003 Image Compression-I 18

Self-Information Suppose an event E occurs with probability P(E) ; then it is said to contain I (E) = -log P(E) units of information. P(e) = 1 [always happens] => I(e) = 0 [conveys no information] If the base of the logarithm is 2, then the unit of information is called a bit. If P(E) = 1/2, I(E) = -log 2 (1/2) = 1 bit. Example: Flipping of a coin ; outcome of this experiment requires one bit to convey the information. 02/25/2003 Image Compression-I 19

Self-Information (contd.) Assume an information source which generates the symbols {a 0, a 1, a 2,..., a L-1 } with L 1 prob { ai} = p( ai) ; p( ai) = 1 i= 0 Ia ( i) = log 2 pa ( i) bits. 02/25/2003 Image Compression-I 20

ENTROPY Average information per source output is L 1 H = p( a ) log p( a ) i= 0 i 2 i bits / symbol H is called the uncertainity or the entropy of the source. If all the source symbols are equally probable then the source has a maximum entropy. H gives the lower bound on the number of bits required to code a signal. 02/25/2003 Image Compression-I 21

Noiseless coding theorem (Shannon) It is possible to code, without any loss of information, a source signal with entropy H bits/symbol, using H + ε bits/symbol where ε is an arbitrary small quantity. ε can be made arbitrarily small by considering increasingly larger blocks of symbols to be coded. 02/25/2003 Image Compression-I 22

Error-free coding Error-free coding Coding redundancy Ex: Huffman coding Interpixel redundancy Ex: Runlength coding Yeilds smallest possible # of code symbols per source symbol when symbols are coded one at a time. 02/25/2003 Image Compression-I 23

Huffman code: example Huffman code: Consider a 6 symbol source a 1 a 2 a 3 a 4 a 5 a 6 p(a i ) 0.1 0.4 0.06 0.1 0.04 0.3 02/25/2003 Image Compression-I 24

Huffman coding: example (contd.) a 2 0.4 (1) 0.4 (1) 0.4 (1) 0.4 (1) 0.6(0) a 6 0.3 (00) 0.3 (00) 0.3 (00) 0.3 (00) 0.4(1) a 1 0.1 (011) 0.1 (011) 0.2 (010) 0.3 (01) a 4 0.1 (0100) 0.1 (0100) 0.1 (011) a 3 0.06 (01010) 0.1 (0101) a 5 0.04 (01011) 02/25/2003 Image Compression-I 25

Example (contd.) Average length: (0.4) (1) + 0.3 (2) + 0.1 X 3 + 0.1 X 4 + (0.06 + 0.04) 5 = 2.2 bits/symbol -Σ p i log p i = 2.14 bits/symbol (Entropy) 02/25/2003 Image Compression-I 26

Huffman code: Steps Arrange symbol probabilities p i in decreasing order While there is more than one node Merge the two nodes with the smallest probabilities to form a new node with probabilities equal to their sum. Arbitrarily assign 1 and 0 to each pair of branches merging in to a node. Read sequentially from the root node to the leaf node where the symbol is located. 02/25/2003 Image Compression-I 27

Huffman code (final slide) Lossless code Block code Uniquely decodable Instantaneous (no future referencing is needed) 02/25/2003 Image Compression-I 28

Fig. 8.13: Arithmetic Coding Coding rate: 3/5 decimal digits/symbol Entropy: 0.58 decimal digits/symbol. 02/25/2003 Image Compression-I 29

Lempel-Ziv-Welch (LZW) coding Uses a dictionary Dictionary is adaptive to the data Decoder constructs the matching dictionary based on the codewords received. used in GIF, TIFF and PDF file formats. 02/25/2003 Image Compression-I 30

LZW-an example Consider a 4x4, 8-bits per pixel image 39 39 126 126 39 39 126 126 39 39 126 126 39 39 126 126 The dictionary values 0-255 correspond to the pixel values 0-255. Assume a 512 word dictionary. 02/25/2003 Image Compression-I 31

LZW-dictionary construction 02/25/2003 Image Compression-I 32

Run-length Coding Run-length encoding (Binary images) 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 4 6 3 3 2 Lengths of 0 s and 1 s is encoded. Each of the bit planes in a gray scale image can be run length - encoded. One can combine run-length encoding with variable length coding of the run-lengths to get better compression. 02/25/2003 Image Compression-I 33