two dimensional incremental parsing for image compression · the lz78 re-quires ⌈log2 m lz78+c...

5
TWO DIMENSIONAL INCREMENTAL PARSING FOR IMAGE COMPRESSION Soo Hyun Bae, Biing-Hwang Juang Center for Signal and Image Processing Georgia Institute of Technology, Atlanta, GA 30332 {soohyun,juang}@ece.gatech.edu ABSTRACT The one-dimensional incremental parsing rule, which is used in the Lempel-Ziv universal compression, is extended to that of two di- mension in this paper. And its three essential component schemes, a hierarchical structure for two-dimensional source coding, dictio- nary augmentation, and maximum decimation matching, are ad- dressed. To design an approximate pattern matching algorithm, two types of distortion functions, local average distortion and local min- imax distortion, with noise visibility thresholds are given. We have compared our algorithm to existing lossy data compression algo- rithms based on pattern matching schemes, and demonstrated its superiority both in minimizing signal distortion and in maximizing perceptual quality. 1. INTRODUCTION Universal lossless compression has been intensively investigated and widely used in computer engineering applications since the Lempel Ziv algorithm was developed in [1, 2, 3, 4]. The most remarkable benefit of their code is that without any prior knowl- edge of the statistical distribution of a given source, the algorithm achieves an asymptotic coding rate approaching the entropy of the source. However, an important and challenging problem still exists in designing an approximate pattern matching technique which can be consistently applied to two or higher dimensional sequences. Some of the early efforts to consider generalization of such tech- niques were provided by Lempel and Ziv [5] and Sheinwald et al. [6], in which the use of one dimensional coding scheme is lin- earized to fit for a given two dimensional source. In another ef- fort, attempts to implement a lossy Lempel-Ziv algorithms were made by Morita [7] and Steinberg [8], however, without address- ing the issue of asymptotic optimality. There have been a series of research about the theoretical framework of lossy Lempel-Ziv algo- rithms in [9, 10, 11]. More recently, Alzina et al. [12] suggested a two-dimensional pattern matching algorithm (2DPMC) that has notable potential for image/video compression applications with an affordable complexity. The central theme of the above efforts lies on approximate pattern matching, that is essential in not only data compression but also other signal processing applications. How- ever, a two-dimensional incremental parsing algorithm for dictio- nary based two-dimensional pattern matching is still a challenging problem. In this work, we address three important problems of design- ing of two-dimensional incremental parsing (2DIP): the hierarchical structure of two-dimensional source coding, dictionary augmenta- tion, and maximum decimation matching. Then, it is extended to an image compression algorithm for evaluating its performance. For objective comparisons, we design a one-dimensional lossy Lempel- Ziv (1DLZ) compression algorithm, which uses the same distortion functions as such designed for the 2DIP. Our algorithm is also com- pared to the 2DPMC. Which originally consists of three compo- nents, a pattern matching, an enhanced runlength coding, and the arithmetic coding. In this paper, the 2DPMC only with the pattern matching scheme is compared for fair comparisons. In the remainder of this paper, we first revisit two representa- tive procedures of the Lempel-Ziv incremental parsing rule (LZIP), Lempel-Ziv 78 (LZ78) [3] and Lempel-Ziv-Welch (LZW) [13] briefly, then come into the details of the 2DIP in Section 2. We provide a lossy extension of the framework in Section 3. A perfor- mance analysis and comparison of approximate pattern matching algorithms is presented in Section 4. The main conclusions of the study are summarized in Section 5. 2. TWO-DIMENSIONAL INCREMENTAL PARSING Most of the lossless compressions so far assume that a source exists in one-dimensional (1D) sequence space. So, when the given source is from two-dimensional (2D) random field, the source is first lin- earized into a 1D representation. One advantageous characteristic of a universal coding scheme like the Lempel-Ziv is the incremen- tal parsing, which allows the encoder to asymptotically capture the source statistics. If any linearization prior to encoding is performed to transform a 2D source sequence into a 1D one, the above men- tioned asymptotic optimality only applies to the 1D observations, not to the original 2D sources. In this section, we study a theoretical framework for designing a 2D universal incremental parsing code. First, we review two repre- sentative universal lossless codes via Lempel-Ziv incremental pars- ing rule, LZ78 and LZW. 2.1 Lempel-Ziv Incremental Parsing In contrast to to the exhaustive parsing rule employed in the Lempel-Ziv string matching code, the so called LZ77 [2], the LZIP parses a given source sequence into a number of distinct phrases and has a dictionary containing the previously shown patterns. The LZIP has three important parsing procedures, pattern matching, codeword assignment, and dictionary augmentation. Let X Z n be a discrete source sequence with values from a finite alphabet A with the cardinality |A| < . Assuming that a dictionary consists of the |A| source letters, the LZIP searches the dictionary for the longest match at every parsing point. The dif- ference among them is how the dictionary is updated at each cod- ing epoch. The LZW initially has |A| source letters as the dictio- nary entries. At each coding epoch, its dictionary is augmented by appending the last parsed phrase to the prefix of the next parsed phrase. On the other hand, the LZ78 starts off the coding procedure with empty dictionary entry, augments the dictionary with the last parsed phrase appended to the next source symbol. It also transmits the codeword corresponding to the phrase and the symbol. There- fore, if the LZW has the dictionary containing M LZW entries, it uses log 2 M LZW bits to encode the next parsed phrase. The LZ78 re- quires log 2 M LZ78 + C LZ78 bits where C LZ78 is the bit length for the next source symbol, mostly equivalent to |A|. For the number of the dictionary entry, both procedures have the following equality, M LZW = M LZ78 + |A| (1) It is empirically known that both procedures achieve similar cod- ing performances for stationary memoryless source. 2.2 Hierarchical Structure of Two-dimensional Source Coding For a m × n image, consider a stationary and ergodic 2D random field X = {X i, j :0 i < m, 0 j < n, (i, j) Z 2 } taking values from A. In many image processing applications, it is set to 256. ©2007 EURASIP 653 15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3-7, 2007, copyright by EURASIP

