You are on page 1of 7

GVIP Journal, Volume 6, Issue 1, July 2006

Automated Texture Analysis with Gabor filter


Vibha S. Vyas and Priti Rege Electronics and telecommunication Department College of Engineering Pune-5 TelePhone-91-020-25507134, 91-020-25507124 E-Mail vibhavyas@hotmail.com ppr@extc.coep.org.in

Abstract
The texture is very important cue in region based segmentation of images. Texture features play a very important role in computer vision and pattern recognition. Texture Applications include industrial inspection, estimation of object range and orientation, shape analysis, satellite imaging, and medical diagnosis. In this paper, we study of different definitions of texture. The time- frequency transformed based method of texture discrimination, which is in turn based on Gabor filters is done. In Gabor transform, a signal can be represented in terms of sinusoids that are modulated by translated Gaussian windows. The resulting time- frequency decomposition is a suite of local Fourier transforms which displays any nonstationary spectral trends. Here the interrelationship between individual transforms is well-understood and studied. The difficulty in parameter selection for Gabor filter design due to nonorthogonal characteristic of Gabor filters is overcome by real coded genetic algorithm based method. Key words: Gabor filters, Gaussian, human vision system, transforms, Texture discrimination.

Haralick [Haralick79] An image texture is described by the number and types of its (tonal) primitives and the spatial organization or layout of its (tonal) primitives. Faugeras and Pratt [Faugeras80] The basic pattern and repetition frequency of a texture sample could be perceptually invisible, although quantitatively present. In the deterministic formulation texture is considered as a basic local pattern that is periodically or quasi-periodically repeated over some area. Bovik, Clarke and Geisler [Bovik90] An image texture may be defined as a local arrangement of image irradiances projected from a surface patch of perceptually homogeneous irradiances. Jain and Karu [Jain96] Texture is characterized not only by the grey value at a given pixel, but also by the grey value `pattern' in a neighborhood surrounding the pixel. The unit of texture is texels, and the repetitiveness of the texels determines the type of the texture and decides the texture analysis approach. The textures can be classified in various ways. One of the methods is to classify texture as perturbed or un perturbed, An unperturbed texture is basically an image formed of the exact periodic repetitions of some basic pattern in some definite orientation. Typical examples of the unperturbed textures are bricks, fish scales, stripes etc. On the other and, the perturbed textures are formed of texels arranged with arbitrary orientations and random overlaps. Most of the natural textures are the examples of perturbed textures. Figure (1) shows two typical examples of both perturbed and unperturbed textures.

1. Introduction
Texture [1][4] can be seen in many images from multispectral remote sensed data to microscopic photography. Despite its importance, there is no unique and precise definition of texture. Each texture analysis method characterizes image texture in terms of the features it extracts from the image. Therefore, it depends not only on studying the images but also on the goal for which the image texture is used and the features that are extracted from the image. Some standard definitions of texture are as follows: The Longman Dictionary Something composed of closely interwoven elements or an organization of constituent particles of a body or substance; and the visual or tactile surface characteristics and appearance of something (e.g. fabric).
35

GVIP Journal, Volume 6, Issue 1, July 2006

(a) (b) Figure (1): A typical unperturbed texture (a) and a perturbed texture with random orientation and overlaps of texels (b).

In this paper complete emphasis is given on transform based methods of texture analysis. Wavelets are of two types, time-scale and time-frequency. Here, timefrequency type of wavelet, Gabor wavelet is studied and its implementation for texture analysis is explored[2][3]. However, the standard form of wavelet decomposition, based on the translation and scaling of a single mother wavelet , has its limitations when considering general analysis problems. Apart from its lack of shift invariance, it also necessarily links scale and frequency: the size of a given region determines its representative frequencies within the transform. This latter property seems particularly restrictive given that there is no reason in general to assume that the frequency content of an image region should be related to its size. Thus, although the basic advantages of a wavelet approach are wellfounded, the need exists for a form which addresses these limitations. More details can be analyzed in [22] Real coded genetic algorithm is used to select the parameters of the Gabor filter. The organization of the paper is as follows: Section two deals with the originations of the Gabor filters along with the failure of Fourier transform. Third section gives brief explanation for the real coded genetic algorithm for the parameter selection of the Gabor filter. Fourth section gives the results of some of the experimentation made. Section five gives conclusion and sixth section presents the list of the references made.

Figure (2) Qualitative approaches of classifying Textures Quantitative approach is technical way of analysis texture. It is based upon mostly, four ways, Structural approach, Statistical approach, Model based approach, and Transform based approach. Structural approaches [24] represent texture by well defined primitives (microtextures) and a hierarchy of spatial arrangements (macrotexture) of those primitives. This method is elementary and is mostly useful for moderate and highly periodic textures. But most of the real time application textures and natural and hold quite large degree of randomness. Statistical approaches describe textures in a form suitable for statistical pattern i.e. mean, standard deviation moments, histogram, grey level cooccurance metrics (1st order, 2nd order, and higher order). Out of these, coocurance matrix based approach is giving better results but it has limitation of large memory storage requirement, added complexity, and time requirement. Model based approaches tries to capture dependencies among neighboring pixel values by assigning an analytical or mathematical function to the textured images. For example, A.R models, Gaussian Markov model, Gibbs model etc. Transform methods of texture analysis such as Fourier, Gabor and wavelet transforms represent an image in a space whose coordinate system has an interpretation that is closely related to the characteristics of a texture. Here, generally a mother signal/wavelet is there with the property that all other signals can be generated from this by resizing, scaling and addition.
36

2. Gabor Filters
Gabor filters provide means for better spatial localization however their usefulness is limited in practice because there is usually no single filter resolution at which one can localize a spatial structure in natural texture. Evaluation of Gabor Filters can be done by analyzing Human Vision System (HVS) and Gabors theory. 2.1 Human Vision System The phenomenon of perceptual organization [8] enables humans to detect such relationships among image elements as collinearity, parallelism, connectivity, and repetitivity. In computer vision, perceptual grouping is the study of how features are clustered for object recognition. Inspired by biological studies, its purpose is to group feature elements prior to recognition. Perceptual organization has been studied by investigators in psychology in an attempt to classify the behavior of grouping phenomena in the human visual system, with laws of symmetry, proximity, simplicity, closure etc. proposed as the mechanism for grouping features such as edges, corners, regions. The coding of Gabor filter is based on the imitation of HVS. It has been tried to incorporate the same property as HVS for the localized analysis. Simple cells of visual cortex of human have receptive fields (RFs) which are restricted to small regions of space and are highly structured. They are having three important characteristics: Band pass, orientation Selectivity, and Direction selectivity. They respond differently to the stimuli with different spatial frequencies, orientation, and directions. Thes cell can be

GVIP Journal, Volume 6, Issue 1, July 2006

said to be localized spatial filters that response only to certain spatial frequency band, orientations, and directions. It has been observed that most of the cells can be combined in pairs, one cell of each pair has even symmetry and the other has odd symmetry. This observation can be modeled by a cosine function and sine function as wave be the chosen function. R.Fs of both (pair) of cells can be combined in a complex notation (RF is a pattern of photoreceptors that determines the behavior of a cell in visual cortex) as given below exp(ikx)=cos(kx)+i*sin(kx) ------------------(1) The real part corresponds to cell with even symmetry and the imaginary part to the cells with odd symmetry. Thus a biologically motivated filter can be formulated having the characteristics of the visual cortex cell pairs to simulate human vision system for localized filtering operation. Recent studies on Mathematical modeling of visual cortical cells suggest a tuned band pass filter bank structure. These filters are found to have Gaussian transfer functions in the spatial frequency domain. Thus, taking the Inverse Fourier Transform of this transfer function we get the filter characteristics in the spatial domain that closely resembles the Gabor filters. The Gabor filter is basically a Gaussian Band pass filter having spreads of x and y along x and y-axes respectively.

Uniqueness It is very much specific to period and scale Fourier analysis is fast using FFT Relevant for quantification of stationary signals

But it is having disadvantages like: FFT requires the size of the image to be of the power of 2. Problem with boundary condition (in other words after segmentation region can be very well identified but boundary conditions are not defined) Time domain and frequency domain description of a signal are inversely related.

This explanation can be elaborated with the help of Heisenberg uncertainty principle. One of basic principles in classical Fourier analysis is the impossibility to find a function being arbitrarily well localized together with its Fourier transform. There are many ways to get this statement precise. The most famous of them is the so called Heisenberg uncertainty principle, a consequence of Cauchy Schwartz's inequality [12].

4 f (t ) f ( ) -------- (2)

2.2Gabors theory The Gabors theory is based on the failure of Fourier transform. The Fourier transform is a linear combination of trigonometric functions, where the scalars or coefficients are given as inner products between the original signal and each trigonometric function. Each coefficients reveals how much energy the signal contains of that particular (corresponding) trigonometric function. A trigonometric function is the same as a particular frequency Thus; a Fourier transform determines the frequency content of a signal

This inequality becomes equality equation 2 if and only if there exists a function f which is translated and modulated Gaussian. In 1946, Dennis Gabor [13], the inventor of the hologram, proposed the expansion of a wave in terms of Gaussian wave packets. An example of such a wave packet is a sine wave multiplied by a Gaussian function. If a signal is modulated (multiplied) by a Gaussian window of a certain width and central time, then a Fourier expansion of the modulated signal gives a measure of the local spectrum. Clearly such a spectrum is not unique since the width of the Gaussian is arbitrary; but nevertheless, such local spectra are extremely useful. If a collection of local spectra is computed for a suite of window positions, the result is a time-frequency decomposition called a Gabor transform[15]. Furthermore, if the signal can be reconstructed from this decomposition, then a nonstationary filter can be achieved by modifying the decomposition before reconstruction. In this paper we present the theory of the continuous Gabor transform and only an approximate theory for the discrete transform. Gabor observed that there should be a presentation or representation which is local both in time and frequency domain and such a local time and frequency representation should be discrete so that it is better adapted to various applications. Gabor proposed to expand a function into a series of elementary functions, which are constructed from a
37

Figure (4) : The one to one mapping of Fourier transform in both time and frequency domain The Fourier transform [9][10][11][23] have unique mapping of a time domain representation in frequency domain. This is call as one to one mapping. Figure 4 gives a pictorial view of this type of mapping. It is advantageous due to following points.

GVIP Journal, Volume 6, Issue 1, July 2006

single building block by translation and modulation. Equation 3 and 4 gives that phenomenon.

f (t ) =

n , mZ

m,n

g m,n (t )

-------- (3)

g m ,n (t ) = g (t na )e 2imbt , m, n Z ----- (4)


It is shifted and modulated copies of a single building block g. Each g m,n has an envelope of the shape of g. Figure(3) gives the plotting of Gabor filter coefficient and Figure(5) presents mapping of Gabor coefficients in joint time- frequency plane.

Figure (5) For a fixed function g and time and frequency parameters a,b>0, typical set of Gabor functions are presented. If g is localized at the origin in the time frequency plane, then g (m,n) is localized at the point (na,mb).For appropriate lattice constants a,b the g (m,n) covers the whole time frequency(see Figure 6 also).

Few other important features of Gabor filters are; lower bound of uncertainty principle, Min entropy, and non orthogonality. The Heisenberg inequality becomes equality if and only if there exist a function Which is translated and modulated Gaussian(which is the function present in Gabor filter) Balian-Low analyzed the uncertainty principle for discrete Gabor transform. The non uniqueness of the non-orthogonal wavelet decompositions provides different entropy values. Orthogonality means that if the component of a vector V1 along V2 is C12 *V2, then the magnitude of C12 is an indication of the similarity of the two vectors. Orthogonal vectors / signals are independent vectors. Daugman showed that the computation of transform is complicated due to non-orthogonality. It gives rise to two types of redundancy Coefficient redundancy: Refers to the bigger size of the transform domain. Information redundancy: refers to the quantity of information in the transform domain measured through entropy calculation. Gabor elementary functions [6] overlap each other introducing coefficient redundancy between neighboring coefficients. Due to non-orthogonality there is no straight forward method of finding the parameter valves of the Gabor filter. The parameter values depend upon the texture (its orientation and frequency of repetition of the texels) which is to be identified by a particular set of Gabor filters [7]. There are various ways, like least mean square method, Neural Network based method to find the parameters of the Gabor filter. Here real coded genetic algorithm is used to get the parametric values of the Gabor filter[6,7].

3. Parameter selection of Gabor filter


The set of 2-D Gabor filters have been proved to be appropriate for texture segmentation in several senses. They have 1. Tunable orientation and radial frequency bandwidths 2. Tunable center frequencies and orientations. 3. They optimally achieve joint resolution in space and spatial frequency domains. Gabor filters can be configured to have various shapes, bandwidths, center frequencies and orientations by the adjustment of suitable parameters. By varying these parameters a filter can be made to pass any elliptical region of spatial frequencies. g(x,y)=

Figure (6): If g and its Fourier transform are essentially localized at origin, then g m,n is essentially localized at (na,mb) in the time-frequency plane. Each expansion coefficient represents amount of information By considering the above theory Gabor filter was formulated which was Gaussian function modulated by exponential sinusoids.
38

1 x2 y2 + 2 exp 2 2 x y 2 y x 1

exp[2jWx ]
------------------- (5)

x = x cos + y sin y = x sin + y sin

Where x and y are the scaling parameters of the filter and determine the effective size of the neighborhood of a pixel in which the weighted summation takes place. (

GVIP Journal, Volume 6, Issue 1, July 2006

[0, ]) specifies the orientation of the Gabor filters. W


is the radial frequency of the sinusoid. A filter will respond stronger to a bar or an edge with a normal parallel to the orientation of the sinusoid. The Fourier transform of the Gabor function in (1) is given by

1 (u W )2 v2 G (u, v) = exp + 2 v2 2 u

Algorithm simulates the functioning of the single-point binary crossover in the continuous space based on the probabilistic distribution of the outputs of a Binary Crossover. Let us consider the crossover operation, where we encode some integers into 7-bit strings. Table 1 shows the operation of crossover and the decoded values of the parents and children. Table 2 gives illustration of mutation operation. Before Crossover 1101011 111100 1010101 100010 After Crossover 1101011 100010 1010101 111100

------------------------- (6) Where u = 1/2x, v = 1/2y. The Fourier domain representation in (6) specifies the amount by which the filter modifies each frequency component of the input image. Gabor filters act as local bandpass filters. Fig. 3 shows four Gabor filters [14] with different parameter settings in frequency domain. Each filter is fully determined by choosing the four parameters in = {, W, x, y}.

Table 1: Crossover Operation Before Mutation 1101011 111100 Table 2 Mutation Operation Parent Decoded Children String value String A1B1 :1010 85 A1B2 :1010 101 011 A2B2 :0110 51 A2B2 :0110 011 101 Average 68 Table 3: Single Point Binary Crossover Decoded value 83 53 68 After Mutation 1101011 101011

G(u,v)

(u) (v)

Figure (7): Family of 8 Gabor filter bank plotted in freq. domain, with 4 orientations of 0, 90, 135, 45, combined with 8*1.414 and 16*1.414 freq 3.1The Real coded Genetic Algorithm ( RcGA) The Simple Genetic Algorithms are search algorithms based on the mechanics of Natural Selection and Genetics. Here a number of parameters are encoded into a bit-string called a Genotype. An initial Population is created by taking a number of such genotypes, which are randomly selected in the search space. This algorithm combines the Survival of the Fittest strategy with a Structured yet Randomized form of Information Exchange for generating new bit-strings in the Next Generation using some Genetic Operators. In every generation a new creature (bit string) is formed using bits and pieces of the fittest of the old. Occasionally a new part (a mutated creature) is tried for good measure. The Binary coded Genetic Algorithm [5][16] works successfully in discrete search spaces and the performance largely depends on the coding used to represent the problem variables. In solving optimization problems having continuous search space, binary-coded Genetic Algorithms discretize the search space by using a coding of the problem variables in binary strings. However, the coding of Real Variables into finite length bit strings leads to the inability to reach the solution with arbitrary precision. The problem of Optimization in continuous search space is dealt with a number of RcGAs, whose crossover operators are however found to have inadequate search power. A RcGA simulates the singlepoint binary crossover of the simple genetic algorithms.

It is observed from the Table 3 that the decoded values of the parent strings have been decreased by the same amount to create the children and the average of the decoded values of the parent and the children strings are the same. Here, the distance between the strings has shrunk in the next generation. Similarly, this distance can also expand creating children on the other sides of the parents. The term spread factor is defined as the ratio of the distances between decoded children (c1 and c2) and parent (p1 and p2) strings given by, = (c1-c2)/(p1-p2) ---------------(8) Now, we define all crossovers having >1 as expanding crossovers and <1 as contracting crossovers and that with =1 as stationary crossovers. Deb derives the probability distributions of the expanding [e()] and contracting [c()] crossovers as, e ()=0.5(n+1) 1/( (n+2) ) c ()=0.5(n+1) n ------------------(9)

Where, n denotes the resolution in the search space. For implementing the simulated binary crossover, we simply generate two random numbers between 0 and 1. The first one gives the probability and the second one determines the type of crossover, that is, whether expanding or contracting. The search power of the simulated binary crossover operator is evaluated by Deb and is seen to perform as good as or even better than the conventional binary coded genetic algorithm. For the purpose of filter bank parameter tuning [18][19], the RcGA with simulated binary crossovers are used. The convergence of the Genetic Algorithm [16] ensures proper clustering of
39

GVIP Journal, Volume 6, Issue 1, July 2006

the textural feature vectors in the feature space. However, we have tuned the filter bank parameters by clustering only a few feature vectors and the algorithm is stopped once the maximum misclassification comes down to lower than five percent. So, there may be overlaps between clusters.. Hence, a classifier based on Artificial Neural Networks will be a proper choice in this case, which can approximate the cluster separation surfaces by forming convex hulls in multi-dimensional space[17]. Features are extracted from the sample images by the optimized filter bank parameters at a number of pixel positions interleaved by 7 pixels both row wise and column wise.

4. Results
For the implementation of the supervised texture segmentation algorithm, textured images from the Brodatz texture database [1] are used. Every textured image is preprocessed by median filter and averaging filter to minimize the effect of noise. If content of noise increases to the extant that image turns to be perturbed, then the Gabor filter scheme may not give optimum results. It has to be noted that Gabor filters are very sensitive to scale, orientation and frequency of the texture. If any of these are affected due to noise, then Gabor filter bank may not even detect the particular texture. The filter bank parameter tuning, texture feature extraction and texture classifier design are performed as discussed in the previous sections. The multi-textured image is processed by the tuned filter bank and the textural features are extracted for each pixel position[17]. The pixels are labeled to be belonging to certain texture classes as classified by the K mean clustering algorithm [20]. The classified image is further processed where the pixel label is set to that which occurs maximum times in its 11 x 11 neighborhood. This ensures the removal of classification noise thereby enhancing the segmented image. Results are present in Figure 8. (c)

(d) Figure 8(a, b, c, d): Few results of segmentation achieved by Gabor filter bank on natural textures.

5. Conclusion
The filter is characterized by a preferred orientation and a preferred spatial frequency. Roughly speaking, a 2-D Gabor filter acts as a local band-pass filter with certain optimal joint localization properties in the spatial domain and in the spatial Frequency domain [1]. Typically, an image is filtered with a set of Gabor filters of different preferred orientations and spatial frequencies that cover appropriately the spatial frequency domain, and the features obtained form a feature vector field that is further used for analysis, classification, or segmentation. Gabor feature vectors[21] can be used directly as input to a classification or a segmentation operator or they can first be transformed into new feature vectors that are then used as such an input. Texture segmentation involves subdividing an image into different textured regions. Many texture filter bank model where the filters called Gabor filters are derived from Gabor elementary function. The goal is to transform texture differences into detectable filter output discontinuities at texture boundaries. By locating these boundaries, one can segment the image into differently textured regions. Distinct continuities occur how ever,
40

(a)

(b)

GVIP Journal, Volume 6, Issue 1, July 2006

only if the Gabor filter parameters are suitably chosen. For the segmentation, it is assumed that an image contains two different textures and that prototype samples of the textures are given a priori. We considered the problem of designing Gabor filters for textural segmentation. For natural textures which have wide verity, no elective systematic method existed previously for designing effective Gabor filters. Given a texture pair of interest the method gives the optimal Gabor filter for segmenting an image made up of these textures. The method is based on a decision theoretical formulation and requires representative samples of the texture of interest. The resulting filters are optimal in the sense that they minimize the probability of incorrectly assigning image pixels to regions based on the filter output.

References
[1] P.Brodatz, textures: A photographic album for artists and designers New York: Dover, 1966 pp.735-747, 2002. [2] T.N. Tan, Geometric Transform invariant Texture Analysis, SPIE, Vol. 2488, pp475-485 (1995). [3] R. Chellappa and R.L. Kashyap and B.S. Manjunath, Model Based Texture Segmentation and Classification, in Handbook of Pattern Recognition and Computer Vision (C. H. Chen, et. al., Eds) pp.277-310 (1993) [4] D. Gabor, Theory of Communication, J. Inst. Elect. Eng London, 93 (III), pp 429-457, 1946. [5] M. Srinivas and L. Patnaik, Genetic algorithms: A survey, IEEE Comput., vol. 27, no. 6, pp. 1726, Jul. 1994. [6] Alan C. Bovik Properties of Multichannel Texture Analysis Filters, IEEE CH2847-2/90/0000-2133 1990 [7] V.Vyas et al, rotation and scale invariant feature extractors, Banglore CD Tencon 2003 [8] D. J. Field, Relation Between the Statistics of Natural Images and the Response Properties of Cortical Cell, J. Opt. Soc. Am. A. 4, pp2379-2394 (1987). [9] A. C. Bovik, N. Gopal, T. Emmoth, and A. Restrepo, Localized Measurement of Emergent Image Frequency by Gabor Wavelets", IEEE Trans. on Inf. Theory, 38, 2,691-712(1992). [10] A. Bovik, M. Clark, W. Geisler, Multichannel texture analysis using localized spatial filters, IEEE transactions on Pattern Analysis and Machine Intelligence, Vol 21,no. 1, pp. 55-73, 1990. [11] A. K. Jain and F. Farrokhnia, Unsupervised texture segmentation using Gabor filters, Pattern Recognition, 24(12), pp. 1167-1186, 1991. [12] P. Olver, Applications of Lie groups to Diff. Equations, Springer-Verlag, 2nd Edition 1993. [13] B. S. Manjunath and W. Y. Ma, Texture features for browsing and retrieval of data,IEEE Trans. Pattern Analysis Machine Intelligence, Vol. 18, no. 8, pp. 837842, 1996. [14] Dennis Dunn, And William E. Higgins, Optimal Gabor Filters For Texture Segmentation, IEEE Transactions On Image Processing, Vol 4, No 7, pp 947961 July 1995 [15] B. S. Manjunath and W. Y. Ma, Texture features for browsing and retrieval of data, IEEE Trans. Pattern Analysis Machine Intelligence, Vol. 18, no. 8, pp. 837842, 1996.
41

[16]. K. Deb and R.B. Agarwal, Simulated Binary Crossover for Continuous Search Space, Journal of Complex Systems, Vol. 9, pp. 115-148, 1995 [17]. Stephen R. Yhann and Tzay Y. Young, Boundary Localization in Texture Segmentation, IEEE Transactions on Image Processing, Vol. 4, No.6, pp. 849856, June 1995 [18]. Gregory F. Ashby and Namcy A. Perrin, Toward a Unified Theory of Similarity and Recognition, Psychological Review, Vol. 95, No. 1, pp. 124-150, 1988. [19]. Amos Tversky and Itamar Gati, Similarity, Separability, and the Triangle Inequality, Psychological Review, Vol. 89, No. 2, pp. 123-154, 1982. [20] R. P. W. Duin, PRTools version 3.0 A Matlab toolbox for pattern recognition, January 2000. [21] J. P. Havlicek, A. Bovik, D. Chen, AM-PM Image Modeling and Gabor Analysis, Visual Information Representation, Communication, and Image Processing(C. H.Wen, Y.Q. Zhang, Eds.), New York, Marcel Dekker, pp.343-386, 1999. [22] Tao-I Hsu; Wilson, R Texture analysis using a generalised wavelet transform; Image Processing, Proceedings. ICIP-94., IEEE International Conference Page(s):436 - 440 Vol.3, 13-16 November. 1994 [23]Texture feature based on local Fourier transform Feng Zhou; Ju Fu Feng; Qing Yun Shi; Image Processing, 2001. Proceedings. 2001 International Conference on image processing Page(s):610 - 613 Vol.2 , 7-10 October. 2001 [24]Robert M. Hawlick Statistical and Structural Approaches to Texture Proceedings Of Vol. 67, No. 5, May 1979

You might also like