Features Optimization of Gray Level Co-Occurrence Matrix by Artificial Bee Colony Algorithm for Texture Classification

Gray Level Co-occurrence Matrix (GLCM) is one of the most popular texture analysis methods. The fundamental issue of GLCM is the suitable selection of input parameters, where many researchers depended on trial and observation approach for selecting the best combination of GLCM parameters to improve the texture classification, which is tedious and time-consuming. This paper proposes a new optimization method for the GLCM parameters using Artificial Bee Colony Algorithm (ABC) to improve the binary texture classification. For the testing, 13 Haralick features were extracted from the UMD database, which has been used with the multi-layer perceptron neural network classifier. The experimental results proved that, the proposed method has been succeeded to finding the best combination of GLCM parameters that leads to the best binary texture classification accuracy performance.


INTRODUCTION
The development of digital technology equipment like cameras, mobile phones, and scanners, led to dramatically increase in the number of digital images [1].This is already used in several applications such as journalism, education, geographic information systems, medical image archives [2,3].Most of the previous applications deal with a large number of complicated texture images.Texture exists in various representations such as regular, irregular and its patterns may be repeated or random throughout the image [4].These varieties of texture make texture classification is a substantial challenge for many researchers.Texture classification is a process to classify different textures from the given images, which is an important process for many real-world applications such as rock classification [5], wood species classification [6], fabric classification [7], medical images [8] and remote sensing image classification [9].
A texture classification process has two main stages, which are the feature extraction stage and the classification stage.In the first stage, the texture feature extraction captures the essential characteristics of the texture, whereas the second stage applies for classifying the texture images according to their extracted features.However, how to efficiently represent and extract features from texture images is still a challenge in image classification.
Texture feature extraction techniques can be categorized into four main groups, namely structural; statistical; signal processing; and model-based stochastic [10].Statistical method is the most widely used [11], where the main reason is their promising performance for achieving the best accuracy than others [4].In last decades, It has been proposed many feature extraction methods under statistical method, such as Gray Level Difference Method (GLDM) [12], Gray Level Run Lengths (GLRLM) [12], Local Binary Pattern (LBP) [13] and Gray Level Cooccurrence Matrix (GLCM) [14].GLCM is one of statistical method used with texture classification, it still remain popular features extraction methods so far [15][16][17][18].This continue in depending on GLCM is due to its simplicity in the matrix computation and its effectiveness in the texture analysis, where GLCM depends on main parameters, which are angle, distance and number of gray levels [14].Previous studies depended on the manually selection of these parameters, which is laborious and time consuming, and will be challenge to obtain a good performance with textures classification [19][20][21].This paper proposed a new automated approach by Artificial Bee Colony (ABC) [22].ABC algorithm will be applied to find the best combination of angle, distance and gray level number in the GLCM method.
The rest of this paper is organized as follows; Section 2 presents the related work; Section 3 describes the basic theory of feature extraction of GLCM and ABC algorithm.Section 4 explains the framework of the proposed research methodology with the experimental setup and performance evaluation methods.In section 5 the experimental results are presented and discussed.Finally, Section 6 concludes this work with possible future extension work.