Upload: others

Post on 04-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Two Dimensional Incremental Parsing for Image Compression · The LZ78 re-quires ⌈log2 M LZ78+C ⌉bits where CLZ78 is the bit length for the next source symbol, mostly equivalent

TWO DIMENSIONAL INCREMENTAL PARSING FOR IMAGE COMPRESSION

Soo Hyun Bae, Biing-Hwang Juang

Center for Signal and Image ProcessingGeorgia Institute of Technology, Atlanta, GA 30332

{soohyun,juang}@ece.gatech.edu

ABSTRACT

The one-dimensional incremental parsing rule, which is used in theLempel-Ziv universal compression, is extended to that of two di-mension in this paper. And its three essential component schemes,a hierarchical structure for two-dimensional source coding, dictio-nary augmentation, and maximum decimation matching, are ad-dressed. To design an approximate pattern matching algorithm, twotypes of distortion functions, local average distortion and local min-imax distortion, with noise visibility thresholds are given. We havecompared our algorithm to existing lossy data compression algo-rithms based on pattern matching schemes, and demonstrateditssuperiority both in minimizing signal distortion and in maximizingperceptual quality.

1. INTRODUCTION

Universal lossless compression has been intensively investigatedand widely used in computer engineering applications sincetheLempel Ziv algorithm was developed in [1, 2, 3, 4]. The mostremarkable benefit of their code is that without any prior knowl-edge of the statistical distribution of a given source, the algorithmachieves an asymptotic coding rate approaching the entropyof thesource. However, an important and challenging problem still existsin designing an approximate pattern matching technique which canbe consistently applied to two or higher dimensional sequences.

Some of the early efforts to consider generalization of suchtech-niques were provided by Lempel and Ziv [5] and Sheinwaldet al.[6], in which the use of one dimensional coding scheme is lin-earized to fit for a given two dimensional source. In another ef-fort, attempts to implement a lossy Lempel-Ziv algorithms weremade by Morita [7] and Steinberg [8], however, without address-ing the issue of asymptotic optimality. There have been a series ofresearch about the theoretical framework of lossy Lempel-Ziv algo-rithms in [9, 10, 11]. More recently, Alzinaet al. [12] suggesteda two-dimensional pattern matching algorithm (2DPMC) thathasnotable potential for image/video compression applications with anaffordable complexity. The central theme of the above efforts lieson approximate pattern matching, that is essential in not only datacompression but also other signal processing applications. How-ever, a two-dimensional incremental parsing algorithm fordictio-nary based two-dimensional pattern matching is still a challengingproblem.

