Learning to Classify Texture Objects by Particle Swarm Optimization Algorithm

: Texture is an important visual attribute used to describe images. There are many methods available for texture analysis. However, most of these methods are object to variant rotation and changing scale of the images. Hence, this study presents a novel approach for texture analysis. The approach applies the Particle Swarm Optimization Algorithm in learning the texture filters for texture classifications. In this approach, the texture filter is regarded as the particle; the population of particle is iteratively evaluated according to a statistical performance index corresponding to object classification ability and evolves into the optimal filter using the evolution principles of Particle Swarm Optimization Algorithm. The method has been validated on aerial images and results indicate that proposed method is feasible for texture analysis


INTRODUCTION
Image texture, defined as a function of the spatial variation in pixel intensities, is useful in a variety of applications and one of the most important visual attributes for image analysis and machine vision, an immediate application of image texture is the recognition and description of image regions using texture properties (Rafael and Richard, 2010).Although there is no strict definition of the image texture, it is easily perceived by humans and is believed to be a rich source of visual information.Generally speaking, textures are complex visual patterns composed of entities or sub patterns that have characteristic brightness, color, size, etc., Rosenfeld and Kak (1982).
Feature extraction is the first stage of image texture analysis.Results obtained from this stage are used for texture discrimination, texture classification or object shape determination (Materka and Strzelecki, 1998).A wide variety of methods have been proposed to characterize texture images.These methods can be divided into 4 main categories: structural, statistical and model-based and transform (Reed, 1993;Materka and Strzelecki, 1998).
In general, structural approaches represent texture by well defined primitives and a hierarchy of spatial arrangements of those primitives (Alaa and Alyaa, 2011).The advantage of the structural approach is that it provides a good symbolic description of the image.Hence, the structural approach is suitable for regular structural texture analysis rather than more natural texture analysis in practice (Materka and Strzelecki, 1998).In contrast to structural methods, statistical approaches represent the texture indirectly by the nondeterministic properties that govern the distributions and relationships between the grey levels of an image.The most popular statistical features for texture analysis are derived from the so-called co-occurrence matrix.The approach based on multidimensional co-occurrence matrices was shown to have good performance when applied to texture classification (Valkealathi and Oja, 1998).
Model based texture analysis attempts to interpret an image texture by use of generative image model and stochastic model.The fractal model has been shown to be useful for modeling some natural textures.However, it lacks orientation selectivity and is not suitable for describing local image structures (Materka and Strzelecki, 1998).
Transform methods of texture analysis, such as Fourier, Gabor and wavelet transforms represent an image in a space whose co-ordinate system has an interpretation that is closely related to the characteristics of a texture.However, due to its lack of spatial localization, Fourier transform has bad performance in practice, in addition, Gabor filters is limited in practice because there is usually no single filter resolution at which one can localize a spatial structure in natural textures.
Although many approached have been proposed to extract texture feature, a major problem with the application of texture analysis to practical work is that textures in the real world are often not uniform, due to changes in orientation, scale or other visual appearance.Hence, how to extract robust texture features has been a hot topic in the field of texture analysis.Therefore, many scholars have been attempting to find robust texture features.In the past years, some researchers presented some approaches based on Gabor filters (Weldon et al., 1996) autoregressive random field model (Pietikäinen et al., 2000) and local binary patterns (Zhenhua et al., 2010) to extract texture features which are invariant to changes in rotation or scale.Unfortunately, the degree of computational complexity of these proposed texture measure is high.In order to solve the problem, You and Cohen (1993) presented some new methods to extract a robust texture feature by guided search procedure.Furthermore, to overcome the problem of local optimum, Zheng employed Genetic Algorithms (GA) (Zheng and Zheng, 2001), Artificial Immune System (AIS) (Zheng et al., 2004), respectively for the purpose of solving the problem.They produces a single 5×5 mask that captures a common feature of a single texture at different rotations and scales, while maximally discriminating the feature of a texture from the other textures.In their methods, the principle that texture statistic utilized to represent the texture feature is the normalized "texture energy" derived from Law's approach, i.e. the variance or mean of pixel gray scale within a 9×9 window, which is generated by convolution with the optimal texture filter obtained from task-aimed training.Their experimental results on texture images indicated that optimal texture filters could be employed to extract robust texture features which were invariant to orientation and scale changes of the texture.
Due to weak ability of local searching of GA's and AIS and the complexity of texture objects on aerial images, sometimes it is difficult to acquire one optimal texture filter.Moreover, the filters are composed of realnumber, GA and AIS needs to solve these problems with binary coding which will increase workload of tuned filter.In order to overcome these drawbacks, this study presents a novel methodology to learn optimal tuned filter by the medium of employing Particle Swarm Optimization algorithm (PSO) (Kennedy and Eberhart, 1995).
This study has presented a novel approach of texture feature extraction for classifying and detecting texture objects from aerial imagery using the learning techniques based on PSO.The performance of PSO algorithm is evaluated in real aerial texture images and compared to co-occurrence matrices.The results show that the PSO algorithm solution quality is satisfied in test images, which indicate that the proposed PSO algorithm is an attractive alternative for solving the "tuned" filter problem.

