Error-free compression

Similar documents
INFINITE SERIES. ,... having infinite number of terms is called infinite sequence and its indicated sum, i.e., a 1

Content: Essential Calculus, Early Transcendentals, James Stewart, 2007 Chapter 1: Functions and Limits., in a set B.

Geometric Sequences. Geometric Sequence. Geometric sequences have a common ratio.

Definite Integral. The Left and Right Sums

PROGRESSIONS AND SERIES

Section 6.3: Geometric Sequences

1. (25 points) Use the limit definition of the definite integral and the sum formulas to compute. [1 x + x2

SUTCLIFFE S NOTES: CALCULUS 2 SWOKOWSKI S CHAPTER 11

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING SIGNALS AND SYSTEMS. Assoc. Prof. Dr. Burak Kelleci. Spring 2018

Approximations of Definite Integrals

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4

Applied Databases. Sebastian Maneth. Lecture 16 Suffix Array, Burrows-Wheeler Transform. University of Edinburgh - March 10th, 2016

Taylor Polynomials. The Tangent Line. (a, f (a)) and has the same slope as the curve y = f (x) at that point. It is the best

CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION

Vectors. Vectors in Plane ( 2

Discrete Mathematics I Tutorial 12

Similar idea to multiplication in N, C. Divide and conquer approach provides unexpected improvements. Naïve matrix multiplication

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 17 Lecturer: David Wagner April 3, Notes 17 for CS 170

MA123, Chapter 9: Computing some integrals (pp )

GRAPHING LINEAR EQUATIONS. Linear Equations. x l ( 3,1 ) _x-axis. Origin ( 0, 0 ) Slope = change in y change in x. Equation for l 1.

1.3 Continuous Functions and Riemann Sums

Merge Sort. Outline and Reading. Divide-and-Conquer. Divide-and-conquer paradigm ( 4.1.1) Merge-sort ( 4.1.1)

CS 331 Design and Analysis of Algorithms. -- Divide and Conquer. Dr. Daisy Tang

Numbers (Part I) -- Solutions

0 otherwise. sin( nx)sin( kx) 0 otherwise. cos( nx) sin( kx) dx 0 for all integers n, k.

=> PARALLEL INTERCONNECTION. Basic Properties LTI Systems. The Commutative Property. Convolution. The Commutative Property. The Distributive Property

Chapter 2 Infinite Series Page 1 of 9

Review of the Riemann Integral

INTEGRATION IN THEORY

Introduction to Computational Molecular Biology. Suffix Trees

MTH 146 Class 16 Notes

INTEGRATION TECHNIQUES (TRIG, LOG, EXP FUNCTIONS)

POWER SERIES R. E. SHOWALTER

LEVEL I. ,... if it is known that a 1

: : 8.2. Test About a Population Mean. STT 351 Hypotheses Testing Case I: A Normal Population with Known. - null hypothesis states 0

DETERMINANT. = 0. The expression a 1. is called a determinant of the second order, and is denoted by : y + c 1

A GENERALIZATION OF GAUSS THEOREM ON QUADRATIC FORMS

Students must always use correct mathematical notation, not calculator notation. the set of positive integers and zero, {0,1, 2, 3,...

Infinite Series Sequences: terms nth term Listing Terms of a Sequence 2 n recursively defined n+1 Pattern Recognition for Sequences Ex:

Advanced Algorithmic Problem Solving Le 6 Math and Search

Run-length & Entropy Coding. Redundancy Removal. Sampling. Quantization. Perform inverse operations at the receiver EEE

8.1 Arc Length. What is the length of a curve? How can we approximate it? We could do it following the pattern we ve used before

lecture 16: Introduction to Least Squares Approximation

The Elementary Arithmetic Operators of Continued Fraction

Riemann Integration. Chapter 1

Frequency-domain Characteristics of Discrete-time LTI Systems

Laws of Integral Indices

Lesson-2 PROGRESSIONS AND SERIES

Autar Kaw Benjamin Rigsby. Transforming Numerical Methods Education for STEM Undergraduates

SUTCLIFFE S NOTES: CALCULUS 2 SWOKOWSKI S CHAPTER 11

ICS141: Discrete Mathematics for Computer Science I

Chapter System of Equations

18.01 Calculus Jason Starr Fall 2005

8.3 Sequences & Series: Convergence & Divergence

Unit 1. Extending the Number System. 2 Jordan School District

Limit of a function:

We will begin by supplying the proof to (a).

( ) k ( ) 1 T n 1 x = xk. Geometric series obtained directly from the definition. = 1 1 x. See also Scalars 9.1 ADV-1: lim n.

z line a) Draw the single phase equivalent circuit. b) Calculate I BC.

 n. A Very Interesting Example + + = d. + x3. + 5x4. math 131 power series, part ii 7. One of the first power series we examined was. 2!

Statistics for Financial Engineering Session 1: Linear Algebra Review March 18 th, 2006


334 MATHS SERIES DSE MATHS PREVIEW VERSION B SAMPLE TEST & FULL SOLUTION

Why study large deviations? The problem of estimating buer overow frequency The performance of many systems is limited by events which have a small pr

Inference on One Population Mean Hypothesis Testing

Lecture 6: Source coding, Typicality, and Noisy channels and capacity

Quadrature Methods for Numerical Integration

Discrete-Time Signals & Systems

Information Theory and Coding

Review of CFGs and Parsing I Context-free Languages and Grammars. Winter 2014 Costas Busch - RPI 1

BC Calculus Review Sheet

Fundamentals. Relative data redundancy of the set. C.E., NCU, Taiwan Angela Chih-Wei Tang,

Closed Newton-Cotes Integration

Linear Programming. Preliminaries

Module 5 EMBEDDED WAVELET CODING. Version 2 ECE IIT, Kharagpur

is an ordered list of numbers. Each number in a sequence is a term of a sequence. n-1 term

10.5 Power Series. In this section, we are going to start talking about power series. A power series is a series of the form

Lecture 10: Universal coding and prediction

ELEG 3143 Probability & Stochastic Process Ch. 5 Elements of Statistics

In an algebraic expression of the form (1), like terms are terms with the same power of the variables (in this case

The total number of permutations of S is n!. We denote the set of all permutations of S by

BC Calculus Path to a Five Problems

B. Examples 1. Finite Sums finite sums are an example of Riemann Sums in which each subinterval has the same length and the same x i

Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers Roy D. Yates and David J.

Mathacle. PSet Stats, Concepts In Statistics Level Number Name: Date:

CHAPTER 6: USING MULTIPLE REGRESSION

Introduction to mathematical Statistics

Stalnaker s Argument

( a n ) converges or diverges.

Chapter 7 Infinite Series

EVALUATING DEFINITE INTEGRALS

ELG4156 Design of State Variable Feedback Systems

Applied Databases. Sebastian Maneth. Lecture 16 Suffix Array, Burrows-Wheeler Transform. University of Edinburgh - March 16th, 2017

Numerical Methods (CENG 2002) CHAPTER -III LINEAR ALGEBRAIC EQUATIONS. In this chapter, we will deal with the case of determining the values of x 1

Summer MA Lesson 4 Section P.3. such that =, denoted by =, is the principal square root

Chapter 11 Design of State Variable Feedback Systems

Handout #2. Introduction to Matrix: Matrix operations & Geometric meaning

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures

ENGINEERING PROBABILITY AND STATISTICS

Section 7.3, Systems of Linear Algebraic Equations; Linear Independence, Eigenvalues, Eigenvectors (the variable vector of the system) and

Transcription:

Error-free compressio Useful i pplictio where o loss of iformtio is tolerble. This mybe due to ccurcy requiremets, legl requiremets, or less th perfect qulity of origil imge. Compressio c be chieved by removig codig d/or iterpixel redudcy. Typicl compressio rtios chievble by lossless techiques is from to. Vrible Legth Codig This is used to reduce codig redudcy. Codig redudcy is preset i y imge with o-uiform histogrm (i.e. whe ll the grylevels re ot eqully likely). Give imge with, sy 56 grylevels,,, =,,,55. This is our set of source symbols. { } { }, 55 For ech grylevel k, we eed its probbility p ( k ) i the imge. This my be obtied from the imge histogrm: p( ) =, = # pixels with vlue, = totl # pixels. k k k To ech grylevel k, we eed to ssig codeword ( biry strig). Suppose l k is the legth of codeword (= # bits required to represet k ) for symbol k. Totl umber of bits required to represet the imge is N N N k lk k = lk = lk p k ) = k= k= k= k ( L vg

Nturlly, we eed ecodig scheme with L vg s smll s possible. From Sho s theorem, we kow tht L H ( z). As metioed erlier, the Huffm procedure specifies code with vg H ( z) Lvg < H ( z) + Huffm Code The lgorithm is best illustrted by mes of exmple. Give source which geertes oe of six possible symbols A = {,,, 6 } with correspodig probbilities.,.4,.6,.,.4,.. { } Arrge the symbols i descedig order of their probbility of occurrece. Successively reduce the umber of source symbols by replcig the two symbols hvig lest probbility, with compoud symbol. This wy, the umber of source symbols is reduced by oe t ech stge. The compoud symbol is plced t pproprite loctio i the ext stge, so tht the probbilities re gi i descedig order. Brek ties usig y rbitrry but cosistet rule. Code ech reduced source strtig with the smllest source d workig bckwrds.

Source Reductio: Symbol Prob. 4.4.4.4.4.6 6.....4.... 4....6..4 5 Code Assigmet: Symb. Prob. Code 4.4.4.4.4.6 6.....4.... 4....6..4 5 L vg = p l i i =.4() +.() +.() +.(4) +.6(5) +.4(5) i =. bits/symbol.4(log(.4)) +.(log(.)) +.(log(.)) H ( z) = p i log( p i ) = i +.(log(.)) +.6(log(.6)) +.4(log(.4)) =.4 bits/symbol

The resultig code is clled Huffm code. It hs some iterestig properties: The source symbols c be ecoded (d decoded) oe t time. It is clled block code becuse ech source symbol is mpped ito fixed sequece of code symbols. It is istteous becuse ech codeword i strig of code symbols c be decoded without referecig succeedig symbols. It is uiquely decodble becuse y strig of code symbols c be decoded i oly oe wy. Exmple: Give the ecoded strig,, it c be decoded s follows: 6 The Huffm code is optiml (i terms of verge codeword legth) for give set of symbols d probbilities, subject to the costrit tht the symbols be coded oe t time. Disdvtge: For source with J symbols, we eed J source reductios. This c be computtiolly itesive for lrge J (ex. J = 56 for imge with 56 grylevels).

Tructed Huffm codig: Suboptiml pproches This is geerted by ecodig oly the ψ most probble symbols, for some iteger ψ < J. A prefix code followed by suitble fixed-legth code is used to ecode the rest of the symbols. Other exmples of suboptiml codes re B-code, biry shift code, d Huffm shift code.

Bit-ple Codig A gryscle imge is decomposed ito series of biry imges d ech biry imge is compressed by some biry compressio method. This removes codig d iterpixel redudcy. Bit-ple decompositio: Give gryscle imge with m grylevels, ech gryvlue c be represeted by m-bits, sy,,,, ) ( m m. The gryvlue r represeted by ( m, m,,, ) bse polyomil is give by the r = m m m + m + + + This bit represettio c be used to decompose the gryscle imge ito m biry imges (bit-ples). Altertively, oe c use the m-bit Gry code ( gm, gm,, g, g) to represet give gryvlue. The Gry code ( gm, gm,, g, g) c be obtied from,,,, ) by the followig reltioship: ( m m g m = m, d for i m, gi = i i+ where deotes exclusive OR of bits. The Gry code of successive grylevels differ t oly oe positio. 7 8 (biry represettio) (biry represettio) (Gry code) (Gry code)

The resultig biry imges re the compressed (error-free). We will study populr ecodig scheme clled ru-legth ecodig (RLC). Rulegth ecodig Ech row of bit ple (or biry imge) is represeted by sequece of legths (itegers) tht deote the successive rus of d pixels. Two pproches: Strt positio d legths of rus of s for ech row is used: (,)(7,)(,4)(7,)(,) (5,)(9,4) (,)(7,6) Oly legths of rus, strtig with the legth of ru is used:,,,,4,,,,,4,,,4,,6

, This techique is very effective i ecodig biry imges with lrge cotiguous blck d white regios, which would give rise to smll umber of lrge rus of s d s. The ru-legths c i tur be ecoded usig vrible legth code (ex. Huffm code), for further compressio. Let k be the frctio of rus of s with legth k. Nturlly, (,,, M ), would represet vector of probbilities (the probbility of ru of s beig of legth k). M i i) M (,,, M ) d L = i = i i be the verge legth of rus of s. Let H = i = log( be the etropy ssocited with Let bk be the frctio of rus of s with legth k. Nturlly, ( b, b,, b M ) would represet vector of probbilities (the probbility of ru of s beig of legth k). Let H be the etropy ssocited with ( b, b,, b M ) d M L = i = ib i be the verge legth of rus of s. The pproximte rulegth etropy of the imge is RL H RL = ( H + H) bits/ru ( L + L ) symbols/ru H provides estimte of the verge umber of bits per pixel required to code the ru legths i biry imge, usig vriblelegth code. The cocept of ru-legth c be exteded to vriety of -D codig procedures.

Rulegth Exmple Biry text imge.9.8.7 Plot of typicl row: (row # 5).6.5.4... 5 5 5 Rulegth ecodig of row # 5:, 7, 4,, 5,, 5,, 4,, 5, 4,,, 4, 5, 4, 4, 6,, 6,, 4, 4, 5,, 5,, 6,, 4,, 6,, 4,,, 4, 5, 4, 6,, 7 (4 rus)

.5.45.4.5..5 Distributio of legths of rus of i imge L H =. =. pixels/ru bits/ru..5..5 5 5 5..8.6.4...8 Distributio of legths of rus of i imge L H =. = 4.4 pixels/ru bits/ru.6.4. 5 5 5 H H RL = = L + H + L.8 bits/pixel

Lossless Predictive Codig Does ot require decompositio of gryscle imge ito bitples. Elimite iterpixel redudcy by extrctig d codig oly the ew iformtio i ech pixel. New iformtio i pixel is the differece betwee its ctul d predicted (bsed o previous pixel vlues ) vlues. Iput Imge f + fˆ e Symbol Ecoder Compressed Imge Predictor Nerest iteger Predictio error Predictio bsed o previous pixel vlues e fˆ = = f fˆ roud or m i= f α i = e f i + fˆ Compressed Imge Symbol Decoder e + + f Decompressed Imge fˆ Predictor

Exmple: -D first order lier predictor fˆ ( m, ) = roud [ αf ( m, ) ] (previous pixel predictor) I ech row, pixel vlue is predicted bsed o the vlue of the pixel to its left. The resultig predictio error e( m, ) = f ( m, ) fˆ( m, ) is ecoded. The first elemet of ech row (i.e., first colum of imge) is lso ecoded (usig, for exmple, differet Huffm code). Decoder recostructs e( m, ) bsed o the codewords d obtis the origil pixel vlues usig f ( m, ) = e( m, ) + fˆ( m, )

. Distributio of pixel vlues i origil imge.5..5..5 Etropy = 6.9 5 5 5. Distributio of predictio error vlues.8.6.4...8 Etropy = 4.4.6.4. - - - Possible dt reductio: 8 bits/pixel w/o compressio, 6.9 bits/pixel usig oly etropy codig, 4.4 bits/pixel usig predictive codig.