In this work, we address three important problems of design-ing of two-dimensional incremental parsing (2DIP): the hierarchicalstructure of two-dimensional source coding, dictionary augmenta-tion, and maximum decimation matching. Then, it is extendedto animage compression algorithm for evaluating its performance. Forobjective comparisons, we design a one-dimensional lossy Lempel-Ziv (1DLZ) compression algorithm, which uses the same distortionfunctions as such designed for the 2DIP. Our algorithm is also com-pared to the 2DPMC. Which originally consists of three compo-nents, a pattern matching, an enhanced runlength coding, and thearithmetic coding. In this paper, the 2DPMC only with the patternmatching scheme is compared for fair comparisons.

In the remainder of this paper, we first revisit two representa-tive procedures of the Lempel-Ziv incremental parsing rule(LZIP),Lempel-Ziv 78 (LZ78) [3] and Lempel-Ziv-Welch (LZW) [13]

briefly, then come into the details of the 2DIP in Section 2. Weprovide a lossy extension of the framework in Section 3. A perfor-mance analysis and comparison of approximate pattern matchingalgorithms is presented in Section 4. The main conclusions of thestudy are summarized in Section 5.

2. TWO-DIMENSIONAL INCREMENTAL PARSING

Most of the lossless compressions so far assume that a sourceexistsin one-dimensional (1D) sequence space. So, when the given sourceis from two-dimensional (2D) random field, the source is firstlin-earized into a 1D representation. One advantageous characteristicof a universal coding scheme like the Lempel-Ziv is the incremen-tal parsing, which allows the encoder to asymptotically capture thesource statistics. If any linearization prior to encoding is performedto transform a 2D source sequence into a 1D one, the above men-tioned asymptotic optimality only applies to the 1D observations,not to the original 2D sources.

In this section, we study a theoretical framework for designing a2D universal incremental parsing code. First, we review tworepre-sentative universal lossless codes via Lempel-Ziv incremental pars-ing rule, LZ78 and LZW.

2.1 Lempel-Ziv Incremental Parsing

In contrast to to the exhaustive parsing rule employed in theLempel-Ziv string matching code, the so called LZ77 [2], theLZIPparses a given source sequence into a number of distinct phrasesand has a dictionary containing the previously shown patterns. TheLZIP has three important parsing procedures, pattern matching,codeword assignment, and dictionary augmentation.

Let X ∈ Zn be a discrete source sequence with values from a

finite alphabetA with the cardinality|A| <∞. Assuming that adictionary consists of the|A| source letters, the LZIP searches thedictionary for the longest match at every parsing point. Thedif-ference among them is how the dictionary is updated at each cod-ing epoch. The LZW initially has|A| source letters as the dictio-nary entries. At each coding epoch, its dictionary is augmented byappending the last parsed phrase to the prefix of the next parsedphrase. On the other hand, the LZ78 starts off the coding procedurewith empty dictionary entry, augments the dictionary with the lastparsed phrase appended to the next source symbol. It also transmitsthe codeword corresponding to the phrase and the symbol. There-fore, if the LZW has the dictionary containingMLZW entries, it uses⌈log2 MLZW⌉ bits to encode the next parsed phrase. The LZ78 re-quires⌈log2 MLZ78 +CLZ78⌉ bits whereCLZ78 is the bit length forthe next source symbol, mostly equivalent to|A|. For the numberof the dictionary entry, both procedures have the followingequality,

MLZW = MLZ78+ |A| (1)

It is empirically known that both procedures achieve similar cod-ing performances for stationary memoryless source.

2.2 Hierarchical Structure of Two-dimensional Source Coding

For am× n image, consider a stationary and ergodic 2D randomfield X = {Xi, j : 0≤ i < m, 0≤ j < n, (i, j) ∈ Z

2} taking valuesfrom A. In many image processing applications, it is set to 256.

©2007 EURASIP 653

15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3-7, 2007, copyright by EURASIP

Page 2: Two Dimensional Incremental Parsing for Image Compression · The LZ78 re-quires ⌈log2 M LZ78+C ⌉bits where CLZ78 is the bit length for the next source symbol, mostly equivalent

Figure 1: Example of the incremental parsing code for binarysource. Shaded area corresponds to those where matches are al-ready found and coded. The match at the current anchor point(2,0) is found from the current dictionary, then two new entries,[1 0 1;0 0 0] and[1 0;0 0;1 1], are added to the dictionary as childnodes.

X(m,n)∆ denotes am× n sequencepatch whose top-left is at∆ =

(∆1,∆2), called theanchor pointof a patch.Assuming that a pattern matching function and a dictionary are