RELATED WORKS
There are manual approaches that have been proposed to select the appropriate parameters of the GLCM method.Othmen, et al. [23] presented an effective texture classification technique that combines the theories used from wavelet and co-occurrence matrices.To assess the proposed method, Euclidean distance was used as a classifier to the textures that were extracted from the Brodatz album.The percentage of texture classification for various values of the distance of 1 and angle of θ = (0°, 45° 90°, 135°) was determined using GLCM, and had proved that different angles provide different accuracy based on textures type; the manual selection of angle plays a major role in the performance of classification.Tou, et al. [24] compare the performance of using GLCM and Gabor Filter (GF) methods for textures classification using Brodatz texture dataset [25].The GLCM depends on different distances d ϵ (1, 2, 3, 4, 5) with four angles θ ϵ (0°, 45°, 90°, 135°) and different grey levels G ϵ (8,16,32,64,128,256), which were applied manually.Experimental results show that the accuracy provided by GLCM was 90.86%, while the accuracy using GF was 79.87%.Pathak and Barooah [21] have shown the construction of GLCM with various directions and how to calculate statistics like the inertia of moment (IM) and an absolute value of differences (AVD).Four possible spatial directions θ = (0°, 45°, 90°, 135°) were specified and implemented with a distance of d = 1 and d = 2.The GLCM is analyzed on the sample image of the Ashoka Chakra present in the National Emblem of a one-rupee Indian coin.From their work, it can be concluded, the results at d =1 show comparatively better performance than the results obtained at d = 2. Pramunendar, et al. [26] presented multilayer perceptron (MLP) and support-vector machine (SVM) classifiers to be used in coconut wood quality grading.Texture feature extraction using GLCM with various distances of (1, 2, 3) and angles of θ = (0°, 45°, 90°, 135°), which were selected manually.The performance was 78.82% at the angle of 90° and distance at 3 by MLP.
GLCM is computational expense in terms of the space required for computing the matrix [27] and thus, the computation of the GLCM features is time-consuming [17].Depending on 256 grey levels to generate the GLCM, this will be 256×256 elements (65536 entries).Applying features involves calculation through each of the GLCM pixels, which leads to an inefficient procedure by using the matrix entries of zero values.Therefore with the larger matrix size, more calculations for features are performed [17].The image quantization reduces the grey level numbers from eight bits (256 levels) to four or five bits (16 or 32 levels).This will be minimized with less computational for features extraction.However, quantization has the potential to remove pertinent information from the image, which affects the total accuracy [28].
In summary, based on previous studies; the performance of the GLCM method was based on the correct parameter's selection, which are the angle, distance, and the number of gray levels.Most studies implement a manual selection of these parameters.The practitioners need to carry out extensive testing to determine the appropriate combination of parameters [21].
The optimization technique is a way to find the highest classification performance accuracy under the given conditions.With a wide variety of optimization methods, there have been a few efforts by researchers to use them for selecting the best combination of input parameters for texture classification.Hasan, et al. [29] suggested a technique based on binary particle swarm optimization (BPSO) to be used in the automatic wood classification.25 species of wood were taken from Malaysia's CAIRO Wood Database.GLCM method was used as a features extraction method.BPSO is used to optimize the parameters of the features selection of the GLCM method.The GLCM parameters include the distance of d ϵ (1,2,3,4,5,6,7,8) and four angles, θ ϵ (0°, 45°, 90°, 135°) with the number of grey levels, G ϵ (2,8, 64, 256), by using the k-NN as a classifier, the results indicate that the proposed approach provides a total classification accuracy of 68.4% for wood texture classification.
Artificial Bee Colony Algorithm (ABC) is modern a swarm intelligence algorithm suggested by Karaboga [22].It is utilized for solving optimization problems, by mimicking the foraging behaviour of honeybees.ABC algorithm has been successfully used to solve different types of optimization problems in several fields.Atasever, et al. [30] proposed a method to compare some optimization algorithms, i.e.Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Differential Evolution (DE), and ABC algorithms, which were used for the unsupervised classification of remotely sensed image data.Their results showed the superiority of the ABC algorithm over other algorithms.Sathya and Geetha [31] presented an intelligent classification approach for breast DCE-MR images.The ABC algorithm was used to optimize the neural network, in order to the benign and malignant classification in the interested region.The experimental results showed that the proposed method yielded impressive diagnostic accuracy.Shanthi and Bhaskaran [32] suggested using a modified ABC algorithm to select the most ‫العلوم‬ ‫األسمرية:‬ ‫الجامعة‬ ‫مجلة‬ ‫والتطبيقية‬ ‫األساسية‬ Journal of Alasmarya University: Basic and Applied Sciences important features in breast lesion classification in mammogram images.In the experimental results, the performance of GA and PSO was compared to proposed method, and out of 84 image features, GA and PSO select 50 and 56 features, respectively, while only 42 features were selected with the proposed method, with the high accuracy of classification.Uzer, et al. [33] used the ABC algorithm for the feature selection process to the diagnosis of liver and diabetes.By using SVM as a classifier, the classification accuracy of the proposed system reached 94.92%, 74.81%, and 79.29% for the hepatitis dataset, liver disorders dataset, and diabetes dataset, respectively.Arora, et al. [34] combined biogeography-based optimization with the ABC algorithm, and applied this combination for classifying varied areas from a remote sensing satellite image.Experimentally, it has proved that the proposed algorithm is able to classify water, vegetation, rocky areas perfectly.Hitam, et al. [35] proposed an automated method for binary texture classification.The ABC algorithm was used to select an appropriate collection of angle and distance values in the GLCM method.To test the performance of the proposed method, UMD Database is employed and 13 Haralick texture features from a selected database were fed into multi-layer perceptron neural network (MLPNN) classifier.The experimental results showed that the proposed method provided an automated method for finding the greatest parameters combination (angle and distance) for the GLCM algorithm that leads to the best performance in texture classification.Albkosh, et al. [36] proposed an optimization method for automatic choosing of multi-scale discrete wavelet transform parameters using ABC method for powerful performance in texture classification.The proposed algorithm is developed for selecting the most effective filter out of 49 various wavelet filters, furthermore to selecting the suitable wavelet decomposition filter from eight decomposition levels using the ABC algorithm.The UMD database has been used for testing with the classifier which is based on a MLPNN.In the experimental results, an automated approach for finding the best input parameters combination, which provides the best performance in texture classification was successfully working with a huge and various textures type.
Based on the limitations of the GLCM method, and the success of ABC algorithm that produce impressive results in many optimization applications, the authors proposed a novel method for binary texture classification.This method is known as Auto Triple Parameter Optimization of GLCM (ATPO-GLCM).The main contribution of ATPO-GLCM method is implementing ABC algorithm to optimize the main three parameters of GLCM (Angle, distance and number of the gray levels), which has effect on extracted feature from texture, in turn improve binary texture classification.