TEXTURE FEATURE EXTRACTION BASED ON TUNED FILTER
In order to improve the classification accuracy and reliability the Laws' masks, You and Cohen (1993) proposed the model to extract texture feature called tuned filter.The robust texture energy feature invariant to rotation and scale changes can be extracted by employing the "tuned" filter.Basically the procedure to extract the robust texture energy feature consists of two steps.The first step involves convolving the whole image by the "tuned" filter.The 2D convolution of the image I (i, j) and filter A (i, j) with size (2a+1) × ( 2a+1) is given by (1) Zheng and Zheng (2001): Usually the elements of the filter are required to be symmetrical and be zero sums.The second step is to calculate the mean within a w x × w y window at pixel (i, j).The mean is defined as the texture energy E(i, j) at the point.It is given by ( 2 where, P 2 = ∑ ‫ܣ‬ , (i , j) 2 for an image, a large number of energy values can be obtained, then the mean value of these energy values are calculated to represent the energy value of the image.Obviously, the filter is the key to achieve energy value of the image.This study presents the approach to generate robust "tuned" filter by using PSO algorithms, which will be detailed in section 4. Kennedy and Eberhart (1995), motivated by social behavior of organisms such as bird flocking and fish schooling (Eberhart and Kennedy, 1995).In PSO, the potential solutions, called particles, fly through the problem space by following the current optimum particles.Compared to GA, the advantages of PSO are that PSO is easy to implement and there are few parameters to adjust.PSO has been successfully applied in many fields: function optimization, artificial neural network training (Van Den Bergh and Engelbrecht, 2000), fuzzy system control and other areas where GA can be applied.

Particle swarm optimization algorithm: Particle Swarm Optimization algorithm (PSO) is an evolutionary computation technique developed by
In PSO, each single solution is a "bird" in the search space.We call it "particle".All of particles have fitness values which are evaluated by the fitness function to be optimized and have velocities which direct the flying of the particles.The particles fly through the problem space by following the current optimum particles.
Supposed that D is the dimension of the search space, a search group is constituted by m particles.The i-th particle is a vector X = (x i1 , x i2 … x id ), i = 1, 2,… m in D dimension search space.PSO is initialized with a group of random particles (solutions) and then searches for optima by updating generations.Each particle's movement is influenced by its local best known position and is also guided toward the best known positions in the search-space, which are updated as better positions are found by other particles.This is expected to move the swarm toward the best solutions.That is, at each iteration each particle is updated by following 2 "best" values.The first one is the best solution (fitness) it has achieved so far.(The fitness value is also stored.)This value is called P best[] = (P i1 , P i2 ,.. P id ).Another "best" value that is tracked by the particle swarm optimizer is the best value, obtained so far by any particle in the population.This best value is a global best and called G best[] = (P g1 , P g2 ,.. P gd ).After finding the 2 best values, the particle updates its velocity and positions with following (3) and ( 4): Particles' velocities on each dimension are clamped to a maximum velocity V max .If the sum of accelerations would cause the velocity on that dimension to exceed V max , which is a parameter specified by the user, then the velocity on that dimension is limited to V max .