given, as of interest later, we can obtain an unique dictionary indexsatisfying the matching criterion. Figure 1 depicts an example of2D incremental parsing for a binary source. The shaded area on theupper region corresponds to the sequences already encoded,and letthe current anchor point be(2,0). Given the coincident dictionary,the encoder finds the exact match entryX(2,2) augmented from thepatch anchoring at(0,7). The next procedure of the encoder is toestablish the source patches which will be appended onto thedictio-nary, and to transmit additional information describing the patches.

Remember that the counterpart of the LZ78 generates one dic-tionary entry of a sequence vector formed by appending the lastparsed phrase to the next source symbol, and augments the dictio-nary with the entry. Also, the LZ78 transmits oneaugmentorse-quence at a rate proportional to the alphabet size. For the 2Dsourcesequences, the encoder generates two augmentative entriesalongthe two axes. In this example, it obtains theX(2,3) = [1 0 1;0 0 0]by appending the column sequence vector on the right of the match,andX(3,2) = [1 0;0 0;1 1] by appending the row sequence vectoron the bottom of the match, both at the same anchor point. Next,it is required to transmit additional amount of informationrepre-senting the two augmentors (in this example,[1 0]T and[1 1]). Weidentify a general approach to resolving this problem: one shouldemploy a 1D incremental parsing code to generate codewords forthe augmentors. Here, we also conjecture that if there exists a M-dimensional incremental parsing code for M-dimensional discretesource, it should be constructed on the basis of a M-1 dimensionalcoding scheme for the augmentors.

2.3 Dictionary Augmentation

Although there is no probability model associated with anyvariable-to-fixed length code (e.g. the Lempel-Ziv incrementalparsing code, Tunstall code), the number of encoded bits persourcesymbol asymptotically achieves the source entropy for a stationarysource. It is due to the parsing of the source symbols, which is thefundamental behavior of an universal variable-to-fixed length code.Such a code for 1D sequences parses a given source sequence intovariable length phrases and then assign a codeword which hasafixed length. Basically the parsing followed by dictionary augmen-tation incorporates the estimation of the probability of the given se-quence by taking advantage of the occurrence frequency of sourcepatches.

For deeper understanding of the source probability estimation,we discuss about an algorithm for constructing a suffix tree.Differ-ent from the 1D suffix tree [14], a direct definition of suffix certainlyresults in thesuffix ambiguityfor a given patch. For example, it isobscure that which of[0 0] or [0;0] is the prefix of the patch[0 0;1 1].

Figure 2: Am×n patch is constituted from a one-letter patch byappending suffixes. The shaded sequences correspond to the suffixof the patch.

Thus, we here settle the principles of a 2D suffix as following:1. Two orthogonal axes,~x1 and ~x2, constitute a two-dimensional

space. They are arbitrarily chosen as~x1 and~x2 corresponding tovertical and horizontal axes, respectively.

2. A m×n patch is constructed from a one-letter patch. it growsalong the~x1 by appending corresponding suffixes until it be-comesm×1 patch.

3. Them×1 patch grows along the~x2 by appending eachm× 1suffix on the right of the patch until becoming them×n patch.

A schematic of a patch constructed by suffixes is given in Figure 2.

Let π be a node correspondingm× n patch in a binary suffixtree, and the root nodeπ0 has null patch.nd(π) denotes the numberof descendant nodes atπ, and the maximum number of descendantnodes atπ is

nm(π) =