APPLIED METHODS
The proposed method consists of a feature extraction stage using GLCM and ABC algorithm to automatically find the most suitable combination of GLCM parameters for achieving the most accurate classification results.

Computing the Co-occurrence Matrix
To describe how gray level co-occurrence matrices, let I is an image of size   ×  with G gray levels.Let   = [1,2,3, …   ] be used to represent the horizontal spatial domain and   = [1,2,3, …   ] be used to represent the vertical spatial domain and  = [1,2,3, …   ] be the set of   quantized gray tones.The image block used to derive gray level co-occurrence matrices is based on the nearest neighbourhood resolution cells [37].The neighbourhood resolution cells for a pixel at I (x, y) are shown in Figure 1.In this method, it is assumed that texture information is specified by a matrix of relative frequencies   where two neighboring resolution cells that are separated by a distance, d and an angle, θ occur in the image block, one with a gray level i and the other with a gray level j [37].Mathematically this relationship can be represented as follows: (, , , 0 °) = #[((, ), (, )) ∈ (  ×   ) × (  ×   ), ℎ (, , , 45 °) = #[((, ), (, )) ∈ (  ×   ) × (  ×   ), ℎ (, , , 135 °) = #[((, ), (, )) ∈ (  ×   ) × (  ×   ), ℎ All the information required for characterizing image texture can be obtained from the gray level co-occurrence matrix.
Haralick, et al. [37] suggested the use of texture features based on the spatial probability distribution matrix and computed 13 textural features that could be used for texture analysis.Among that features are, Angular Second Moment Feature, Contrast, Entropy, Variance, food source.This information is about the quality of food source, where employed bees are the same food source in number.c.Unemployed bees are divided into two types of bees, which are onlooker and scout.The former (onlooker bees) takes the information from the employed, which represents food sources quality for exploring in neighbourhood places.The last (scout bees) is existed when exhausting the food source by employed bees.The duty of scout bees to search for other food sources.

METHADOLOGY
The objective of this paper is to introduce an optimization method for involved parameters of GLCM using the ABC algorithm.This paper focuses on a binary texture classification; therefore, the texture classification process will consist of the following steps:

Images Dataset Preparation
This paper used a benchmark texture image database namely University of Maryland, College Park (UMD) database to test and validate the results of the proposed methods.The UMD database contains 25 texture classes with 40 samples in each class.The image resolution is 1280×960 pixels.UMD dataset has significant viewpoint changes and scale differences.Moreover, it also has varying illumination conditions with the high intra-class variability and the similarity between texture classes, thus makes it more challenging for classification purpose.The textures of this dataset are non-traditional which includes images of fruits, various plants, floor textures, shelves of bottles and buckets (Xu et al., 2006b).Figure 2 shows some sample of texture images [39] from UMD dataset.[39] To achieve the objective of this paper, the original UMD database with the size of 1280×960 was divided into the size of 128×128.This process of image division was made to ensure a rich enough dataset is used for training the classifier.Firstly, each sample from the UMD database with a size of 1280×960 pixels was divided into 80 sub-image samples as 70 samples with the size of 128×128 and the remaining is 10 samples with the size of 128×64.The images with the size of 128×128 will be used, whereas the remaining images with the size of 128×64 were ignored.As a result, 2800 texture images (40 images × 70 samples) from the same sample with the size of 128×128 were obtained.Then 500 texture images were selected randomly from each sample that has 2800 texture images.For testing, binary grouping from different image samples must be established.500 texture images from the first class and another 500 images from the second class were selected in order to produce 1000 texture images.To make the notation clear, it is labelled as Gx (A, B) which means Group number x with a combination of the images from class A and images from class B. For example, G3 (3,6) shown in Figure 3 images combinations from class 3 and class 6.

Optimized Features Extraction Method
The second main step is the Feature extraction stage.In this stage, the features will be extracted from the decided image, to be ready for the classification stage.The ABC algorithm is used to select the appropriate GLCM parameters, which effect on the features that will be used later in the classification stage.After applying any angle, distance, and a number of gray levels on GLCM, 13 Haralick statistical features as mentioned in section 3.1 were calculated.

GLCM Parameters Optimization using ABC Algorithm
Designing of GLCM based on several parameters such as angle, distance, and a number of gray levels.Different combinations of GLCM parameters were tested in order to find out which parameter combinations provide the best classification accuracy.In this paper, four different angles were used, i.e., angle θ = 0 °, 45 °, 90 ° and 135 ° at four different distances, i.e., d = 1, 2, 3 and 4 with six grey level numbers, i.e., G = 8, 16, 32, 64, 128 and 256.
The ABC optimization algorithm is adopted to be used for selecting the best combination of parameters from GLCM automatically.The positions of food sources in the ABC algorithm are considered as the parameters of GLCM (angle, distance and, the number of grey levels) that can provide specific solutions.The parameters were adjusted by the time through looking out for several places with high nectars.Here, the high amount of nectar is considered as the highest classification accuracy.The pseudo code that performs the optimization of GLCM parameters using ABC algorithm is shown in Figure 4.

Classification By Multi-Layer Perceptron Neural Network
Multi-layer perceptron neural network (MLPNN) has been successfully used for many applications [26], [35] and [36], and it was proposed to classifying the textures features that were obtained from the feature extraction stage.In the proposed method, the MLPNN with a single hidden layer of 60 neurons is used.This number of the hidden neurons has been selected after a set of primary experiments to find out what are the best neurons of hidden layer to be used.The hyperbolic tangent activation function is utilized in the hidden layer, and a linear function activation function is employed in the output layer.To reduce the average difference between the output and the target value on the neural network the gradient search learning algorithm is used.To increase the reliability and generality of the results, a 5-fold crossvalidation process has been used in this study.The image dataset groups contain 1000 texture images, which were randomly selected from two different samples.For the training set, 80% texture images from each group are selected and the remaining 20% texture images are used for the test set with the 5k-fold cross-validation technique.

Performance Measures
The performance of binary texture classification is measured using the following parameters:

Confusion Matrix
In this paper, the confusion matrix has been used, to evaluate the correct classification for the groups of binary texture image.It includes four classification performance indices which are ,False positive (FP), False negative (FN), True positives (TP) and True negatives (TN); all the previous indicates has been used to calculate the following measurements [33].

a. Accuracy: (ACC)
Accuracy is the total performance of the classifier, and can be computed as follows:

b. Sensitivity and Specificity
Recently, researchers in textures classification use sensitivity and specificity to evaluate the performance of their experiment, such as [35,36,40].In the Binary texture classification system performance is more accurate if the value of sensitivity and specificity was high.

Sensitivity: (SN)
In the binary classification, sensitivity is the proportion of the correct classification from the first class in the testing group, and can be computed as follows: Sensitivity, SN =   +  (6) Specificity: (SP) Specificity is the proportion of correct classification from the second class of the group in the binary classification.Specificity can be computed as follows:

RESULTS AND DISCUSSION
The main objective of this section is to present and discuss the main findings from using the ATPO-GLCM method.Table 1 illustrates the obtained results on 30 UMD datasets groups for binary texture classification.As can be observed in Table 1, different parameters lead to different texture classification accuracies, and the best desired accuracy will be based on the optimized parameters.As shown G1 of texture Screws and Buckets (Figure 5), the variation of the accuracies will be based on the parameters selected using the ABC algorithm of GLCM method as illustrated in Figure 6 for sample of random selected parameters.The best and maximum accuracy which is 95.50% using the angle θ = 0 ° with a distance of three and the number of gray levels is 256, (0 °, 3, 256 ) will be selected using the ABC algorithm.For 30 groups, ATPO-GLCM provides the highest classification accuracy with G11 of texture Short leaves 2 and Pasta (Figure 7) using the parameter values of the angle equal to 0 °with the distance of one with the number of gray levels is 256, (0 °, 1, 256).Table 1 shows the highest classification accuracy performance of G11 with accuracy of 100.00 %.While for the other remaining groups using ATPO-GLCM, the selected database recorded their highest accuracy, based on the parameters selected.Such as, the G9 of texture Stones and Wood as shown in Figure 8, the classification accuracy was 96.6%, and the parameters selected in that case was using the angle θ = 135 ° with a distance of one and the number of gray levels is 128, (135 °, 1, 128 ).
Figure 9 explains the variation of the accuracies for the group 9 based on the parameters selected using the ABC algorithm.As shown in Table 1 for some texture groups, the ABC optimized algorithm provided multi parameters value with the similar classification accuracy, such as group 21 (G21) of (Long leaves 1 and Cortex), as shown in Figure 2, which got two parameters values which are (90 °, 2, 128) and (45 °, 2, 64) with the maximum accuracy of 98.40 %.Sometimes, texture groups got different classification accuracy using equal parameters, such as, G16 of texture Short leaves 2 and Bottles, and G26 of texture Stones and Bottles as shown in Figure 2, got the best classification accuracy which is 95.70% and 96.80%, respectively based on a similar parameters of (90 °, 1, 265).
As already mentioned, Table 1 shows the parameters selected and classification accuracy, respectively for the 30 groups with the sensitivity and specificity.With group 27, Footpath and long leaves 2 as illustrated in Figure 2, the ATPO-GLCM with angle θ of 90 ° and distance of one, with the number of gray levels 256, provide an accuracy of 95.30%.By looking to the sensitivity and specificity of the selected group in Table 1.The sensitivity and specificity were 97.93% and 92.75% respectively.This means, the accuracy is increased using the first class (Footpath) of the group and decreased with the second class (long leaves 2) of the same group, which mean the second class is less response than first class to the ATPO-GLCM method.
For the outcome of this study to be as successful or beneficial, the results must be evaluated to prove that proposed methods are better than existing studies.Therefore, in order to evaluate the feature extraction performance of the proposed method in binary textures classification, two steps of evaluation were used.In the first step, the accuracy and parameter selected using proposed method for a specific group were compared against other accuracies using other parameters that was tested on the same group, from the 30 binary textures groups.The second step compared the performance of the proposed method against those of previous works done by other researchers.
According to the first step, the results conclude that ATPO-GLCM method is a superior algorithm in terms of binary textures classification accuracy.The most significant advantage of the proposed technique is, it will automatically select the best combination of parameters that will provide the best performance for texture classification.The sensitivity and specificity have been used to evaluate the proposed algorithm by determining the proportion of a correct classification from each class of the two texture types.By that, the effect of the texture class of a specific group on the total classification accuracy could be defined.
According to the second step, the accuracy in the final stage of the proposed framework was compared with the accuracy obtained by other studies.In the literature reviews, there is no particular study that is exactly similar to the framework that was applied in this paper.Although there is no exact comparison can be made, the results of the proposed method were compared with other existing works to highlight the contribution made over other methods.
Table 2 shows the comparison of other studies that use manual selection to the parameters with the ATPO-GLCM proposed method.From Table 1, it can be seen that the ATPO-GLCM proposed method, achieved an average accuracy of 95.25% based on 30 binary textures groups from UMD database.This is evidently better than accuracy achieved by those of Pramunendar, et al. [26] and Tou, et al. [24].
As can be observed in Table 2, the previous studies by Pramunendar, et al. [26] and Tou, et al. [24], which also work on textures classification but with different texture database, they have made the manual selection to the best combination of parameters to get good classification results.On the other hand, for the ATPO-GLCM proposed method, the combination of parameters will be automatically selected by using ABC algorithm to get the maximum accuracy results.In the previous studies by Pramunendar, et al. [26] and Tou, et al. [24], the database used was only 170 and 320 samples, respectively, their image dataset are too small as compared to the 30 groups that were used with ATPO-GLCM.On the other hand, with ATPO-GLCM each group contains 1000 sample from two different textures classes, that massive number of groups with its samples provide a high chance to prove the success of the ATPO-GLCM algorithm.From the performance evaluation point of view, it can be concluded that the ATPO-GLCM proposed method provide better performance as compared with other existing methods.In addition, it provides an automated method for choosing the correct combination of features.