THE PROPOSED METHODOLOGY
Encoding schema: The encoding schema of using PSO to search the optimal tuned filter is as below.In this study, a search space of M-dimension for a filter of 25 elements is set up.Each dimension has continuous set Fig. 1: A sample of a 2D filter of possible values.As it is pointed out in Zheng and Zheng (2001) that symmetrical filter has almost the same effect with asymmetrical filters and suggest employing the symmetrical filter to avoid a mass of computation.Hence, the symmetrical filter is used in the study.And because the filter is 5×5 and requires being zero sum, so only 10 parameters in a filter are encoded.That means M is 10 and each particle has 10 position vectors as well as 10 velocity vectors .The layout of parameters of the filter plays the most important role in the texture feature extraction rather than their values, we can randomly set the range of the parameters.Here the range of position parameters is set [-50, 50], an example of a filter is shown in Fig. 1.
The elements of center column can be acquired by ( 5): a i3 = -2 (a i1 + a i2 ) i= 1 ,2 ,3 ,4 ,5 (5) Fitness function: PSO needs to define a function which measures the overall classification quality of the tuned filter and guide the algorithm to search the optimal solution.To classify different texture good classification result should appeal to that the difference of the energy value of the same texture category should be small and the difference of the energy value of the different texture category should be great as far as possible.Therefore, Fisher discriminant criterion is employed as fitness function which is described as (6): where, ߤ : A mean σ 2 : A variance Subscripts : The two classes, which implies that the between-class scatter is maximum while the within-class scatter is minimum and the discrimination is optimal Learning algorithms description: • Randomly generate a population of particles which represent a set of filters, here each particle is with 10-d position and 10-d velocity.
• Convolve the training images by the filter and evaluate the fitness function of each particle in the population with Eq. ( 6).
• Calculate the G best position of the population and update P best position of each particle • According the new G best and P best particle update it's velocity and position with Eq. ( 3) and ( 4).• Repeat Steps 2-4 until a given termination condition is met.In general, a fixed maximum number of iteration is allowed as the termination condition The procedure of the proposed method is shown in Fig. 2.
Object detection procedure based on the optimal tuned filter: After learning procedure, the acquired optimal filter can be used to classify and recognize texture images.Firstly, according to Eq. ( 1), convolve the test image by the optimal filter.Secondly, calculate the mean within a (2a+1) × (2a+1) window at each pixel (i, j) with Eq. ( 2) where a = 4, thirdly, compare the energy value of the pixel to the learned the energy is greater than the threshold, it is recognized as object, or it is recognized as background.

EXPERIMENTAL RESULTS
In order to evaluate the proposed method, kinds of experiments are carried out on real aerial images, the first is texture image classification and the second is texture object detection.In the first experiment two kind of aerial images are selected as the training textures to generate the "tune images consist of 10 habitation texture images and 10 farming land texture images, which are selected from real aerial images.Some sample images are showed in Fig. 3, the first row in Fig. 3 is habitation texture and the second row in Fig. 3 is farming land texture.The orientations and scales of these texture images are different.After acquiring the optimal filters by training images, that is, the mean energy of 10 training images is used as samples standard, then two are to be classified by minimum distance classifier with each kind containing 20 images.
The major control parameters used in the experiment is: the window size to compute the energy is 9×9, the size of training image is 100×100 pixels, the population size is M = 20 and C 1 = C 2 = 2.0, The inertia weight is set to from 0.4 to 0.1 in the way of linear decline, the Vmax is set to 50, the maximum number of iteration is 100.
In addition, the proposed method is compared to traditional texture methods namely co matrices.It is calculated the joint probability distribution between pairs of pixels at a given distance and direction.In the experiment, we consider distance of 5 pixels with angles of 0, 45, 90 and 135.The procedure of the proposed method is shown in Object detection procedure based on the optimal After learning procedure, the acquired optimal filter can be used to classify and recognize images.Firstly, according to Eq. ( 1), convolve the test image by the optimal filter.Secondly, calculate ) window at each = 4, thirdly, compare the energy value of the pixel to the learned threshold, if the energy is greater than the threshold, it is recognized as object, or it is recognized as background.