{

2+2m for n = 12m for n 6= 1 (2)

At ith epoch,Nm(i) is the total number of augmented nodes, andNf (i) is the total number of fully augmented nodes at which,nd(π)is equal tonm(π). The algorithm for constructing a 2D suffix tree isshown in Algorithm 1.

Algorithm 1 Construction of a two-dimensional suffix tree

1: Nm(0)← 0, Nf (0)← 0, i← 02: while given a new nodeπ ′ do3: i← i +14: Find the deepest nodeπ j

5: Appendπ ′ to the descendant ofπ j

6: Setnm(π ′) by (2),nd(π ′)← 07: nd(π j )← nd(π j )+1,Nm(i)← Nm(i)+18: if nd(π j)=nm(π j) then9: Nf (i)← Nf (i)+1

10: end if11: end while

The suffix tree for the previous example is provided in Figure3.Let Π(X) denote the number of distinct patches for a given sourcefield X, write it asΠ for simplicity. The source sequence is parsedinto distinct patchesu1,u2, · · · ,uΠ. At each coding epoch, the en-coder augments its dictionary with at most 2 entries, which dependson the location of the anchor point and coded area. The probabilityof the parsed patchui given the dictionaryπ1, · · · ,πNm is

P(ui | π1, · · · ,πNm) =1

Np(i)(3)

whereNp(i) = Nm(i)−Nf (i), the number of candidate patches. Fi-

©2007 EURASIP 654

15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3-7, 2007, copyright by EURASIP

Page 3: Two Dimensional Incremental Parsing for Image Compression · The LZ78 re-quires ⌈log2 M LZ78+C ⌉bits where CLZ78 is the bit length for the next source symbol, mostly equivalent

π0

(2,2)

[0]

(22,2)

[

01

]

(23,2)

010

(24,0)

[

0 01 1

]

(22,0)

[

0 1]

(21,0)

[1]

(22,2)

[

10

]

(23,0)

[

1 0]

(21,0)

Figure 3: The suffix tree constructed by the source field giveninFigure 1. A pair of numbers next to each node is(nm(π),nd(π)).Nm(i) is 8, andNf (i) is 1.

nally, the probability of the given source fieldX is computed as

P(X) = p(πΠ |π1 · · ·πΠ−1) p(π1 · · ·πΠ−1)

= p(πΠ |π1 · · ·πΠ−1) p(πΠ−1 |π1 · · ·πΠ−2)

· · · p(π2|π1) p(π1|π0) p(π0)

∏k=1

1Np(k)

(4)

Consequently, the self information of theX is

H(X) =− log2

Π

∏k=1

1Np(k)

(bits) (5)

2.4 Maximum Decimation Matching

We start from the observation that the 1D incremental parsing codefinds thelongest matchfrom the dictionary at the current parsingpoint. The corresponding counterpart in the two-dimensional in-cremental parsing code is called themaximum decimation matching(MDM). Which finds the match index of the dictionary in whichthe decimation for the given source sequence is maximized. We canidentify two categories of MDM, absolute MDM and approximateMDM.

The absolute MDM finds the match at an arbitrary anchor pointfrom the given source sequences. For example, assume that thesource sequences are the same as the one in Figure 1 and the dic-tionary has the entry[0 0 1;1 0 1;0 0 0], we can produce more dec-imation at the anchor point(1,0) with the decimation amount of6. The approximate MDM finds a maximum decimation match ata fixed anchor point, which is specified by a pre-determined heuris-tic. Thus, in the same example, the anchor point is at(2,0), wherethe maximum decimation match is searched. Note that the absoluteMDM requires the same amount of searching cost as the approx-imate MDM at almost every symbol location. If the applicationof the pattern matching algorithm using the absolute MDM is datacompression, it is also required to transmit additional informationfor specifying the arbitrary anchor points, that generatessubstantialamount of information than the information reduction due tothemore decimation. If one considers such applications as feature ex-traction, source modeling, etc., the absolute MDM could be an ac-ceptable approach. In this work, we employ the approximate MDMto take advantage of its computational simplicity and less informa-tion amount.

We start with the definition of two complementary setsE andE

C: if an encoder outputs codewords for a symbolXi, j , the symbolbelongs toE. A decimation field is defined as following:

F(i, j) =

{

0 Xi, j ∈E

1 Xi, j ∈EC (6)

which always returns 1 at the initial coding phase, does 0 when thecoding procedure is vanished. In the previous example showninFigure 1, one may notice that the shaded area corresponds to 0. Thesymbols from thekth patchπk of the dictionary isYmk,nk

k , wheremkandnk specify the dimension of the patch. Consider a single-letterfidelity measureρ : A×A→R+ such that

ρ(X,X) =1|X|∑i

ρ(Xi ,Xi) (7)

The set of indices, at which the dictionary patch is exactly same asthe source patch, is

H ={

k | ρ(

Ymk,nkk ,Xmk,nk

∆i

)

= 0, 1≤ k≤ Nm(i)}

(8)

Finally, the index of the maximum decimation match satisfying thedistortion criterion is

kmax = argmaxk∈H

{

∑i, j

F(i, j), 0≤ i−∆1 < mk, 0≤ j−∆2 < nk

}

(9)

3. IMPLEMENTATION OF LOSSY UNIVERSAL SOURCECODER

In this section, we set our focus on lossy universal source coderby extension of the 2D pattern matching scheme introduced above.Many of lossy universal source coders in literatures compute thedistortion per symbol, called average distortion. We observe thatthe average distortion is not a relevant measure in human perceptionsense. One way to overcome the drawback of the average distortionmeasure is to employ a noise visibility threshold, which is so calledjust-noticeable distortion (JND). One additional way is tominimizethe maximum of the visible distortion so that noises are below thevisibility thresholds.

Given the visibility thresholdτi, j at each pixel location, the localaverage distortion is

ρa(

X,X)

=1|X|

(

∑i, j

max{0, |Xi, j − Xi, j |− τi, j}

τi, j

p)1/p

(10)

where p is a real number,p≥ 1. By setting to 2,ρa(·) forms aperceptually weightedL2 norm. If the approximation of the sourcepatchX has invisible distortion, this metric gives 0. Consequently,the set of indices whose dictionary patches haveεa-bounded distor-tion at ith coding epoch is

Ha = {k | ρa (Yk,X∆i ) < εa, 1≤ k≤ Nm(i), εa ∈R+} (11)

whereεa is a noise bound.The perceptually weightedL∞ norm defines the local minimax

distortion:

ρm(

X,X)

=1|X|

(

∑i, j

max{0, |Xi, j − Xi, j |− τi, j}

τi, j

∞)1/∞

(12)

Hence, if any of absolute distortion computed by|Xi, j − Xi, j | isgreater than the perceptual thresholdτi, j , this metric gives a pos-itive distortion. The set of dictionary indices whose patches havebounded distortion is

Hm = {k | ρ (Yk,X∆i ) ≤ 0, 1≤ k≤ Np(i)} (13)

At each coding epoch, the encoder constructs the set of indiceswith respect to the distortion criterion, then it measures the decima-tion level of each candidate patch to which each index from the setpoints. Finally, it selects the match of the indexkmax that gives thehighest level of decimation. Described in detail is the whole pictureof the lossy universal source coding algorithm in Algorithm2.

©2007 EURASIP 655

15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3-7, 2007, copyright by EURASIP

Page 4: Two Dimensional Incremental Parsing for Image Compression · The LZ78 re-quires ⌈log2 M LZ78+C ⌉bits where CLZ78 is the bit length for the next source symbol, mostly equivalent

Algorithm 2 Lossy universal source coding via 2D incrementalparsing

1: T←A= {π0, · · · ,π|A|}, l ← 0, ∆l ← (0,0)2: while X∆i ∈X do3: Find the dictionary indicesH givenρ(·)4: Compute∑i, j F(i, j), for {(i, j)|Xi, j ∈X

mk,nk∆l},∀k∈H

5: Outputkmax by (9)6: Append two new patchesπ ′

1 andπ ′2 to T

7: F(i, j)← 1 for {(i, j)|Xi, j ∈Xmkmax,nkmax∆l

}

8: l ← l +19: Update∆l

10: end while

4. EXPERIMENTAL RESULTS

In this section, we investigate the performance of the 2D incremen-tal parsing in image compression application. To estimate the noisevisibility threshold of a given image, we employed the JND modelderived by Chouet al. [15], which considers both texture sensi-tivity and contrast sensitivity in image domain. We designed twotypes of lossy image compression algorithms based on the averagedistortion and the minimax distortion, named ‘2DIP-A (average)’and ‘2DIP-M (minimax)’ respectively. By (9) and (10), the 2DIP-A finds the maximum decimation match minimizing the averagedistortion. Also, the match minimizing the minimax distortion isselected by (9) and (12) in the 2DIP-M.

We compare our results to the 2DPMC [12], which utilizes afixed number of patch dimensions. It originally employs additionallossless compression procedures, that are run-length coding andarithmetic coding to improve compression ratio on top of thepat-tern matching algorithm. For objective comparisons, only the pat-tern matching algorithm is allowed for image compression. Notethat if all three algorithms of the 2DPMC are used, the codingper-formance is highly improved so as to be better then the 2DIP.1 Forbetter understanding, we designed 1D lossy LZW coders usingthesame distortion metrics (10) and (12), based on the same visibil-ity threshold. To make the image readable in the 1D coder, eachimage is linearized by concatenating each column sequences. It isobserved that the column-wise linearization gives similarcompres-sion performance as the row-wise one.

To compare a reconstructed image with the original image, weintroduce two types of image fidelity measures: Mean StructuralSIMilarity (MSSIM) [16] and peak-signal-to-noise-ratio (PSNR).Due to the manipulation of structural information, the MSSIM isknown to be effective at measuring suprathreshold compression dis-tortions. The range of the MSSIM value is [0,1], where the bestvalue is 1 and the worst value is 0 in image fidelity. The PSNR istraditionally defined from the mean-squared error (MSE) as

PSNR= 10log10

(

2552

MSE

)

where MSE=1N

N

∑i(xi − xi)

2 (14)

A number of images are tested for the performance comparisonsof the coding algorithms, here some results of which are shown.Quantization level of each pixel for all images are 256, equivalentto |A|. Note that the anchor point of the 2DIP algorithms sweeps agiven image from top-left to bottom-right.

Figure 4 shows the performance evaluations of all the compres-sion algorithms and their fidelities. As noticeable in the results,there is a substantial performance improvement when using the2DIP, especially under low bitrates. Figure 4 (a), (b), (c) show thatthe 2DIP-A gives the best PSNR among the algorithms. On theother hand, in Figure 4 (d), (e), (f), the 2DIP-M reflects the best

1Observe that the “Lena” image used for performance analysisin [12] isnot consistent with the image used in this paper. This incongruity resultedin different coding performances from those provided in thearticle.

perceptual fidelity among them although its PSNRs are lower thanthose of the 2DIP-A are. The results imply that the 2DIP algorithmsmake better use of the source statistics that are captured into theirdictionaries. Figure 5 illustrates the estimated bitratescomputedduring the encoding procedures at the fixed target fidelity. The es-timated bitrate of the 2DIP-M decreases fast as in the initial codingstage, and does not show any rapid change so that the eventualbi-trate is almost 1.5 bpp lower against the 2DPMC.

5. CONCLUSION

In this paper, we presented an universal incremental parsing algo-rithm for two-dimensional sequence. To show its ability of captur-ing the random process of a given source, we applied the algorithmto the lossy image compression application. In section 2, three the-oretical underpinnings, hierarchical structure of two-dimensionalsource coding, dictionary augmentation, and maximum decimationmatching, are provided. Also, we formulated two types of distor-tion measures using a noise visibility threshold, the localaveragedistortion and the local minimax distortion. From the experimentalresults, while the local average distortion behaves well for aiminghigher PSNR, the local minimax distortion leads the encoderto ef-ficiently minimize the perceptual distortion. By the experiments,the proposed algorithms show the great improvement in coding as-pect, which implies that the estimation of the source randompro-cess is more efficient compared to existing algorithms. Eventhoughnot shown in this paper, it is observed that the output codewordsgenerated by the 2DIP algorithm are not identically distributed.Hence, one can apply alternative approaches in order to gainhighercompression performance, for example, a transform-domainpatternmatching, an additional lossless compression algorithm, etc.

The algorithm proposed in this paper invokes a challenging prob-lem which is the proof of the optimality of the two or higher di-mensional incremental parsing. Assume that we are given a M-dimensional discrete source and an optimal incremental parsing al-gorithm which produces augmentor sequences, we conjecturethatthe M-1 dimensional source distribution will be independent of theparsing algorithm and can be viewed as the distribution conditionedon the M-dimensional sequence set.

Acknowledgment

The authors are grateful to Dr. Ananth Grama for providing theimplementation of 2DPMC. This work was supported by HewlettPackard Laboratory.

REFERENCES

[1] A. Lempel and J. Ziv, “On the complexity of finite sequences,”IEEE Trans. Inform. Theory, vol. IT-22, no. 1, pp. 75–81, Jan.1976.

[2] J. Ziv and A. Lempel, “A universal algorithm for sequentialdata compression,”IEEE Trans. Inform. Theory, vol. IT-23,no. 3, pp. 337–343, May. 1977.

[3] J. Ziv and A. Lempel, “Compression of individual sequencesvia variable rate coding,”IEEE Trans. Inform. Theory, vol.IT-24, no. 5, pp. 530–536, Sept. 1978.

[4] J. Ziv, “Coding theorem for individual sequences,”IEEETrans. Inform. Theory, vol. IT-24, no. 4, pp. 405–412, July.1978.

[5] A. Lempel and J. Ziv, “Compression of two-dimensionaldata,” IEEE Trans. Inform. Theory, vol. IT-32, no. 1, pp. 2–8,Jan. 1986.

[6] D. Sheinwald, A. Lempel, and J. Ziv, “Two-dimensional en-coding by finite-state encoders,”IEEE Trans. Commun., vol.38, no. 3, pp. 341–347, Mar. 1990.

©2007 EURASIP 656

15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3-7, 2007, copyright by EURASIP

Page 5: Two Dimensional Incremental Parsing for Image Compression · The LZ78 re-quires ⌈log2 M LZ78+C ⌉bits where CLZ78 is the bit length for the next source symbol, mostly equivalent

0.4 0.6 0.8 1 1.224

26

28

30

32

34

36

bitrates (bits/pixel)

PS

NR

(dB

)

2DIP−A2DIP−M1DLZ−A1DLZ−M2DPMC

(a)

0.4 0.6 0.8 1 1.224

26

28

30

32

34

36

bitrates (bits/pixel)

PS

NR

(dB

)

2DIP−A2DIP−M1DLZ−A1DLZ−M2DPMC

(b)

0.6 0.8 1 1.224

26

28

30

32

34

36

bitrates (bits/pixel)

PS

NR

(dB

)

2DIP−A2DIP−M1DLZ−A1DLZ−M2DPMC

(c)

0.4 0.6 0.8 1 1.2

0.7

0.75

0.8

0.85

0.9

0.95

1

bitrates (bits/pixel)

MS

SIM

2DIP−A2DIP−M1DLZ−A1DLZ−M2DPMC

(d)

0.4 0.6 0.8 1 1.2

0.7

0.75

0.8

0.85

0.9

0.95

1

bitrates (bits/pixel)

MS

SIM

2DIP−A2DIP−M1DLZ−A1DLZ−M2DPMC

(e)

0.6 0.8 1 1.2

0.7

0.75

0.8

0.85

0.9

0.95

1

bitrates (bits/pixel)

MS

SIM

2DIP−A2DIP−M1DLZ−A1DLZ−M2DPMC

(f)

Figure 4: Comparison of compression performances of five algorithms. (a) and (d) are the results of “Bank”, (b) and (e) areof “Lena”, (c)and (f) are of “Sanfrancisco”

[7] H. Morita and K. Kobayashi, “An extension of LZW codingalgorithm to source coding subject to a fidelity criterion,”in4th Joint Swedish-Soviet International Workshop InformationTheory, Gotland, Sweden, 1989, pp. 105–109.

[8] Y. Steinberg and M. Gutman, “An algorithm for source codingsubject to a fidelity criterion, based on string matching,”IEEETrans. Inform. Theory, vol. IT-39, no. 3, pp. 877–886, May1993.

[9] Z. Zhang and V. Wei, “An on-line universal lossy data com-pression an on-line universal lossy data compression algo-rithm via continuous codebook refinement. I. Basic results,”IEEE Trans. Inform. Theory, vol. IT-42, no. 3, pp. 803–821,May. 1996.

[10] T. Łuczak and W. Szpankowski, “A suboptimal lossy datacompression based on approximate pattern matching,”IEEETrans. Inform. Theory, vol. IT-43, no. 5, pp. 1439–1451, Sept.1997.

[11] E. H. Yang and J. Kieffer, “On the performance of data com-pression algorithms based upon string matching,”IEEE Trans.Inform. Theory, vol. IT-44, no. 1, pp. 47–65, 1998.

[12] M. Alzina, W. Szpankowski, and A. Grama, “2D-patternmatching image and video compression: Theory, algorithms,and experiments,”IEEE Trans. Image Processing, vol. 11, no.3, pp. 318–331, Mar. 2002.

[13] T. A. Welch, “A technique for high-performance data com-pression,” IEEE Computer, vol. 17, no. 6, pp. 8–19, June1984.

[14] J. Rissanen, “A universal data compression system,”IEEE

0 0.5 1 1.5 2 2.5

x 105

0.3

0.4

0.5

0.6

0.7

0.8

0.9

# of symbols (pixels)

Est

imat

ed a

vera

ge b

itrat

e (b

its/p

ixel

)

2DIP−M1DLZ−M2DPMC

Figure 5: Estimated bitrates as the compression algorithmspro-ceed. The test image is “Lena”. The target PSNR is 30dB.

Trans. Inform. Theory, vol. IT-29, no. 5, pp. 656–664, Sept.1983.

[15] C.-H. Chou and Y.-C. Li, “A perceptually tuned subband im-age coder based on the measure of just-noticeable-distortionprofile,” IEEE Trans. Circuits Syst. Video Technol., vol. 5, no.6, pp. 467–476, Dec. 1995.

[16] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli,“Image quality assessment: From error visiblity to structuralsimilarity,” IEEE Trans. Image Processing, vol. 13, no. 8, pp.600–612, Apr. 2004.

©2007 EURASIP 657

15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3-7, 2007, copyright by EURASIP