Table 2. comparison of other studies that use manual selection with ATPO-GLCM Method
Lastly, the results of the proposed methods were compared with the existing optimization works of other studies, to evaluate their superiority over other methods.As can be observed from Table 3, Hasan, et al. [29] used GLCM parameters selections based on BPOS method to classify 1250 samples from CAIRO wood database.By comparing with the ATPO-GLCM method with the 30 groups of 1000 samples from UMD database, it can be concluded that the ATPO-GLCM method achieved an average accuracy of 95.25%.This is evidently better than the accuracy achieved by Hasan, et al. [29].One more advantage is that the massive of amount database was used by ATPO-GLCM as compared with the database used by Hasan, et al. [29].By looking to the Table 3, Hitam, et al. [35] used the parameters selection just for the angle and distance, even though the data base is same, which is (UMD database) and the average accuracy almost same and there is no significate difference, that is because the using different groups with different classes.The limitation in their study is the use of all numbers of gray ‫العلوم‬ ‫األسمرية:‬ ‫الجامعة‬ ‫مجلة‬ ‫والتطبيقية‬ ‫األساسية‬ Journal of Alasmarya University: Basic and Applied Sciences levels which are 256, which affects the features extraction in the final stage.Whereas with ATPO-GLCM proposed method, three main parameters, angle, distance, and a number of gray levels were used; with presence the parameter of the number of gray levels, the generated matrix will be based on the minimum gray level numbers that produce the maximum accuracy, therefore the features extraction time will be less.

CONCLUSIONS
Texture classification is a hot issue for research in computer vision.The classification accuracy can be improved by an effective feature extraction method.In the proposed method, a series of optimizations were applied on combined parameters of GLCM, which are angle, distance, and a number of gray levels.These GLCM parameters have been optimized by the ABC algorithm for binary texture classification.The new method ATPO-GLCM outperforms previous relevant methods.However, for further work, authors recommend the proposed method to combine with other features in order to improve the classification result for complicated textures.Also, the proposed method applies to other computer vision applications.

Figure1.
Figure1.The neighbourhoods for a pixel

Figure 6 .
Figure 6.Testing performance graph for Group 1

Figure 9 .
Figure 9. Testing performance graph for Group 9

) Issue 5 (December 2021)
Features Optimization of Gray Level Co-Occurrence Matrix by Artificial Bee Colony Algorithm forTexture Classification

Table 1 .
The combination of parameters selected by the ABC algorithm, along with the results of accuracy, sensitivity and specificity.

Table 3 .
Summary of related works comparison with ATPO-GLCM algorithm