Journal of Universal Computer Science, vol. 3, no. 10 (1997), submitted: 11/3/97, accepted: 2/7/97, appeared: 28/10/97 Springer Pub. Co.

Similar documents
Journal of Universal Computer Science, vol. 5, no. 4 (1999), submitted: 1/12/98, accepted: 20/4/99, appeared: 28/4/99 Springer Pub. Co.

Encoding Time in seconds. Encoding Time in seconds. PSNR in DB. Encoding Time for Mandrill Image. Encoding Time for Lena Image 70. Variance Partition

Finite State Automata as a Data Storage

where C is traversed in the clockwise direction, r 5 èuè =h, sin u; cos ui; u ë0; çè; è6è where C is traversed in the counterclockwise direction èhow

19.2 View Serializability. Recall our discussion in Section?? of how our true goal in the design of a

Math 241: Calculus III Final Exam è300 points totalè Show All Work Name This test consists of 2 parts. There are 10 problems in Part I, each worth 18

Inænitely Long Walks on 2-colored Graphs Which Don't Cover the. Graph. Pete Gemmell æ. December 14, Abstract

SIGNAL COMPRESSION. 9. Lossy image compression: SPIHT and S+P

3. G. G. Lemieux and S. D. Brown, ëa detailed router for allocating wire segments

rate name People Consult Topics name rate name People Consult Topics name

A,B,C,D 1 E,F,G H,I,J 3 B 5 6 K,L 4 M,N,O

FRACTAL IMAGE COMPRESSION OF GRAYSCALE AND RGB IMAGES USING DCT WITH QUADTREE DECOMPOSITION AND HUFFMAN CODING. Moheb R. Girgis and Mohammed M.

Name: 2 Useful Formulas Pn i=1 i = nèn+1è 2 Pn i=1 xi = xn+1,1 x,1 P Pn 1 =lnn + Oè1è 1 i=1 i i=0 = ixi x è1,xè 2 e x =1+x + x2 + x 3 2! 3! + ::: lim

53 M 0 j èm 2 i è ;1 M 0 j èm 2 i è ;1 èm 2 i è ;0 èm 2 i è ;0 (a) (b) M 0 i M 0 i (c) (d) Figure 6.1: Invalid boundary layer elements due to invisibi

THREE DESCRIPTIONS OF SCALAR QUANTIZATION SYSTEM FOR EFFICIENT DATA TRANSMISSION

Boundary layer quadrilateral. Boundary layer

Approximating a Policy Can be Easier Than Approximating a Value Function

DIFFERENTIAL IMAGE COMPRESSION BASED ON ADAPTIVE PREDICTION

One motivation for developing axiomatic systems is to determine precisely which properties

George Mason University. Fairfax, VA æa paper submitted for possible presentation at the IEEE Computer Security Foundations

Image Storage, Indexing and Recognition with Finite State Automata

Key words: B- Spline filters, filter banks, sub band coding, Pre processing, Image Averaging IJSER

Abstract. circumscribes it with a parallelogram, and linearly maps the parallelogram onto

where ëvar" represents a variable and ëint" represents an integer. The productions are numbered. Grammar for CAMO: In shorter notation èmostly use ærs

Bit-Plane Decomposition Steganography Using Wavelet Compressed Video

Generalized Multiple Description Vector Quantization æ. Abstract. Packet-based data communication systems suæer from packet loss under high

ABSTRACT. We present a method for progressive lossless compression of still grayscale images that combines

Applied Mathematics Letters. Graph triangulations and the compatibility of unrooted phylogenetic trees

CSEP 521 Applied Algorithms Spring Lossy Image Compression

Error-control vs classical multiresolution algorithms for image compression

The ray tracing software package implements an object-oriented approach to

simply by implementing large parts of the system functionality in software running on application-speciæc instruction set processor èasipè cores. To s

Embedded Rate Scalable Wavelet-Based Image Coding Algorithm with RPSWS

CMPT 365 Multimedia Systems. Media Compression - Video

Rational Bezier Surface

Face whose neighbors are to be found. Neighbor face Bounding box of boundary layer elements. Enlarged bounding box

CHAPTER 4 REVERSIBLE IMAGE WATERMARKING USING BIT PLANE CODING AND LIFTING WAVELET TRANSFORM

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

Scene Partitioning via Statistic-based Region Growing. Joseph Weber

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM

On-line multiplication in real and complex base

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

