An Optimization Clustering Algorithm Based on Texture Feature Fusion for Color Image Segmentation

We introduce a multi-feature optimization clustering algorithm for color image segmentation. The local binary pattern, the mean of the min-max difference, and the color components are combined as feature vectors to describe the magnitude change of grey value and the contrastive information of neighbor pixels. In clustering stage, it gets the initial clustering center and avoids getting into local optimization by adding mutation operator of genetic algorithm to particle swarm optimization. Compared with well-known methods, the proposed method has an overall better segmentation performance and can segment image more accurately by evaluating the ratio of misclassification.


Introduction
Image segmentation is a process of dividing an image into different regions such that each item in the same class is as similar as possible whereas items in different classes are as dissimilar as possible.It is a key in image analysis and pattern recognition.However, because of the variety and complexity of images, image segmentation is still a very challenging task.
Fuzzy c-means (FCM) algorithm is one of the most widely used methods for color image segmentation.However, the selection of the initial parameters of standard FCM usually influences the clustering results greatly.Moreover, it does not consider any spatial information in image context, which makes it very sensitive to noise.To minimize the disadvantages of standard FCM, various modified FCM algorithms have been proposed.A comprehensive comparative analysis of kernel-based fuzzy clustering and fuzzy clustering is presented [1,2].It introduces enhanced FCM clustering algorithms with spatial constraints for noisy color image segmentation.The Rank M-type L (RM-L) and L-estimators are used to obtain the sufficient spatial information of the pixels [3].A robust modified FCM is presented by introducing a non-local adaptive spatial constraint term into the objective function [4].An algorithm for fuzzy segmentation of MRI data by using two fuzzifiers used in interval type-2 FCM and a spatial constraint on the membership functions is present [5].
Most of the above methods are dependent on separate features to complete segmentation.If inadequate features are used, even the best classifier could fail to achieve accurate segmentation.So it is important that how to effectively choose image features.Recently, the local binary pattern (LBP) operator has received considerable attention.It has been successfully applied to computer vision tasks, such as texture classification [6], face recognition [7][8][9], object detection [10,11], and fingerprint matching [12].It is a non-parametric kernel which summarizes the local structure around a pixel and provides a unified description, including statistical and structural characteristics of a texture patch.
Particle swarm optimization (PSO) has been suggested by Kennedy and Eberhart [13].It is inspired by certain social behavior of bird flocking or fish schooling.When used for solving the optimization problem, PSO makes every particle fly through the solution space with a certain trajectory.Under the guidance of its own or its neighbor's experience, each particle will gradually fly into the potential area of global optimum [14].PSO is gaining more and more attention due to its fast convergence rate, simple algorithmic structure and strong global optimization capability.It has been applied to solve varieties of optimization problems successfully [15][16][17].
In this paper, we introduce an improved FCM segmentation algorithm for color images.We choose LBP, the mean of the min-max difference, and color features as a segmental feature vector.It is a more accurate description of multi-feature.In the clustering stage, we use an improved PSO method to optimize the initial clustering centers.PSO is used to ensure that the search converges faster, and we add mutation operator into PSO to make the search jump out of local optima.Subsequently, we use FCM algorithm to complete color image segmentation.The experimental results show that the proposed method has a better segmentation performance.
The rest of the paper is organized as follows.Section 2 introduces LBP operator and analyzes the drawbacks of LBP operator.Section 3 describes the PSO algorithm.Section 4 presents the proposed method.Section 5 compares the proposed algorithm with some existing methods.Section 6 gives concluding remarks.

LBP Texture Operators
The LBP operator was first introduced by Ojala et al. [18].It labels the pixels of an image by considering the difference between the grey values of the pixel x from the grey values of the circularly symmetric neighborhood and considers the results as a binary number.Given a pixel, LBP code can be expressed in the decimal form as equation ( 1), (2).
Where   corresponds to the grey value of the center pixel of a local neighborhood and   to the grey value of N equally spaced neighboring pixels.It produces 2 P different output values, corresponding to the 2 P different binary patterns.The 2 P different binary patterns codify local primitives including different types of curved edges, spots, flat areas, etc.So each LBP code can be regarded as a micro-texture.The result over the 3 × 3 neighborhood as a binary number is described as follows (Figure 1).

Figure 1. The computational process of local binary pattern (LBP) code
We can see that the LBP code is robust against illumination changes and very fast to compute, and does not require many parameters to be set.However, LBP cannot describe the characteristics of textures efficiently and completely.In Figure 2, the first structure of (a) and (b) is possibly a flat area, and the second structure is possibly an edge or a spot.However, the value of LBP is uniform.So LBP ignores the contrastive information while the different contrast is an important feature of texture.

