You are on page 1of 5

Hierarchical color clustering for segmentation of textured images

Mehmet Celenk School of Electrical Engineering and Computer Science Stocker Center Ohio University Athens, OH 45701
Abstract: This paper describes

a hierarchical color clustering approach for the segmentation of textured images. It is a bottom-up type split and merge operation performed in two the split steps: First , operation is carried out using the K-means algorithm in the local windows of an input image to capture the local textural primitives. This is performed in the (R,G,B) -color space. This results in two color classes per local window. Second, the merge operation is employed using the same K-means algorithm module to group the pattern classes resulting from the split operation. This forms the global boundaries of the texture fields present in the input scene. The proposed algorithm is also suitable for a special purpose VLSI chip implementation.
Keywords: Hierarchical

color clustering, split and merge operation, textured image segmentation, K-means algorithm.



of textured object surfaces is

scene recognition. In these applications, a vision system should detect irregular textures and identify their global boundaries in the noisy color images. Recently, a growing research effort has been devoted to the color texture scene modeling for s e g m e n t a t i o n EL n d identification. Markov random field technique and adaptive Bayesian approach are two recently proposed schemes for unsupervised segmentation of textured color images [ 1 , 2 1 . Alternatively, we propose a hierarchical clustering method for texture field segmentation based on the local texture characterization and the split and merge operation. This is also an alternative to the Otsu and Kullback distance based texture characterizationmethod described in [ 3 1 . Since we do not assume any a priori knowledge about the textural primitives, the proposed method is not susceptible to any variations in input images. The proposed algorithm is also suitable for distributed computation, which is realizable with a special purpose DSP VLSI chip. Further, it is relatively less computational intensive as compared to the existing approaches in the In the following sect.ion, we first describe the overall

an important issue in many imaging applications such as image data compression and

0-8186-7873-9/97 $10.00Q 1997 IEEE

approach and give a flowchart for its operation. In section 3 , the computer implementation and experimental results are presented. Section 4 includes conclusions and further research topics.

determined that 4x4 windows give reasonably good partitioning results for the images used in the computer simulation. For the illustration purposes, the six local windows labeled as A through F is shown in the spatial image plane of Figure

The hierarchical clustering approach described in this paper consists of two operational steps; split and merge. These two operational steps form a two-level hierarchy and they utilize the same K-means clustering algorithm for both split and merge operations. Their interactive operations are summarized below: SPLIT: Divide the input image into nxn non-overlapping local windows and apply K-means algorithm to classify pixels in local windows into two classes.
MERGE: Apply K-means algorithm

Figure 1. Non-overlapping local windows of an image.

to group the pattern classes resulting from the split operation to form the global boundaries of the image regions. In this hierarchy, the split operation is applied to the given color image as the initial step of the method. This operational step begins by dividing the color image into n xn non-overlapping local windows in the spatial plane. Although the size of the windows does not affect the operation of the algorithm, it is important that windows should be small enough so that each window can include only two texture fields. Experimentally, it is

The split operation considers the local image windows individually for further partitioning. In each window, pixels are divided into pattern classes as explained below. Consider the pixels of a particular window (e. , window g. A) of Figure 1 assuming the window's size is 4x4. This is shown in Figure 2, where the pixels are called as 1 through

Figure 2 . Pixels of the window A of Figure 1.


Let a through p be the color vectors of the pixels within

the window of Figure 2 as shown in Figure 3.

closer to the class-1 mean vector r as depicted in Figure 4: Pixell E Class1 if la-rlsla-sl = = > Label of Pixel 1 = 0 Pixell E ~ l a s s 2if la-rl>la-sl ==> Label of Pixel 1 = 1 The sample clustering feature of Figure 4 implies that: the color vectors a,b,c,e,f,and g form a cluster (class-1) whose mean vector is r while the vectors d,h,i,j ,k , l,m,n, , and 0 p create another cluster (class-2) whose mean vector is s, respectively. The clustering result of Figure 4 in the (R,G,B)-color space corresponds to a spatial partitioning of the pixels (1 through 16) of Figure 2 as shown in Figure 5.

i m

Figure 3 . Color vectors of pixels in the 4x4 window of Figure 2. Consider a sample clustering property of the color vectors of Figure 3 as shown in Figure 4. Let r and s be the class mean vectors of the two pattern classes resulting from the application of the K-means algorithm to the window A as illustrated in Figure 4.

a b c r e f g d i I n h j s o i k m P




11 15

12 16

Figure 5. Result of operation for Figure 2.


Figure 4 . Color clustering of pixels of the image window of Figure 3. The pixels within the window is then classified using the minimum element-to-class mean vector distance. This is illustrated below for the pixel 1 of Figure 2, whose color vector a (see Figure 3) is

The split phase of the algorithm completes its operation by repeating this process at every image window. As a result of this phase of the algorithm, each window is characterized by two classes and their respective class mean vectors. The pixels in each class of a particular window are represented by a binary label whose value is 0 for class-1 membership and 3. for class-2 membership relation. Let us assume that the result

of the split operation for the image of Figure 1 is giver! as shown in Figure 6.

I *

l v I w
Figure 6. Result of the split phase for Figure 1.

This clustering property results in the spatial merging as shown in Figure 8. In this result, the local regions with the mean vectors t , s, and v are merged since they have similar mean color vectors. The same merge operation is also performed for the regions with the mean color vectors x,u, and w, and f o r the local regions with the vectors y and z. However, the local area with the vector r is accepted as a global region since it does not have any neighbor in the (RI I B) -space with a similar G mean color vector in Figure 7.

In Figure 6, the local windows (A through F) of Figure 1 are assumed to be divided into two classes and each class is represented by the respective class mean vector as labelled r,s,t,u,x,y,v,w, and z. The merge step of the algorithm applies the K-means algorithm to the pattern classes of Figure 6 in order to form the global boundaries of the texture or uniform regions. Let us assume that there are four textured or uniform regions in Figure 6 with the clustering property as shown in Figure 7.

Figure 8. Result of the merge phase applied to the image of Figure 6 with color clustering property shown in Figure 7.

I -

l w


t s v

x u Y Z

Figure 7. Color clustering of image windows of Figure 6.

The two-level split and merge clustering technique has been implemented in a Sun Sparc workstation using the MATHLAB Image Processing Toolbox facilities. The original image is shown in Figure 9 . It is given in a 512x480 image grid with 8 bits/pixel R,G,B specifications. The split phase of the algorithm has created (512/4)~(480/4) =128~120=15,360 image windows. The result of the K-means algorithm as applied to these windows is

shown in Figure 10. It is evident from this Figure that the algorithm is able to detect the local textural primitives within these windows. The merge operation is still under investigation and the results will be presented as they become available.



In this paper, we have described a tWO 1eve1 1 hierarchical clustering approach for color image segmentation. The method consists of two steps; split and merge. Although 4x4 windows have been used in the computer implementation of the split phase of the method, different window sizes (e.g., 8x8, 16x 16 etc.) should be experimented for better results. Adaptive implementation of the split operation is another study area that requires further research. In this study, only the ( R , G,B) -color space has been utilized for the split and merge operation. Different , color spaces (e.g. L*a*b*, YIQ, etc. ) should be experimented for better clustering results.

Figure 9. O r i g i n a l image printed in gray level scale.

[ll D. K. Panjwani and. G. Healy, "Markov random field models for unsupervised segmentation of textured color images," IEEE Trans. PAMI, Vo1.17, No.10, Oct.1995, pp.939-954.
[2l M. M. Chang, H. I. Sezan, and A. M. Tekalp, "Adaptive Bayesian segmentation of color images, J. Electronic Imaging, VO1.3, NO.4, OCt.1994, pp.404414.

Figure 10. Textural primitives of Figure 9 detected in 4x4 windows.


[31 M. Celenk, "Textured surface identification in noisy color images, SPIE Vol.2753, April 1996, pp.11-17.