Data Compression - Seminar 4

und Formale Beschreibungsverfahren D Karlsruhe, Germany fbranke, July 1996 Abstract

In: Proc. of the Fifth Int'l Workshop on the Deductive Approach to. Information Systems and Databases, Costa Brava, Spain, Sep.

Digital Image Processing Fundamentals

AUDIOVISUAL COMMUNICATION

2 The MiníMax Principle First consider a simple problem. This problem will address the tradeos involved in a two-objective optimiation problem, where

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

RGB Digital Image Forgery Detection Using Singular Value Decomposition and One Dimensional Cellular Automata

Code Transformation of DF-Expression between Bintree and Quadtree

Image Compression with Function Trees

insertion wcet insertion 99.9 insertion avgt heap wcet heap 99.9 heap avgt 200 execution time number of elements

Engineering Mathematics II Lecture 16 Compression

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 24

A Review of Image Compression Techniques

process variable x,y,a,b,c: integer begin x := b; -- d2 -- while (x < c) loop end loop; end process; d: a := b + c

Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET

Evolved Multi-resolution Transforms for Optimized Image Compression and Reconstruction under Quantization

Efficient Image Compression of Medical Images Using the Wavelet Transform and Fuzzy c-means Clustering on Regions of Interest.

æ When a query is presented to the system, it is useful to ænd an eæcient method of ænding the answer,

Deduction and Logic Implementation of the Fractal Scan Algorithm

signal-to-noise ratio (PSNR), 2

Dictionary Based Compression for Images

Design of Multi-Parameter Steerable Functions. and Yacov Hel-Or z. Abstract

Optimization of Bit Rate in Medical Image Compression

5.7. Fractal compression Overview

Optimized Progressive Coding of Stereo Images Using Discrete Wavelet Transform

Image Compression for Mobile Devices using Prediction and Direct Coding Approach

An Automated Video Data Compression Algorithm by Cardinal Spline Fitting

Discovering simple DNA sequences by compression. David R. Powell, David L. Dowe, Lloyd Allison and Trevor I. Dix

Fractal Image Compression

Generating edge covers of path graphs

Jianmin Zheng Hock Soon Seah De-Wei Randall Lim

Reals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method.

Direction-Length Code (DLC) To Represent Binary Objects

Analysis of Parallelization Effects on Textual Data Compression

Lecture 7 February 26, 2010

7 according to the mesh size speciæcation. The simple Delaunay algorithm guarantees that all vertices of the boundary are present in the mesh. However

APPM 2360 Project 2 Due Nov. 3 at 5:00 PM in D2L

AN ANALYTICAL STUDY OF LOSSY COMPRESSION TECHINIQUES ON CONTINUOUS TONE GRAPHICAL IMAGES

Proposed Running Head: Lexicographic Bit Allocation for MPEG Video Corresponding Author: Dzung T. Hoang Sony Semiconductor of America 3300 Zanker Road

JPEG compression of monochrome 2D-barcode images using DCT coefficient distributions

task type nodes is entry initialize èwith mailbox: access to mailboxes; with state: in statesè; entry ænalize èstate: out statesè; end nodes; task bod

Bivariate Normal Density

Image Compression Algorithm and JPEG Standard

Image Compression Using SOFM

User-Friendly Sharing System using Polynomials with Different Primes in Two Images

Generalized Coordinates for Cellular Automata Grids

Comparative Analysis of Image Compression Using Wavelet and Ridgelet Transform

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

Liang-Jin Lin. A Dissertation Presented to the FACULTY OF THE GRADUATE SCHOOL UNIVERSITY OF SOUTHERN CALIFORNIA. In Partial Fulællment of the

Three Dimensional Motion Vectorless Compression

Circle inversion fractals are based on the geometric operation of inversion of a point with respect to a circle, shown schematically in Fig. 1.

Fingerprint Image Compression

MEMORY EFFICIENT WDR (WAVELET DIFFERENCE REDUCTION) using INVERSE OF ECHELON FORM by EQUATION SOLVING

Wavelet Based Image Compression Using ROI SPIHT Coding

Database Server. Database Database Database

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 14, NO. 3, MARCH

Lecture 7: Most Common Edge Detectors

Transcription:

