an alternating binary-tree partitioning for fractal

0 downloads 0 Views 274KB Size Report
The fractal coding algorithm partitions the original image into a number of blocks. ..... 8. REFERENCES. [1] M. F. Barnsley, Fractals Everywhere, Academic Press.
AN ALTERNATING BINARY-TREE PARTITIONING FOR FRACTAL IMAGE CODING

Shinhaeng Lee and Hirotomo Aso Department of Electrical and Communication Engineering, Graduate School of Engineering, Tohoku University, Sendai, Japan E-mail:[email protected]

ABSTRACT

The fractal coding algorithm partitions the original image into a number of blocks. Then each block is coded by obtaining the information of the contractive transformations for the block. There are many methods of partitioning an image based on squares and rectangles such as xed-size partitioning, quad-tree partitioning, and HV partitioning. In this paper, we propose an alternating binary-tree partitioning (ABP) for fractal image coding. We repeat the partitioning rectangular blocks into square blocks and square blocks into rectangular blocks. This is an ecient scheme to implement the dedicated architecture for fractal image coding because it gives better compression and has regular partitioning scheme. Our experiments with ABP shows the increase of roughly 0.5 dB in PSNR which is better performances than quad-tree partitioning for Lenna, Boat, Peppers, and Girl images. 1. INTRODUCTION

Fractal image coding, proposed by Bansley and realized by Jacquin [1][2][3], have received great attention in digital image compression. At very low bit rate fractal image coding performs better than transform coding. The partitioning scheme is very important for fractal image compression [4][5]. Fixed-size partitioning and quad-tree partitioning are partitioning schemes based on squares, while HV partitioning is based on rectangles [6]. Fixed-size partitioning is very simple but can not yield better performances than quad-tree partitioning. In an HV partitioning, a block is recursively partitioned either horizontally or vertically to form two new rectangles. The positions of the partitioning in an HV partitioning are variable. An HV partitioning gives signi cantly better results than quad-tree partitioning but its computation is complicated and takes a lot of coding time. Therefore, most of papers are based on quad-tree partitioning. In this paper, we propose an alternating binary-tree partitioning (ABP) to improve the image quality. ABP is similar to quad-tree partitioning but that each node has two sub-nodes. Since the positions of the partitioning are restricted, ABP is an ecient scheme to design the dedicated architecture for fractal image coding.

2. FRACTAL IMAGE CODING

Let orig be an N 2 N pixel gray scale image. We partition the original image orig into a set of non-overlapping R1 2 R2 pixel range blocks fri g, as follows: orig

=

