NCC 2009, January 6-8, IIT Guwahati 267 Unsupervised texture segmentation based on Hadamard transform Tathagata Ray, Pranab Kumar Dutta Department Of Electrical Engineering Indian Institute of Technology Kharagpur WB 72 302 India tatharay@gmail.com, pkd@ee.iitkgp.ernet.in Abstract In this paper unsupervised texture segmentation has been investigated with Hadamard filtering. Simulation results show the importance of contextual information also. Moreover various measures for automatic detection of the number of texture categories present in an image have been studied. The fastness of the algorithm is contributed by the use of fast orthogonal transform and processing in blocks. Keywords: Hadamard transform, Fuzzy c-means clustering, Texture segmentation. Introduction Texture, a visual cue of any surface plays a vital role in segmentation of an image. Texture based segmentation, carried out in absence of any external agency or supervision has been a topic of research interest nowadays. Among the different methods of unsupervised texture segmentation [] multichannel multiresolution spatial filtering based techniques have been widely used because of similarity of the responses of these filters with that of human vision system [2]. Gabor wavelet and local linear transform are frequently used for this purpose. Gabor transform has been successfully used in texture segmentation with its optimal resolution in time and frequency [3]. But the computational complexity often outweighs its advantages. So researches start directed towards masks [4, 5, 6] based technique to capture textural property within a neighborhood. On the other hand orthogonal transform has been used in pattern recognition as it transforms pattern space to a reduced dimensional feature space. With this method classification accuracy may suffer a bit but with reduction in features. Orthogonal transform like Walsh-Hadamard transform (WHT), Fourier transform (FT) etc. can be implemented by fast algorithm [7]. Unser [8] proposed texture segmentation using these linear transforms with local energy as features. The feature extraction algorithm employing filtering, nonlinearity addition, smoothing has been enriched further by Randen et al. [9]. The main goal of this paper is to investigate unsupervised texture segmentation with filtering based on Hadamard transform implementing some variations in post processing steps after filtering proposed by Randen et al. [9]. In this paper linear filtering with the help of sixteen number of 2D Hadamard masks of support 4X4 have been carried out in non overlapping blocks. Post processing steps of nonlinearity addition and smoothing have been included. Energy of smoothed image block along with coordinates of its centre has been taken as textural feature. Feature extraction is followed by fuzzy c-means clustering for meaningful segmentation of textured images. Measures proposed by Xie et al. [0] and Coggins et al. [] have been applied here for detection of number of texture categories present in textured image. The application area of the proposed scheme has been limited to some textured images having straight line and curve boundary [2]. The advantage of proposed scheme lies in simplicity and reduction of computational time in comparison to any pixel based processing. In this paper theory has been produced in section 2. Results and discussions are presented in section 3. Conclusion has been drawn in section 4. 2. Theory 2. Hadamard transform Orthogonal transform has been used widely in pattern recognition due to reduction of feature dimension and implementation through fast algorithms [7]. As shown by Unser et al. [8] texture property can be extracted by local linear transform of fixed support as it has similarity with texture field and it replicates the human visualization system [2]. In this paper one of the different forms of local linear transform i.e
NCC 2009, January 6-8, IIT Guwahati 268 hadamard transform has been used as filtering step in feature extraction process. Four sets of Hadamard basis masks of dimension 4X4 are shown below, H=[ ; ; ; ]; H2=[ - -; - -; - -; - -]; H3=[ - - ; - - ; - - ; - - ]; H4=[ - -; - -; - -; - -]; The sixteen number of masks have been created from the outer product of the above mentioned 4 masks. Thereafter squaring nonlinearity is added so that textures present can be distinguished. Gaussian smoothing with twice of the spread as that of input image has been carried out on nonlinearity added image. It is done to minimize within cluster variance. 2.2 Clustering Kmeans clustering assigns the data points belonging to a particular cluster with hard membership values of integers. But in case of fuzzy c means clustering the membership values are in fraction. That is why fuzzy c-means clustering is also known as soft clustering. In this method starting with a initial cluster center membership value of each data point and cluster centers are updated through a iterative process. Whenever the variations of membership value and cluster center are less than a certain threshold between the consecutive run, the iteration process stops [3]. Number of texture class present in input image has been determined automatically by the criterion led by Xie et al. [0] and Coggins et al. [].The two measures ( S, F ) of Xie et al. [0] and the measure ( S k ) of Coggins et al. [] are as shown in equation and 2 respectively. c n 2 2 μij Vi X j i= j= S = min 2 n Vi V j i, j c n 2 F = ( μ ij ) () n i= j= where μ ij, Vi, X j, c, n denotes membership value of j th datapoint for belonging to i th cluster, i th cluster center, j th datapoint, total number of clusters and total number of datapoints considered respectively. min d ( k ( ) ( l) 2 l m j m j ) l k j= S k = (2) n 2 ( ( ) ( ) 2 k d k k xij m j ) nk i= j= where n k =number of patterns in cluster k, (k) m j =cluster center for cluster k, along feature j d=the number of features, x (k) ij =value of the jth feature for the ith pattern belonging to cluster k. High value of F and low value for S show compact and well isolated clusters. Large values of Sk suggest compact, well isolated clusters. 3. Results and discussion Input images of the segmentation process have been created from the textures namely bark, brick, bubbles and texture assemblies downloaded from http://sipi.usc.edu/database [2]. The entire feature extraction step is done in non overlapping blocks. Energy of a non overlapping block after undergoing filtering, nonlinearity addition and Gaussian smoothing is taken as a feature. Contextual feature in the form of mean coordinate of the block considered has been added. After block wise extraction of features fuzzy c means clustering has been invoked. For five input texture images as shown in Fig. (a), (c), (e), (g), (i) segmented class maps have been obtained with minimum classification error by varying the block size. Figure (a) and (c) contain plain textures of grass, water and grass, water, sand respectively. Segmented class maps with misclassification error of 6.20% without contextual features and 2.9% with contextual features for block size of 6X6 have been obtained respectively for these input images as shown in Fig (b) and Fig (d). The misclassification errors of 6.56% and 9.54% are obtained by even symmetric Gabor features [9] for similar input as shown in Figure (a) and (c). Input texture assembly of Fig (e) consists of rotated versions of bark and brick. Segmented class map for this input texture assembly with 0% misclassification error for block size of 64X64 with or without contextual features has been shown in Fig. (f). Texture assemblies consisting of rotated versions of bark, brick and
NCC 2009, January 6-8, IIT Guwahati 269 bubbles are shown in Fig (g) and (i). Segmented class maps with 0% misclassification error for block size of 64X64 have been obtained by the proposed method as shown in Fig (h) and (j) with or without contextual features. Identical results have been obtained by rotational invariant even symmetric Gabor features [4]. Detailed results have been tabulated in Table. Results of standard k-means clustering have been included in Table also. By observing the results as shown in Figure, the proposed method performs better for texture assembly having straight line boundary than texture assembly having curve boundary. Contextual information plays a vital role in segmenting texture assembly having curve boundary. Validity measure ( S ) proposed by Xie et al. [0] has been used for predicting the number of texture categories present in a texture assembly consisting of 3 textures well ahead of Sk and F as shown as Fig 2. For texture assembly consisting of 2 textures Sk and F are successful. 4. Conclusion The proposed method has been very fast compared to pixel based methods because of implementation of fast orthogonal transform in non overlapping blocks. Computational complexity of the proposed method is less than that of Gabor transform. Addition of contextual information helps in some cases for improved segmentation. Automatic detection of number of texture categories present has been done through measures proposed by Xie et al. [0] and Coggins et al. []. It is worth mentioning here that Hadamard transform is attractive for hardware implementation due to its simplicity. Future scope of this work is to increase the variety of input images considered in this paper. References [] M. Tuceyran and A. K. Jain, Texture analysis, in: Handbook of Pattern Recognition and Computer Vision, C.H. Chen, L.F. Pau and P.S.P. Wang (Eds.), chapter 2, World Scientific, Singapore, 993, pp. 235-276. [2] B. Julesz and R. Bergen, Textons, the fundamental elements in preattentive vision and perception of textures, Bell Syst. Tech. J..vol. 62. no. 6, pp. 69-645. July-Aug. 983. [3] J. G. Daugman, Uncertainty relation for resolution in space, spatial frequency and orientation optimized by two-dimensional visual cortical filters, J. opt. Soc. Ame. A, 2, pp. 60-69, 985. [4] F. Ade, Characterization of texture by 'eigenfilter', Signal Processing, vol. 5, no. 5, pp. 45-457, September 983. [5] K. I. Laws, Textured image segmentation, Ph.D. Thesis, Rept. 940, Image Processing Institute, Univ. of Southern California, January 980. [6] M. Pietikainen, A. Rosenfeld and L. S. Davis, Experiments with texture classification using averages of local pattern matches, IEEE Trans. on Systems, Man and Cvbernet., vol. SMC-3, no. 3, pp. 42-426, 983. [7] N. Ahmed, T. Natarajan and K. R. Rao, Discrete Cosine Transform, IEEE Trans. on computers, vol C-23, no., pp. 90-93, December 984. [8] M. Unser, Local linear transforms for texture measurements, Sig. Processing, vol.. no., pp. 6-79, July 986. [9] T. Randen and J. H. Husoy, Filtering for Texture Classification: A Comparative Study, IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 2, no. 4, pp. 29-30, April 999. [0] X. L. Xie and Gerado Beni, A validity measure for fuzzy clustering, IEEE trans. On PAMI, vol. 3, no. 8, pp. 84-847, Ausust 99. [] J.M. Coggins and A.K. Jain, A Spatial Filtering Approach to Texture Analysis, Pattern Recognition Letters, vol. 3, no. 3, pp. 95 203, May 985. [2] http://sipi.usc.edu/database. [3] M. Hanmandlu, V. K. Madasu and S. Vasikarla, A fuzzy approach to texture Segmentation, Proceedings of the International Conference on Information Technology: Coding and Computing (ITCC-2004), vol., pp. 636 642, 2004. [4] R. Manthalkar, P. K. Biswas and B. N. Chatterji, Rotation invariant texture classification using even symmetric Gabor filters, Pattern Recognition Letter, vol. 24, no. 2, pp. 206 2068, August 2003.
NCC 2009, January 6-8, IIT Guwahati 270 (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) Figure. Output of the proposed method (a) texture pair (grass, water) with curve boundary of size 92X28. (b) class map obtained by the proposed method for (a). (c) texture assembly (grass, water, sand) with curve boundary of size 92X256. (d) class map obtained by the proposed method for (c). (e) texture pair (brick, bark) consisting of rotated texture with straight line boundary of size 256X256. (f) class map obtained by the proposed method for (e). (g) texture assembly (brick, bark, bubbles) consisting of rotated texture with straight line boundary of size 256X256. (h) class map obtained by the proposed method for (g). (i) texture assembly (brick, bark, bubbles) consisting of rotated texture with straight line boundary of size 256X256. (j) class map obtained by the proposed method for (i).
NCC 2009, January 6-8, IIT Guwahati 27 0.7 Value of the measure(s) 0.6 0.5 0.4 0.3 0.2 0. 0 2 3 4 5 6 7 8 Number of clusters Figure 2. The plot of S [0] vs number of clusters for input of Fig (g). Here lowest value of S occurs at cluster number 3. Input image Block size Percentage of misclassification of the proposed feature extraction method with k-means clustering Percentage of misclassification of the proposed feature extraction method with fuzzy c-means clustering Percentage of misclassification of Gabor transform [9, 4] with fuzzy c- means clustering Fig. (a) 6X6 6.20 6.20 6.56 Fig. (c) 6X6 3.22 2.9 9.54 Fig. (e) 64X64 0 0 0 Fig. (g) 64X64 0 0 0 Fig. (i) 64X64 0 0 0 Table. Performance of the proposed method based on Hadamard transform in contrast to Gabor transform in terms of percentage of misclassification.