Journal of Universal Computer Science, vol. 3, no. 10 (1997), 1100-1113 submitted: 11/3/97, accepted: 2/7/97, appeared: 28/10/97 Springer Pub. Co. Compression of Silhouette-like Images based on WFA æ Karel Culik II, Vladimir Valenta Department of Computer Science University of South Carolina Columbia, S.C. 29208, U.S.A. Jarkko Kari Department of Computer Science University ofiowa Iowa City, IA 52242-1419 Abstract We describe a new approach to lossy compression of silhouettelike images. By a silhouette-like image we mean a bi-level image consisting of black and white regions divided by a small number of closed curves. We use a boundary detection algorithm to express the closed curves by chain codes, and we express the chains as one function of one variable. We compress this function using WFA over two letter alphabet. Finally, we use arithmetic coding to store the automaton. æ This work was supported by the National Science Foundation under Grant No. CCR-9417384. Preliminary version was presented in DCC 1997.

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1 Introduction 1101 The objective of this paper is to design a lossy fractal compression method for silhouette-like bi-level images that would have an excellent quality to compression rate ratio. This is our second and better performing approach to this problem. First we discuss the background. Weighted Finite Automata èwfaè have been introduced in ë1, 2ë as a way to specify real functions on ë0; 1ë n, in particular, for n =2 grayscale functions ègrayscale imagesè. In ë2ë a theoretical inference algorithm for WFA was given and ænally in ë3ë a recursive inference algorithm for WFA which led to well performing data-image compression software, see also ë12ë. In ë8, 9ë we have described the ærst approach to compression of bi-level images based on ænite automata. Since in the case of a bi-level image we need to deæne the set of black pixels instead of the grayness function, we have not used WFA but rather Generalized Finite Automata ègfaè where the generalization means that we used rotations, æippings and negations when expressing subsquares of each state in the terms of the other states. However, no weights were used. It turned out that for GFA it was not advantageous to allow nondeterminism, i.e. to express some subsquares as unions of the other states. That led to a nonrecursive, fast encoding algorithm which performed well, however, comparatively not as impressively as the recursive WFA algorithm for grayscale and color images. Further considerable improvement was obtained by using vector quantization for the small è8 æ 8è subsquares. Here, we are returning to WFA. We will reduce the problem of the encoding of a silhouette-like bi-level image to the encoding of two one-variable functions describing the boundary è-iesè of the black and white regions of the given image. Our method assumes that the given bi-level image consists of black and white regions

1102 Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA separated by k closed curves c 1 ;:::;c k, for relatively small k. Using the algorithm from ë11ë we ænd k NESW ènorth-east-south-westè chain codes for the regions. We convert each chain code into two functions x i ;y i expressing c i in parameterized form for i =1;:::;k. Now we combine the 2k functions ètablesè x 1 ;:::;x k, y 1 ;:::;y k into one function èlonger tableè z by concatenating the domains. Finally, we compress the function ètableè z by the one-dimensional version of the recursive WFA algorithm. We measure the quality of the regenerated images by the percentage of wrong pixels. Subjectively, they look even better, in particular, the smooth features, notice that the regenerated images have some features smoother than the originals. We show the performance of our method on some examples. Our new method extends to cartoon-like color images in the same way as it is described in ë9ë for our GFA method. An image with less than 2 m color values is expressed by m bitplanes and then each bitplane is encoded as a bi-level image. A further advantage is that the automata encoding diæerent bitplanes can share states. 2 Weighted ænite automata and their inference In ë1ë the weighted ænite automata èwfaè were introduced as devices computing real functions on ë0; 1ë n for any n. In ë2, 3, 4ë we used the case n = 2 interpreted as the grayscale function specifying a grayscale image. Here we will use two functions of one variable to specify the color boundary. In order to compress tables for these functions we will need to infer one-dimensional èn = 1è WFA. The inference algorithms from ë2, 3, 4ë work for any n ç 1, we will use the recursive algorithm from ë3ë. We remind the deænition of WFA for the speciæc case n =1,in this case we use alphabet æ=f0;1g.

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1103 0:1 æ a; 1 0: 1 2 æ a; 1 1: 1 2 0:1 æ - b; 1 O O O 1:1 1: 1 2 1:1 èaè f A = c èbè f B = ax + b 1: 1 4 0: 1 4 æ a; 1 3 1: 1 2-0: 1 2 æ b; 1 2 1: 1 2 0:1 R æ - c; 1 O O O 1: 1 4 1: 1 2 1:1 ècè f B = ax 2 + bx + c Figure 1: WFA deæning constant, linear or quadratic function. Binary words in æ? are interpreted as addresses of subintervals of the interval ë0; 1ë. The whole interval is addressed by ", then recursively the left half of the interval with address w is addressed by w0, the right half by w1. For example, the address of the interval ë 1 8 ; 3 16 ë is 0010. The words over æ of length n are denoted by æ n, all the words over æ by æ?. Hence, a function g : æ n! IR can be interpreted as a table of length 2 n of a real function èr is the set of realsè. A