EXPERIMENTAL RESULTS
In order to evaluate the proposed method, two kinds of experiments are carried out on real aerial images, the first is texture image classification and the second is texture object detection.In the first kind of aerial images are selected as the training textures to generate the "tuned" filter.These images consist of 10 habitation texture images and 10 farming land texture images, which are selected from real aerial images.Some sample images are showed in Fig. 3, the first row in Fig. 3 is habitation texture and .3 is farming land texture.The orientations and scales of these texture images are different.After acquiring the optimal filters by training images, that is, the mean energy of 10 training images two kinds of image to be classified by minimum distance classifier with The major control parameters used in the experiment is: the window size to compute the energy is 9×9, the size of training image is 100×100 pixels, the = 2.0, The inertia weight is set to from 0.4 to 0.1 in the way of linear decline, the Vmax is set to 50, the maximum number of In addition, the proposed method is compared to traditional texture methods namely co-occurrence matrices.It is calculated the joint probability distribution between pairs of pixels at a given distance and direction.In the experiment, we consider distance and 135.Energy,   entropy, correlation, homogeneity and contrast were calculated from these matrices to compose a 20dimensional feature vector.Table 1 display the best result of texture energy of the training textures using the "tuned" filter through PSO.In the Table 1, the average energy of habitation image is 0.014683; as well the average energy of farm land image is 0.058617.Obviously these two types of texture images can be easily discriminated with the simplest classifier of minimum distance.It proves that proposed method performs well in learning tuned filter.In addition, Table 2 presents the comparison of the texture methods on the real aerial images.It is noted that PSO is a stochastic search algorithm, hence, the classification rate listed in Table 1 is the average produced by algorithm with 10 times running.
In Table 2, "17/20" means that there are 17 images are correctly classified among 20 images.As is shown in Table 2 that the proposed method can provide the better success rate than that of co-occurrence matrices method.Moreover, texture image detection is also conducted in the second experiment, the procedure is detailed in 4.4 of this study, 2 images are tested in the experiment and detected results are shown in Fig. 4. In Fig. 4a, the area of water is the object to be detected and Fig. 4b is the result of detection, in Fig. 4b the area of water is marked with black color and the rest is marked with white color, in addition, in Fig. 4c the plant is the object to be detected and Fig. 4d is the result of detection, in Fig. 4d only the plant is marked with black color.
From Fig. 4, the texture objects with different sizes and orientations in the image have been detected.Comparing to manually detected results, the correction rate reaches 91.2 and 90.3%, respectively.

CONCLUSION
This study has presented a novel approach of texture feature extraction for classifying and detecting texture objects from aerial imagery using the learning techniques based on PSO.The performance of PSO algorithm is evaluated in real aerial texture images and compared to co-occurrence matrices.The results show that the PSO algorithm solution quality is satisfied in test images, which indicate that the proposed PSO algorithm is an attractive alternative for solving the "tuned" filter problem.Proper selection of control parameters for an application of PSO is still an open issue.In this study only the fixed population size and generation number is taken.As for short term future work, further experimentations with the adaptive parameter settings of the PSO are necessary.In addition, we plan to further implement more properties of PSO and other swarm intelligence algorithms for better results and exploit more applications for image processing.
Res. J.Appl.Sci.Eng.Technol., 5(3): 990-995, 2013   993    position of the population and of each particle.bestposition, the velocity and position with 4 until a given termination condition is met.In general, a fixed maximum number of d as the termination condition.

Fig. 2 :
Fig. 2: Flow chart of the proposed method

Fig. 4 :
Fig. 4: Results of texture object detection )) The position of the particle i at time t.It has D coordinates v id (t) : The velocity at time t.It has D components P id (t) : The previous best position, at time t.It has D coordinates P gd (t) : The best previous best position found in the neighborhood.It has D coordinates r 1 & r 2 : Random numbers between (0, 1) c 1 & c 2 : Positive constant parameters, usually c 1 = c 2 = 2

Table 2 :
Classification result with two methods