Z-TREES: ADAPTIVE PYRAMID-ALGORITHMS FOR IMAGE SEGMENTATION
Guna Seetharaman, Bertrand Zavidovique1 and Sashidar Shivayogimath
1
The Center for Advanced Computer Studies University of Southwestern Louisiana Lafayette, LA 70504-4330
[email protected] Phone: (318) 482-6875 Fax: (318) 482-5791 Institut d'Electronique Fondamentale, Bat. 220 Universite Paris XI, 91405 Cedex, FR
[email protected]
Key words: Image Segmentation, Adaptive Algorithms in Pyramid Structures, Perceptual Group-
ing of Pixels.
2
ABSTRACT This paper introduces a direction-sensitive and locally reorientable compact binary tree, called the Z;tree, for representing digital images. A rotation operation is de ned on a subset of its node, called square nodes, to spatially reorganize the four grand children of any given square-node. The goal is to adapt the Z;tree in order to produce a minimal cutset representation of homogeneous regions. This will enhance a tree-based dynamic programming approach to image segmentation. The tree transformation, tree rotation, and tree inverse transformation, as a sequence { is compactly expressed in the algebraic form of pseudo inverses. Such an expression is conjectured to be universal for segmentation. Experimental results are included to illustrate the eectiveness of the adaptively orientable trees for image segmentation, including a discussion on the choice of metrics that would warrant a local rotation. Natural extension of this approach to 3-D images, and higher dimensional grids is also outlined.
INTRODUCTION In this paper, we apply a Peano scanning of the image, as an alternative to the rasterization for transforming an image into a one dimensional vector. Given (x; y); the coordinate of a pixel, s.t. 0 x; y < n; a closed form expression[1]: P (x; y) = p2 (x) + 2p2 (y) is used to compute its exact position in the Peano sequence. Then, by de nition, the Peano Transform of the image is an one-dimensional vector, FP [k]; 0 k < n2 expressed as: f (x; y) ;! FP (k = P (x; y)): For the sake of visual display, the sequence is organized as an image, by folding the sequence by a snake-like traversal. The transformation process is illustrated with four images shown in Figure 1.
5
16
17
20
21
0
1
6
7
18
19
22
23
15
14
12
13
24
25
28
29
16
17
11
14
15
26
27
30
31
33
36
37
48
49
52
53
34
35
38
39
50
51
54
55
40
41
44
45
56
57
60
61
42
43
46
47
58
59
62
63
63
62
61
60
0
1
4
2
3
8
9
10 32
(a)
2
3
4
5
6
7
13
12
11
10
9
8
18
19
(b)
(c)
(d)
Figure 1. The gures (a) and (b) illustrate the peano coded sequence of pixels of an 8 8 image. And, gures
(c) and (d) illustrate an input image and its peano transformed version.
The Z;tree is constructed by inserting the Peano transformed sequence at the tail end of an array T [1::2n2 ;1] and constructing the tree upwards. The parent-child relation is implicitly de ned by the position of each element in the array. Also, T represents the breadth- rst traversed sequence of nodes of the tree. The tree is made of two types of nodes representing square or rectangular regions in the image. The orientation of all rectangles is decided by the major direction of the Peano scanning process.
3 We now de ne a rotation operator R; on a node ti ; to locally modify the implicit hierarchy between its two children t2i ; t2i+1 and its four grand children t4i ; t4i+1 ; t4i+2 ; t4i+3 respectively. The unrotated instance is represented by the sequence: Ii = fti ; t2i ; t2i+1 ; t4i ; t4i+1 ; t4i+2 ; t4i+3 g: And, the rotated instance is given as: I 0i = fti ; t2i ; t2i+1 ; t4i ; t4i+2 ; t4i+1 ; t4i+3 g: The rotation operation applied twice on a given node ti will leave the instance Ii unmodi ed. Thus, the abstract operation R(i) is idempotent of order 2, therefore, R(i) R(i) = 1: Also, R(i1 )R(i2 ); i1 < i2 ; by de nition is resolved as: R(i1 ) R(i2 ): Image permutation, by de nition, is a cascaded operation of the form: T ;1 RT; where T represents the construction of the binary-tree from an image, and R the rotation. It is a pseudo inverse type of operation, which is rich in expressing textural patterns. It is very useful for image segmentation, as well as perceptual grouping of pixels. It is implicit that the construction of the tree would involve embedding a 1-D sequence such as the Peano-coded sequence; and, R would permute or shue such a sequence. A test image of 8 8 pixels, its permuted version, and the iconic representation of several local rotations involved in the permutation are shown in Figure 2. The local decision to rotate seeks to align the gradient along the y direction. That is, if the x gradient is high in magnitude in a square shaped sub-image, then a rotation is activated at the corresponding node in the Z;tree. 0
1
4
5
16
18
24
25
27
2
3
6
7
17
19
26
8
9
12
14
20
22
28
29
10
11
13
15
21
23
30
31
34
36
37
48
49
56
58
35
38
39
50
51
57
59
40
41
44
45
52
60
62
42
43
46
47
53
61
63
32
33
54
55
Figure 2. A specially designed 88 image shown in (a) has been locally rotated several times to create (b), with all
local rotations shown in (c). The composite rotation in the Z;tree amounts to: R(1; 5; 7; 8; 9; 13; 19; 20; 22; 24; 26; 29; 30; 31):
IMAGE PROCESSING IN THE LOCALLY ROTATED BINARY TREE The Z;tree of a digital image brings forth computations of the form: g(x; y) ; P ;1 T ;1 R;1 O() R T P f (x; y) where, O is a class of image processing operations that are most eective on maximally homogeneous images, and the terms, R; T; and P are as de ned in the previous section. The operations: RT P would pre permute the image to increase the eectiveness of O; and P ;1 T ;1 R;1 would post-permute the result (i.e. shue back the data to its original order).
O is assumed to be most ecient on a class of images de ned by the maximum of a given
property, { homogeneity, directionality, decorrelation etc.. P provides a pixel ordering (image
4 traversal and its associated topology) that globally captures a related property (compacity, isotropy, independence etc). T brings the computational eciency together with other computing properties like stability, accuracy etc.. R; bound to T; conveys the nal optimization for locally more adapted results. Then, after F has been applied to optimally-prepared images, (P ;1 T ;1 R;1 ) reorganizes the data back into its original coherence.
APPLICATION We have applied the tree-based model of image segmentation [2], to the Z;tree seeking a minimal number of homogeneous sub-images. Our approach is to to produce the minimal cutset, by an optimization procedure. We adopt an integer programming [3] approach to produce the minimal cutset in the Z;tree. In essence we are computing a variation of run-length coding of the Peano coded sequence of pixels, which is at the base of the Z;tree. The key contribution of this paper is the permutation operation, R T P; which is used to pre-condition the data, before the optimal-segmentation procedure is applied to it. The goal is to signi cantly reduce the number of cutset-nodes in the nal partitioning of the image. Our rst experiment is to show the adeptness of the Z;tree for image segmentation. The Z;tree produces a smaller number regions than the quad-tree, since the Z;tree can represent rectangles unlike the quad-trees. Though it would increase the eectiveness by merging two x;adjacent square blocks of same pixel-average values, it does not merge two y;adjacent square blocks, { hence a room for improvement.
The second part of our experiment deals with a locally rotated Z;tree, on which the above optimization procedure is repeated. A simple derivative operator is used to locally decide if a node needs rotation. In particular, if the net absolute strength of gradient along the x direction (j4i ; 4i+1 j + j4i+2 ; 4i+3 j) is more than that of the y;direction, (j4i ; 4i+2 j + j4i+1 ; 4i+3 j) then the Z;tree is locally rotated to follow the y;major scanning, instead of the x;major scanning. We point out that the segmentation procedure still remains independent of the decision strategy. The rotated and then segmented images consistently produce cutsets that are smaller than the ones produced by their unrotated counterparts, as expected. We are also focusing on a stiness factor, which would inhibit rotation at nodes which are very close to the root, i.e. large blocks and hence larger displacement due to permutation are inhibited. We will present a detailed discussion of our result in the nal paper.
REFERENCES [1] G. Seetharaman and B. Zavidovique. Image Processing in a Tree of Peano-coded Images. In CAMP'97 IEEE Workshop on Computer Architecture for Machine Perception. (Editor) Charles C. Weems Jr., pages 229{235, October 1997. [2] S L. Horowitz and Theo Pavlidis. Picture Segmentation by a Tree Traversal Algorithm. Journal of Assoc. for Computing Machinary, JACM-23:pp. 368{388, 1976. [3] Guruprasad Shivaram and Guna Seetharaman. Data compression of discrete sequence: A tree based approach using dynamic programming. Technical report, TR97-1-23,USL, 1997.