The PSO Algorithm
Particle swarm optimization is an evolutionary optimization technique created by inspiring behaviors such as fish schooling and bird flocking.The system is initialized with a population of random solutions and searches for optima by updating generations.
Suppose that the search space is D-dimensional.At the beginning of the PSO process, the position   = { 1 ,  2, … ,   } and the velocity   = { 1 ,  2, … ,   } of each particle are randomly created.
Every particle in the swarm is a part of the solution set.  = { 1 ,  2, … ,   } is the best position discovered by the ith individual. ̂= { ̂1,  ̂2, … ,  ̂} stands for the global best position searched by the whole swarm.In each iteration,   and   are updated using the following equation ( 3), (4).
( + 1) =   () +   ( + 1) Where  1 and  2 are the acceleration coefficients which determine the extent of stochastic weighting for the cognitive and the social components individually. 1 , 2 are two random numbers generated by uniform distribution in the range [0,1] separately.The inertia weight  is employed to control the impact of the previous history of velocities on the current velocity.The linear decreasing method is represented as equation (5).
is maximum iteration time. is current iteration time.  and   are maximum and minimum inertia weight respectively (it is set for   = 0.9,   = 0.4).The inertia weight is decreased linearly with increasing iterations.The solution quality is measured by the fitness function.The fitness value of each particle is calculated by the objective function.The values of   and  ̂ are then evaluated and replaced if a better particle best position or a better global best position is obtained.The smaller objective function is, the better fitness value is, given that objective function is expressed as equation (6).The fitness value is represented as equation ( 7) (to avoid zero in the denominators, σ = 0.001).
The personal best position of each particle is defined as equation (8).
Then we can use the standard procedure to find the optimum.The searching is a repeated process, and the stop criteria are that the maximum iteration number is reached or the minimum error condition is satisfied.

Feature Extraction
Given that a RGB color image is commonly represented as array  ×  ×  where every pixel   (, ) is a vector of integer values between the interval of [0, 255] (for color image  = 3).LBP code of   (, ) is represented as (, ).We combine LBP code of color components as equation (10).
To consider contrastive information, we use the mean of the min-max difference to discriminate the incorrect instance of LBP of Figure 2. S represents the mean of the min-max difference in equation (11).In the flat area, the mean of the min-max difference is nearly 0. For edges or spots, the mean of the min-max difference is larger.Therefore, it can reflect the change of contrastive information.In equation (11), √3 limits the values in the interval of [0, 255].
We use LBP, the mean of the min-max difference, color components as segmental features, and merge above features as feature vector (f 1 (i, j), f 2 (i, j), f 3 (i, j), LBP, S).

Improving FCM Algorithm
PSO takes real numbers as particles.It is theoretically simple and can be implemented in a few lines of code.But PSO easily gets stuck in local optima.An effective way to overcome premature convergence of basic PSO is to maintain the population diversity for exploring the new search domain during the evolution process.We propose an improved optimization algorithm by adding mutation operator of genetic algorithm (GA) to PSO.The hybrid algorithm combines the standard velocity and position update rules of PSO with mutation operator from GA and makes the search jump out of local optima.
To improve the FCM algorithm, we utilize the texture information for each pixel to define a spatial constraint term, and then introduce this spatial constraint term into the objective function of FCM.The modified objective function can be expressed as equation ( 12) To add spatial information, we use the above feature vector to complete clustering.  is a membership matrix where each value represents the membership grade of   (i,j) which belongs to the kth class in equation ( 13).  is the clustering centre.  represents represent the clustering center of the color component which is the color feature. 4 represents the clustering centre of LBP code. 5 represents the clustering center of the mean of difference in equation ( 14).LBP code and  5 represent the texture feature of the area.m is a weighting exponent that determines the amount of fuzziness of the resulting classification (in this paper, m = 2)., ,  are weights that are manually determined in a trial-and-error fashion (in this paper,  = 0.1,  = 0.1,  = 0.8).Through merging feature vector, the distance between pixels is more accurate.
The proposed algorithm is described as follows.
Step 1: Set the iteration number iter to zero,   = 5.An initial swarm of particles is generated in the search space.The population size is set to N (in this paper,  = 20).The position   and the velocity   of each particle are randomly created.Given   = 0.9 ,   = 0.4, mutation probability p m = 0.05.
Step 2: Computer ω by using equation ( 5) and evaluate the fitness of each particle by using equation (7).
Step 3: Compare the personal best of each particle to its current fitness and set the personal best of each particle to the better performance.
Step 4: Set the global best to the position of the particle with the best fitness within the swarm.
Step 5: Change the velocity vector for each particle according to equation (3).
Step 6: Move each particle to its new position, according to equation (4).
Step 7: Randomly choose  , when  >   , the position of each particle will apply mutation operator.
Step 8: Let  =  + 1. Go to step 2. And repeat until meets the stop criteria  >   .
Step 9: Make the position   as initial cluster centers, initializes membership matrix ukij for random value between 0, 1.