[

NR

ri ;

ri

T r = ; for i 6= j; j

(1)

i=1

where ri represents the ith range block, NR is the total number of range blocks. R = fri j1  i  NR g is called range pool. A set of overlapping D1 2 D2 (D1 = 2R1 ; D2 = 2R2 ) pixel domain blocks, fdj g, is half-overlapping domain pool D, which are overlapped along the vertical and horizontal directions with the overlapping interval set to D1 =2 and D2 =2, respectively. For each range block, the coding procedure is to nd one domain block and its transformation which is the best match of the original range block. The mapping for the ith range block, i , consists of a scaling factor si , o set oi , pixel isometry tk ; 1  k  8, which maps a square block to one of the 8 isometries obtained from compositions of re ections and 90 degree rotations, and spatial contraction S . The result of applying this mapping is an approximation to the ith range block, r~i as follows: r~i

= si tI (i) (S (dN (i) )) + oi ;

(2)

where N (i) is a domain block selection function, which associates the ith range block with a domain block from D and I (i) is an isometry selection function, which maps the ith range block to one of possible isometry operations. The encoding process is determining the parameters in equation (2) for all range blocks such that the distortion between each range block and its approximation,  (~ri ; ri ), is minimized. To measure the distortion between the two blocks r and r~, the peak signal-to-noise ratio (PSNR) is de ned as: P SN R

= 10 log10 (

b2 ); M SE (r; r~)

(3)

where b is the largest possible value of the signal (typically 255) and MSE(r; r~) represents the mean square error between r and r~. The PSNR is given in decibel units (dB) which measure the ratio of the peak signal to the di erence between two images [1].

Figure 1: Binary-tree partitioning for 512 2 512 Lenna image (1772 blocks, 29.80 dB PSNR).

partitioned im age

partition a square into tw o rectangles partition a rectangle into tw o squares

Figure 2: An example of alternating binary-tree partitioning (ABP). In order to compute the resulting bit rate for a complete image, we have to compute the information in bits needed to represent a block transformation and the total number of range blocks NR . The resulting bit rate is Btotal NR + Ntree [bits/pixel]; N2

(4)

where Btotal and Ntree are the total bits needed to encode a range block and to represent an image as a tree, respectively. 3. CONVENTIONAL PARTITIONINGS

Fixed-size partitioning is very simple scheme. However reducing the total number of range blocks needs since there are regions that could be covered well with large range blocks. To improve the performance of the coding, we have to reduce the total number of range blocks.

Figure 3: Alternating binary-tree partitioning for 512 2 512 Lenna image (1700 blocks, 29.67 dB PSNR). In quad-tree partitioning, a square in the image is broken up into four equal-sized sub-squares when it is not covered well enough by a domain block from domain pool D. All the potential domain blocks are compared with each range block. If the MSE value between a range block and the best domain block is above a threshold value and the depth of the quad-tree is less than a maximum depth, then the range block is subdivided into four sub-blocks, and this process is repeated. If the MSE value is below a threshold value, the information of the best domain block and its transformation is stored. HV partitioning is more exible and uses an enormous domain pool D. A rectangle is recursively partitioned either horizontally or vertically to form two new rectangles. The reconstructed images show high qualities but the computational requirements for this scheme are quite large due to huge domain pool. The encoding process of HV partitioning possesses a very complicated data ow [1]. It is dicult to design an architecture for high-speed fractal image compression by HV partitioning. Recently, several architectural prototypes for fractal image and video compression have been proposed [8]-[11]. All of them used xed-size partitioning or quad-tree partitioning to partition the original image into range blocks fri g. 4. BINARY-TREE PARTITIONING

A binary-tree partitioning represents an image as a tree in which each node has two sub-nodes. Each node denotes a further recursing or ensuing transformation information. A block is recursively partitioned either horizontally or vertically but the partitioning positions are xed on the middle of horizontal or vertical lines. The image is partitioned into a smaller number of range blocks than quad-tree partitioning (1804 blocks, 29.01 dB PSNR). However, the bits of each node are increased due to two partitioning directions. Fig. 1 shows the partitioning result for 512 2 512 Lenna image by binary-tree partitioning.

38

36

34

PSNR [dB]

32

(a)

(b)

30

quad-tree-8 ABP-8 quad-tree-16 ABP-16 quad-tree-32 ABP-32 quad-tree-64 ABP-64

28

26

24

22 0

0.2

0.4

0.6

0.8

1

bit rate [bits/pixel]

(c)

(d)

Figure 4: 512 2 512 test images. (a) Lenna. (b) Boat. (c) Peppers. (d) Girl. 5. ALTERNATING BINARY-TREE PARTITIONING (ABP)

We propose an alternating binary-tree partitioning (ABP) to partition the image into range blocks R. Fig. 2 shows an example of ABP. First, the original image is partitioned into square blocks. Then we repeat the partitioning a square block into two rectangle blocks and a rectangle block into two square blocks if MSE(r; r~) is above a threshold value and the depth of the binary-tree is less than a maximum depth. The positions of the partitioning a square block into rectangular blocks are the middle points of horizontal or vertical lines but the positions of the partitioning a rectangular block into square blocks are xed. Fig. 3 shows that the number of the blocks partitioned by ABP is smaller than binary-tree partitioning. Since the partitioning positions are restricted and the partitioning from rectangles into squares can reduce the bits of node such as quad-tree partitioning, ABP gives better performances than binarytree partitioning. 6. SIMULATION RESULTS

The test images are the 512 2 512, 8-bpp Lenna, Boat, Peppers, and Girl images shown in Fig. 4. In order to compute a bit rate, we compute the information in bits needed to represent a block transformation given in Table 1. Partitionings are computed by letting threshold values of MSE take on the several values. The results are summarizing in Figs. 5 to 8. Fig. 5 shows the results encoded changing the maximum size from 8 2 8 to 64 2 64 for 512 2 512 Lenna image. This result implies the best maximum size is 16 2 16. Assume

Figure 5: PSNR versus bit rate for 512 2 512 Lenna image where the maximum range size from 8 2 8 to 64 2 64 and the minimum is 4 2 4. that the largest and smallest block sizes are 16 2 16 and 4

2 4, respectively.

Fig. 6 shows that the ratio of the number of rectangular blocks to the total range blocks is high from the bit rate 0.2 to 0.4 and the e ectiveness of ABP seems be caused by this fact. Fig. 7 shows PSNR versus the bit rate results for 512 2 512 Lenna image using quad-tree partitioning, binary-tree partitioning, and ABP and implies ABP results are the best results and binary-tree is better than quad-tree partitioning. Fig. 8 shows that ABP yields lower bit rates and higher qualities than quad-tree partitioning for all test images. A good architecture for VLSI implementation should possess the property such that data ow is simple and regular. ABP scheme is more exible than quad-tree partitioning and more regular than HV since the positions of the partitioning are limited. Therefore, ABP is an ecient partitioning scheme for the special-purpose hardware for high-speed fractal image coding due that its data ow is regular and ABP will be achieved good results for any images. 7. CONCLUSIONS

In this paper, we have proposed a new partitioning scheme which is called alternating binary-tree partitioning (ABP). Table 1: Information in bits for the representation of block transformations in the case of 512 2 512 image. Parameter scaling factor (si ) o set (oi ) pixel isometry (tk ) position of domain block

Bits 5 7 3 14

38

0.25 36

0.2 PSNR [dB]

rectangular blocks/range blocks

0.3

0.15

34

32

quad-tree binary-tree ABP

ABP-lenna ABP-boat ABP-peppers ABP-girl

0.1

30 0.05

28

0 0

0.2

0.4

0.6

0.8

1

0.1

0.2

bit rate [bits/pixel]

ABP is an ecient scheme for a special-purpose hardware for fractal image coding because the positions of partitioning are restricted and this scheme shows better results than quad-tree partitioning. ABP shows the increase of roughly 0.5 dB in PSNR for Lenna, Boat and Peppers images. Therefore ABP scheme is ecient to design an architecture for fractal image compression due to the regularity of its data ow such as quad-tree partitioning scheme. 8. REFERENCES

[1] M. F. Barnsley, Fractals Everywhere, Academic Press Inc. , San Diego, 1988. [2] A. Jacquin, \Image coding based on a fractal theory of iterated contractive image transformations," IEEE Trans. Image Processing, vol. 1, no. 1, pp. 18-30, Jan. 1992. [3] A. Jacquin, \Fractal Image Coding: A Review," Processing of the IEEE, vol. 81, no. 10, pp. 1451-1465, Oct. 1993. [4] F. Davoine, J. Svensson, and J. -M. Chassery, \A Mixed Triangular and Quadrilateral Partition for Fractal Image Coding," IEEE Int. Conf. on Image Processing (ICIP'95), 1995. [5] E. Reusens, \Overlapped adaptive partitioning for image coding based on the theory of iterated function systems," Proc. of ICASSP, vol. 5, pp. 569-572, April, 1994. [6] Y. Fisher, Fractal Image Compression Theory and Application, Springer Verlag, New York, 1995. [7] Y. Fisher, D. Rogovin and T. P. shen, \Fractal (selfVQ) Encoding of video sequences," Proceedings of SPIE, Visual Communications and Image Processing '94, vol. 2308, pp. 1359-1370, Sept. 1994. [8] M. S. Lazar and L. T. Bruton, \Fractal Block Coding of Digital Video," IEEE Trans. Circuits and Systems for Video Technology, vol. 4, no. 3, pp. 297-308, June, 1994.

0.4

0.5

0.6

0.7

0.8

bit rate [bits/pixel]

Figure 7: Comparison of results for 512 2 512 Lenna image. [9] F. Ancarani, A. De Gloria, M. Olivieri, and C. Stazzone, \Design of an ASIC Architecture for High Speed Fractal Image Compression," Proceedings Ninth Annual IEEE international ASIC Conference and Exhibit, pp. 223-6, 1996. [10] O. Fatemi and S. Panchanathan, \Fractal Engine," Proc. SPIE Int. Soc. Opt. Eng. , vol. 3021, pp. 88-99, 1997. [11] Z. L. He, M. L. Liou, and K. W. Fu, \VLSI Architecture for Real-Time Fractal Video Encoding," 1996 IEEE International Symposium on Circuits and Systems, vol. 2, pp. 738-41, 1996.

38

36

34

PSNR [dB]

Figure 6: Ratio of the number of rectangular blocks to the total range blocks versus the bit rate for Lenna, Boat, Peppers, and Girl images.

0.3

32

quad-tree-lenna

30

ABP-lenna quad-tree-boat 28

ABP-boat quad-tree-peppers ABP-peppers quad-tree-girl

26

ABP-girl 24 0

0.2

0.4

0.6

0.8

1

1.2

bit rate [bits/pixel]

Figure 8: PSNR versus bit rate for 512 2 512 Lenna, Boat, Peppers, and Girl images using quad-tree partitioning and ABP.