1104 Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA function f :æ?!ris a multiresolution speciæcation of a function, i.e. speciæes a table of length 2 n for all n ç 1. We use a WFA to specify a multiresolution function f : æ?! R and possibly a function ^f :ë0;1ë! R as the limit of tables of size 2 n for n!1. An m-state WFA A over æ=f0;1gis deæned by è1è arowvector I 2 R 1æm, the initial distribution, è2è a column vector F 2 R mæ1, the ænal distribution, è3è two weight matrices W 0 ;W 1 input 0 and 1, respectively. 2 R mæm, the weight matrices for WFA A deænes the multiresolution function f A : æ?! R speciæed for all a 1 a 2 :::a k 2æ? by f A èa 1 a 2 :::a k è=iæw a1 æw a2 :::W ak F. A diagram of èsmallè WFA is similar to that used for ænite automata. States are represented by nodes ècirclesè, the components of the initial and ænal distribution are shown inside the circles. If, for a =0;1, èw a è i;j 6=0,then there is an directed edge from node i to node j labeled by a :èw a è i;j : Example. The WFA in Fig. 1èaè speciæes the constant function f 1 èxè =c, for initial distribution ècè. The WFA in Fig. 1èbè speciæes the linear function f 2 èxè =ax + b for initial distribution èa; bè. The WFA in Fig. 1ècè speciæes the quadratic function ax 2 + bx + c for the initial distribution èa; b; cè. Hence, it can specify any polynomial of degree up to 2. In ë1ë we give a æxed WFA with n +1 states with initial distribution èa 0 ;a 1 ;:::;a n è that generates the polynomial a 0 x n + a 1 x n,1 + :::+a n, for any a 0 ;a 1 ;:::;a n, thus any polynomial of degree smaller or equal to n. In ë3ë there is discussed an eæcient algorithm for inferring a WFA generating the greyness function of an image in pixel form. Here we

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1105 need a simple version of this algorithm. It infers a WFA generating a function of one variable speciæed by a table. We deæne sizeèaè to be the actual storage space in bytes required to store the WFA A. The quality of the regenerated function will be measured by the square of the L 2 -metric: Let f and g be two multiresolution functions, and let k be a positive integer. Deæne d k èf; gè = X w2f0;1g k èfèwè, gèwèè 2 : Given a function f at resolution 2 k, the algorithm tries to ænd a WFA A that would minimize the value of d k èf A ;fè+gæsizeèaè; è1è where G is a positive real number. Parameter G controls the compression ratio and the quality of the regenerated function. With large values of G a small automaton with poor approximation of f is produced. When G is made smaller, the approximation improves while the size of the automaton increases. The main structure of the recursive inference algorithm is given in Table 1. The algorithm uses global variables n èthe number of states in the automaton at the momentè, and è 1 ;è 2 ;:::;è n èthe functions corresponding to the statesè. A recursive call make wfaèi; k; max è processes state number i: Each quadrant of è i is expressed either as a linear combination of existing states or by introducing a new state. The new state is processed by a recursive call to make wfa. The function è i is studied at level k, and is considered an function of size 2 k. The algorithm tries to minimize the value of cost = d k èè i ;è 0 iè+gæs; è2è where è 0 i denotes the approximation of the function è i that is obtained, and s is the increase in the size of the automaton caused by