Multi-Feature Optimization Clustering Segmentation
In the experiments, we test with several 256 × 256 color images which are obtained from WebGIS (for example, Google Map/Earth) to assess the performance of the proposed algorithm with Matlab7.0 running on a desktop PC with 2.0GHz CPU and 1.0G RAM.The results of kernel-based FCM with prototypes in feature space (KFCM_F), FCM with spatial constraints (FCM_S) and the proposed method are compared.
Figure 3 (a) is "map1" original image.In KFCM_F and FCM_S, the initial class is set to 7. Figure 3  (b), (c), (d) shows the results of "map1" image segmentation.KFCM_F and FCM_S only divide the image into 3 classes.They use a separate color feature and cannot segment accurately.The proposed method divides the image into 7 classes.Figure 3 (b1), (b2) are the "road" and "lake" of KFCM_F.Figure 3 (c1), (c2) are the "road" and "lake" of FCM_S.We can see that in KFCM_F and FCM_S the "lake" and "terrain" are considered to be the same and cannot be segmented exactly.Figure 3 (d1), (d2), (d3) are the "road", "terrain" and "lake" of the proposed method.It can be seen that the proposed method has a better performance to segment accurately the "road", "terrain" and "lake".

Post-Processing
To get more accurate results, we can implement post-processing by using the morphological method.Given ) , ( j i f is the segmental result of the proposed method.We use two times fusion operator, then two times dilation operator.E represents fusion operator.D represents dilation operator. (a1) (a2) (a3)

Ratio of Misclassification
To compare the proposed method with existing methods, we use the ratio of misclassification to evaluate the different algorithms.We define the ratio of misclassification as equation (16).
s is the binary image of manual segmentation.v is the binary image of actual segmentation by algorithms.The absolute difference between the binary images s and v is the number of misclassification.∑ s is the total number of pixels for the manual segmental image.Figure 6 is the manual segmentation result.
According to equation ( 16), the ratios of misclassification are shown in Table 1.The ratio of misclassification of "road" is lowest in KFCM_F and FCM_S, however, still higher than the proposed method which is 10.24% and can basically segment "road" accurately.For "terrain" segmentation, the result of KFCM_F is the worst, and the ratio of misclassification is 30.05%.The result of FCM_S is better with adding spatial information.The proposed method is the best in "terrain" segmentation, and the accuracy has achieved 95%.For "lake" segmentation, FCM_S and KFCM_F have much more errors.The proposed method can segment "lake" very accurately.

Extended Experiments for Target Extraction
In addition, we test target extraction with real images in database [19] to assess the performance of the proposed algorithm by Matlab7.0. Figure 7(a) is the original "horse" image.

Conclusions
In this paper, we propose a multi-feature optimization clustering algorithm for color image segmentation.We combine pixel and texture features as a feature vector to effectively improve segmentation performance.It utilizes PSO with mutation operator of GA to evaluate the initial clustering center, and ensures that the search converges faster and makes the search jump out of local optima.Experimental results show that the proposed algorithm can achieve better performance than other classic clustering algorithms in terms of segmentation accuracy.

Figure 7 (
b) is its segmentation result of KFCM_F.

Figure 7 (
c) is its segmentation result of FCM_S.

Figure 7 (
d) is its segmentation result of the proposed method.

Figure 8 (
a) is the original "plane" image.

Figure 8 (
b) is its segmentation result of KFCM_F.

Figure 8 (
c) is its segmentation result of FCM_S.

Figure 8 (
d) is its segmentation result of the proposed method.Comparing the proposed segmentation results with the existing methods, it can be seen that KFCM_F cannot segment the objects accurately as a lot of unrelated pixels are segmented into the object areas, while FCM_S has a certain randomness.The segmentation results of the proposed method are most accurate compared to KFCM_F and FCM_S.

Table 1 .
The ratio of misclassification of difference methods.