1106 Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA the new states and edges that are added to the automaton in order to compute è 0 i. If cost é max function make wfa returns value 1 èindicating that max could not be improvedè, otherwise it returns cost. During the recursive call all four quadrants of è i are approximated in two diæerent ways: by linear combinations of existing states èstep 1 in Table 1è, and by adding a new state corresponding to the function in the present quadrant and recursively using make wfa to approximate it èsteps 2 and 3è. Whichever alternative yields a better result is chosen èsteps 4 and 5è. Finally, we replace the present quadrant in è i with the approximation that was obtained, and we then update the other function è 1 ;è 2 ;:::;è n that depend on è i èstep 6è. If this is not done, in any future approximation the "ideal" è i is used instead of the "real", slightly diæerent approximation of è i. This would cause further errors. Note that before we know the "real" è 0 i we have no alternative but to use the "ideal" è i in the linear combinations in step 1. This causes errors that are diæcult to deal with, but at least we should use the "real" value as soon as we know it. One possible way to avoid the uncontrolled errors is not to use a state in linear combinations until we know the real function it represents. This is the approach used in our present implementation. It has the drawback of not allowing loops in the WFA. Initially, before calling the recursive function make wfa for the ærst time, we must set n è 1 and è 1 è f, where f is the image that needs to be approximated at level k. The approximation is done by calling make wfaè1;k;1è. The algorithm produces a WFA with æxed initial distribution I 1 = 1, I i = 0 for all i ç 2. Therefore, the initial distribution does not need to be stored. See ë3ë for details related to storing the automaton using arithmetic coding.

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1107 Figure 2: Function sinèxè and its approximation by a six state WFA A æxed set of functions can be used in all linear combinations starting from step 1 of the algorithm. Such functions are said to form an initial basis. Before calling make wfa for the ærst time, we set n è N +1, è 1 è f, where f is the image to be compressed, and è 2 ;è 3 ;:::;è N+1 are set to be the N æxed images in the initial basis. The functions in the basis can be chosen arbitrarily they do not need to be deænable by a WFA. The choice of the initial basis can of course depend on the application, that is, on the type of images one wants to compress. The initial basis resembles the code book in vector quantization ë14ë which can be viewed as a very restricted version of our method. Here we have used the initial basis containing three functions: constant x! 1, linear x! x and quadratic x! x 2. All quadratic functions x! ax 2 + bx + c can be expressed as their linear combinations, so the basis functions alone provide good piecewise approximations of smooth functions. Fig. 2 shows the graph of function sinèxè on the left and its approximation by a WFA with six states inferred by our algorithm.

1108 Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA Figure 3: original 512 æ 512, 396 bytes, 0.01208 bpp, 0.11è wrong pixels 3 Compression algorithm and results Given a bi-level image as input we start by using the algorithm from ë11ë to obtain NESW chain code for each segment i, i =1;:::;k where k is a number of segments. We convert each chain code into two parametric functions x i ;y i for i =1;:::;k in the following way. Denote a i èjè to be a j-th letter in chain code i. We set x i è0è = y i è0è = 0 for all i. We continue generating x i ;y i functions as follows: a i èjè = 8é é: E : x i èjè=x i èj,1è+1; y i èjè=y i èj,1è W : x i èjè =x i èj,1è, 1; y i èjè =y i èj,1è N : y i èjè =y i èj,1è + 1; x i èjè =x i èj,1è S : y i èjè =y i èj,1è, 1; x i èjè =x i èj,1è We merge the 2k functions ètablesè into one function èlonger tableè z by concatenating the domains. Next, the function z is compressed using the inference algorithm described in the previous chapter. The inference algorithm produces a WFA A such that the function f A it deænes is a close approximation of function z èunder MSE metricè. The WFA is then compactly stored using arithmetic coding, as explained in detail in ë13ë. The decoder works in the following way: ærst we compute the function f A deæned by WFA A using the fast decoding algorithm

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1109 Figure 4: original 512 æ 496, 496 bytes, 0.01514 bpp, 0.25è wrong pixels from ë2ë. Then we decompose function f A into k parts çx i ; çy i for i = 1;:::;k. Since we conducted a lossy compression, functions çx i and çy i only approximate functions x i and y i, respectively. Finally, let l i denote a length of the table specifying function x i èthe length of y i is the sameè. We reconstruct the segment i for each i = 1;:::;k as follows: we connect by a straight line each pair of points ëèçx i èjè; çy i èjèè; èçx i èj +1è; çy i èj+ 1èèë, for j = 0;:::;l i, and also the pair ëèçx i èl i è; çy i èl i èè; èçx i è0è; çy i è0èèë. The results of three of our experiments are shown in Figures 3, 4 and 5. The original images are on the left, the reconstructed images on the right. Note that the lossy compression actually smoothes some jagged lines, e.g. the wheel and the barrel of the cannon. This is because, within the allowed error, the automaton describing the smooth curve is simple and hence results in small cost. Conclusion. The new method outperforms the GFA method in case if high quality of regenerated images is desired. We could expect further improvement of this method if the inference algorithm stops subdividing the tables specifying the functions at the size 16 and

1110 Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA uses vector quantization at this point. Figure 5: original 512 æ 512, 511 bytes, 0.01559 bpp, 0.19è wrong pixels Acknowledgment. The authors are grateful to Robert R. Estes for discussion of his results and for allowing the authors to use his chain code routines. References ë1ë K. Culik II and J. Karhumíaki, Automata Computing Real Functions, SIAM J. on Computing 23, 789-814 è1994è. ë2ë K. Culik II and J. Kari, Image Compression Using Weighted Finite Automata, Computer and Graphics 17, 305-313 è1993è. ë3ë K. Culik II and J. Kari, Image-Data Compression Using Edge- Optimizing Algorithm for WFA Inference, Journal of Information Processing and Management 30, 829-838 è1994è. ë4ë K. Culik II and J. Kari, Eæcient Inference Algorithm for Weighted Finite Automata, in: Fractal Image Compression, ed. Y.Fisher, Springer-Verlag è1994è.

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1111 ë5ë K. Culik II and J. Kari, J. Finite state methods for image manipulation, Proceedings of ICALP 95, Lecture Notes in Computer Science 944, Springer-Verlag, 51-62 è1995è. ë6ë K. Culik II and J. Kari, Finite State Methods for Compression and Manipulation of Images, Proceedings of Data Compression Conference 1995, Snowbird, Utah, 142-151 è1995è. ë7ë K. Culik II and J. Kari, Finite State Transformation of Images, Computer and Graphics, 20, 125-135 è1996è ë8ë K. Culik II and V. Valenta, Finite Automata Based Compression of Bi-level Images, in: Proceedings of the Data Compression Conference, Snowbird, Utah, 280-289 è1996è. ë9ë K. Culik II and V. Valenta, Finite Automata Based Compression of Bi-level and Simple Color Images, Computer and Graphics, 21, 61-68 è1997è. ë10ë K. Culik II and V. Valenta, Generalized ænite automata and transducers, submitted to Journals of Automata, Languages and Combinatorics. ë11ë Robert R. Estes, Jr. and V. Ralph Algazi, Eæcient error free chain coding of binary documents, in: Proceedings of the Data Compression Conference, Snowbird, Utah, April, 122-132 è1995è. ë12ë U. Hafner, Reæning Image Compression with Weighted Finite Automata, in: Proceedings of DCC 96, 359-368, Snowbird, Utah è1966è. ë13ë J. Kari and P. Fríanti, Arithmetic coding of weighted ænite automata, R.A.I.R.O. Theoretical Informatics and Applications, 28, 3-4, 343-360 è1994è.

1112 Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA ë14ë M. Rabbani and P. W. Jones, Digital Image Compression Techniques, Tutorial Texts in Optical Engineering, TT7, SPIE, Optical Enginering Press, Bellingham, Washington è1991è.

Culik II K., Valenta V. Kari J.Compression of Silhouette-like Images based on WFA 1113 make wfaèi,k,maxè : If max é 0 then returnè1è; If k=0 returnèd 0 èf;0èè; cost è 0; do the steps 1í5 with è =èè i è a for a = 0 and 1: 1. Find r 1 ;r 2 ;:::r n such that the value of cost1 è d k,1 èè;r 1 è 1 +:::+r n è n è+gæs is small, where s denotes the increase in the size of the automaton caused by adding edges from state i to states j with non-zero weights r j and label a, and d k,1 denotes the distance between two multiresolution functions at level k, 1. 2. n 0 è n, n è n +1, è n è è and add an edge from state i to the new state n with label a and weight 1. Let s denote the increase in the size of the automaton caused by the new state and edge. 3. cost2 è s + make wfaèn,k-1,minfmax,cost,cost1g,sè; 4. If cost2 ç cost1 then cost è cost + cost2; 5. If cost1 é cost2 then cost è cost + cost1, remove all outgoing transitions from states n 0 +1;:::nèadded during the recursive callè, as well as the transition from state i added on step 2. Set n è n 0 and add the transitions from state i with label a to states j =1;2;:::n with weights r j whenever r j 6=0. 6. Update functions è 1 ;è 2 ;:::;è n to reæect the error done in quadrant a of è i. If cost ç max returnècostè else returnè1è; Table 1: Outline of the recursive inference algorithm for WFA.