**1. Introduction**

Texture [1,2] is a core property of object appearance in natural scenes, ranging from large-scale samples to microscopic ones. It is also active visual information that is used to describe and recognize objects in the real environment. Texture classification is one of the key problems in texture analysis, and it has been a long-standing research topic because of its importance in understanding the process of texture classification by humans and its extensive applications in computer vision and image analysis [3]. The main applications of texture classification include understanding medical images, extracting visible objects, retrieving content-based images, inspecting industrial faults [4–7], and so on.

In general, the primary focus of studies on texture classification has been the determination of methods to extract texture features. It is generally believed that the extraction of powerful texture features is more important than that of weak texture features since they do not lead to good classification results, even when using excellent classifiers [8]. However, texture features can be found in various orientations and at different scales, and these cannot be characterized effectively by commonly used methods [9–12]. Gabor filter has been used for this purpose and performs better in

the discrimination of individual texture features, especially those with similar descriptions. However, a single filter is difficult to apply to multi-orientation and multiscale texture features. Thus, a bank of Gabor filters with the ability to extract multi-orientation and multiscale texture features was proposed to address the issue. Gabor filter has been extensively used for texture feature extraction and texture classification [13]. Li [14] captured the dependence of Gabor filter on different channels, and had better performance results than that of state-of-the-art approaches. Younesi [15] proposed a palm print recognition method that used a bank of Gabor filters to extract texture features from images, and the method achieved higher accuracy than texture classification approaches based on single Gabor filter. Huang [16] proposed a new technique of identifying group-housed pigs on the basis of Gabor filter, and the experimental results demonstrate that the accuracy outperformed the compared approach by 91.86%, and PCA parameter drifted in the range of 0.85–0.9. Lu [17] presented a texture classification method for fracture risk estimation based on Gabor filter combined with the total T-score, and the shape texture features could be measured in a wider area compared with other methods. Kim [18] proposed a novel texture classification technique with directional statistical (DS)-Gabor filter and had satisfactory rotation invariance owing to the combination of a number of directional statistics. However, the parameters of the above method need to be set by experience, thus it may not be adaptable to different types of texture features. Furthermore, the parameter settings of each Gabor filter are crucial to classification accuracy.

On the other hand, the process of obtaining the optimal parameters of Gabor filter can be seen as a combinatorial optimization problem that can be tackled by swarm intelligence algorithms. For example, Khan [19,20] presented a technique for the optimization of each filter individually via particle swarm optimization (PSO) and cuckoo search (CS) algorithm, and the approach successfully represents local texture changes at multiple scales and orientations from mammograms with an effective improvement in classification accuracy. Tong [21] proposed a defect detection technique via Gabor filter to inspect flaws in woven fabrics in the fashion industry, and the differential evolution (DE) algorithm was utilized to obtain the optimal parameters of the filter bank. The method achieved high successful detection and low false alarm rates. However, the optimization ability of PSO, DE, and CS algorithms is mainly based on a random search, which cannot ensure convergence toward the optimal solution. Moreover, because of the multi-orientation and multiscale nature of the filter bank, there is redundant information in the process of texture feature extraction, and it contributes little to the classification [22]. Thus, numerous feature selection approaches based on Gabor filter have been proposed to reduce the data dimension [23,24], but the previous works have ignored the relevance of parameter optimization and feature selection. In essence, parameter optimization and feature selection are both considered combinatorial optimization problems, and the integrated optimization of the parameters and features of Gabor filter could be obtained by swarm intelligence algorithms at the same time.

Ant lion optimizer (ALO) [25] is a novel swarm intelligence algorithm. Nowadays, ALO has been applied in various fields, such as power system design, fault detection, schedule planning, path searching and so on [26–29]. The optimization ability of ALO does not rely on any parameters, and it is more likely to obtain the satisfactory solution. However, feature selection is considered a discrete optimization problem and is difficult to solve using ALO with decimal coding. Mafarja [30] presented a binary coded ALO (BALO) to select the optimal feature subset for some well-known datasets from the UCI repository. BALO obtained superior results by searching for the best feature subset, and the performance was independent of the step-length and classifier. Hence, in this paper, a new texture classification method is proposed that blends the use of Gabor filter and a hybrid binary-decimal coded ALO (HALO) to, respectively, solve the problems of parameter optimization and feature selection.

The rest of this paper is structured as follow. The basic principle of HALO is illustrated in Section 2. In Section 3, the proposed method to obtain the integrated optimization of the parameters and features of Gabor filter is detailed. Section 4 displays the experimental results and discussion. Finally, the paper is concluded in Section 5.

#### **2. Overview of HALO**

#### *2.1. ALO for Parameter Optimization*

In 2015, Mirjalili introduced a swarm intelligence algorithm called ALO, which imitates the hunting behavior of antlions and has no parameters to be set [25]. In nature, an antlion larva digs a cone-shaped pit in the sand by moving along a circular path and throwing out sand with its massive jaw, and the larva then hides underneath the bottom of the cone and waits for ants to be trapped in the pit. The exploratory behavior of ALO is similar to an antlion's digging in a circular path. Additionally, the exploitation behavior of ALO is similar to the boundary adjustment of antlions' traps. As each ant in ALO moves randomly in the solution space, its strategy is similar to that of spinning a roulette wheel and is represented below:

$$X^t = [0, 
um{sum}(2r(t\_1) - 1), 
um{sum}(2r(t\_2) - 1), 
\dots, \\
um{sum}(2r(t\_n) - 1)]\tag{1}$$

where *X<sup>t</sup>* is the position of ants after a random walk, *n* is the number of ants in the population, *cumsum* represents the cumulative sum, *t* is the iteration number, and *r*(*t*) is a stochastic distribution function as defined below:

$$r(t) = \begin{cases} 1 & \text{if } rand > 0.5\\ 0 & \text{if } rand \le 0.5 \end{cases} \tag{2}$$

where *rand* is a random number taken from a uniform distribution in the interval of [0,1].

To maintain the random walk in the scope of the search space, the positions of each ant are normalized by min-max normalization as defined by the following:

$$X\_i^t = \frac{(X\_i^t - a\_i)(b\_i - c\_i^t)}{d\_t^t - a\_i} + c\_i^t \tag{3}$$

where *ai* is the minimum of the random walk of *i*th variable, *bi* is the maximum of the random walk of *i*th variable, *c<sup>t</sup> <sup>i</sup>* is the minimum of *<sup>i</sup>*th variable at iteration *<sup>t</sup>*, and *<sup>d</sup><sup>t</sup> <sup>i</sup>* indicates the maximum of *i*th variable at iteration *t*.

Antlions build traps that are proportional to the size of the solution space, and the ants move stochastically. Moreover, antlions shoot sand outward from the center of the pit once they realize that an ant is in the trap to keep the ant trapped as it tries to escape. To mathematically define this behavior, the radius of an ant's random walk on a hypersphere is reduced adaptively, and the process of trapping can be described as follows:

$$c^t = \frac{c^t}{I} \tag{4}$$

$$d^t = \frac{d^t}{I} \tag{5}$$

where *I* = 10*<sup>ω</sup> <sup>t</sup> <sup>T</sup>* , *T* is the maximum number of iterations, and *ω* is a constant variable that is defined based on the current iteration ( *ω* = 2 when *t* > 0.1 *T*, *ω* = 3 when *t* > 0.5 *T*, *ω* = 4 when *t* > 0.75 *T*, *ω* = 5 when *t* > 0.9 *T*, and *ω* = 6 when *t* > 0.95 *T*). Basically, *ω* is utilized to adjust the optimization level of exploration.

#### *2.2. Binary Coding for Feature Selection*

In general, feature selection is regarded as a discrete combinatorial optimization problem and is difficult to solve directly by decimal coding. In the binary coding environment, moving through each band means that the position of each individual changes from 0 to 1 or vice versa [31]. To introduce a binary coding form of ALO, the coding process of each ant can be seen as continuous optimization of similarity. The major difference between the decimal and binary coding form is that ants are characterized by a realistic value or by switching to "0" or "1" in the transform function. That is to say, the position of each ant calculated by Equation (3) is set to either 0 or 1 with a certain probability and calculated with a conditional function, as shown in Equation (6):

$$R\_i^t = \begin{cases} 1 & if \quad rand \le |\tanh(X\_i^t)| \\ 0 & otherwise \end{cases} \tag{6}$$

where *tanh*(·) is the hyperbolic tangent function and *<sup>R</sup><sup>t</sup> <sup>i</sup>* is the form of binary coding for the position of each ant that is utilized to solve the problem of feature selection.

To summarize, in this paper, HALO is proposed with the combination of binary and decimal coding to, respectively, solve the problems of parameter optimization and feature selection using an ant, and the aim of this approach is to obtain the optimal classification accuracy for different texture features. The overall operating process of the proposed texture classification method is expressed in the following section.

#### **3. The Proposed Method**

An efficient texture classification method that applies the integrated optimization of the parameters and features of Gabor filter using HALO is presented in this section. The main goal of texture classification is to precisely classify several texture features in each sample.

#### *3.1. Fundamental of Gabor Filter*

Gabor filter is calculated by a convolutional kernel function, which has been utilized in image processing applications, especially for texture classification. To represent multiscale and multi-orientation texture features, a filter bank is structured with a number of parameters in different orientations and scales. The essential variable *g*(*x*, *y*) of a 2-D Gabor filter is expressed by a Gaussian kernel and adjusted by a complex sinusoidal wave: [32]:

$$\mathbf{g}(\mathbf{x}, \mathbf{y}) = \left(\frac{1}{2\pi\sigma\_{\mathbf{x}}\sigma\_{\mathbf{y}}}\right) \exp\left(-\frac{1}{2}\left(\frac{\vec{\mathbf{x}}^2 + \vec{\mathbf{y}}^2}{\sigma\_{\mathbf{x}}^2 + \sigma\_{\mathbf{y}}^2}\right) + 2\pi j \mathcal{W}\vec{\mathbf{x}}\right) \tag{7}$$

$$\mathbf{x} = \mathbf{x}\cos\theta + y\sin\theta \quad \mathbf{y} = -\mathbf{x}\sin\theta + y\cos\theta \tag{8}$$

where *σ<sup>x</sup>* and *σ<sup>y</sup>* are the parameters that describe the spread of the current pixel in the neighborhood in which weighted summation occurs, *W* is the central frequency of the complex sinusoid, and *θ* ∈ [0, *π*) is the orientation of the horizontal to vertical stripes in the equation above.

A bank of Gabor filters includes multiple individuals and can be adjusted for different orientations and frequencies. Gabor filter considered here is GS5O8 (including 40 filters: 5 scales *S* × 8 orientations *O* with an initial max frequency equal to 0.2 and an initial orientation set to 0. The parameter settings of the orientations and frequencies for a bank are tuned by the following formulas [33]:

$$\text{Orientation}(i) = \frac{(i-1)\pi}{\text{O}}, \text{where } i = 1, 2, \dots, \text{O} \tag{9}$$

$$Frequency(i) = \frac{f\_{\text{max}}}{\sqrt{(2)^{i-1}}}, where \text{ i } = 1, 2, \dots, \text{ S} \tag{10}$$

where *O* and *S* are, respectively, the orientations and scales in total, and *fmax* is the maximum value of the frequency and is set to *fmax* = 0.2.

#### *3.2. Encoding Schema of Parameter Optimization and Feature Selection*

The key objective of the proposed texture classification method is to achieve satisfactory parameters and features of Gabor filter and create a reasonable mapping between the solution and HALO. The parameter optimization process needs *O* + *S* bits to apply coding to the parameters, which are the orientations *θ* and frequencies *W* in Equations (9) and (10). The former *O* bits represent each orientation, the latter *S* is each scale, and the ranges of the parameters are, respectively, set to (0, 1) and (0, 0.2] with decimal coding. For feature selection, the length of coding is equal to the total number of features in the database, and here it is set to *O* × *S*. For binary coding, every bit is expressed by the fixed value "0" or "1" by Equation (6), where "1" illustrates that the current feature will be chosen for classification, and "0" illustrates that the current feature will be abandoned. Thus, the total coding length of an ant is equal to *O* × *S* + *O* + *S*. The encoding form of an ant for Gabor filter with *O* orientations and *S* scales is shown in Figure 1. The entire code simultaneously indicates the solution of the parameter settings and the feature subset of Gabor filter.

**Figure 1.** The encoding form of an ant for Gabor filter.

#### *3.3. Definition of Objective Function*

To evaluate the optimization ability of HALO and other evolutionary algorithms, it is necessary to choose a suitable objective function. Because the process of training can be considered prior knowledge, each texture feature is a category. The Fisher criterion has good performance in the calculation of heuristic knowledge. The Fisher criterion aims to maximize the inter-class difference and minimize the intra-class difference, and it is usually applied to assess binary classification problems [34]. For multi-classification problems, the objective function should be improved to synthetically weight the differences between each category. Therefore, it is defined as shown in Equation (11):

$$fit = \frac{\sum\_{i=1}^{l-1} \sum\_{j=i+1}^{l} |\mu\_i - \mu\_j|}{\sum\_{i=1}^{l} \sigma\_i^2} \tag{11}$$

where *μ<sup>i</sup>* and *σ<sup>i</sup>* are, respectively, the average and the standard deviation of the eigenvalues for *i*th category of texture features, and *l* is the number of classes. A larger value resulting from the above equation demonstrates better-quality parameters and features for Gabor filter.

#### *3.4. Implementation of the Proposed Technique*

The overall scheme of the proposed texture classification technique is shown below. First, it performs encoding for each ant of HALO, and the process of parameter optimization and feature selection is then constructed by binary and decimal encoding. The result constitutes a feature vector that is input into a classifier and yields a final label for each sample.

The value of the feature vector is composed of different orientations and frequencies of Gabor filter, and each feature vector is normalized to a uniform magnitude in the range of [0,1]. In general, the process of texture classification has two stages: training and testing. The former stage provides a certain extent of prior knowledge for classification, and the latter stage verifies the availability of the current model [35].

Training samples with different scales and rotations are utilized to avoid overfitting for fair performance evaluation. However, at the same time, the volume of the training dataset is increased by the 40 filters. As a result, interval sampling [36] with a length of 8 pixels and max-pooling with a 4 × 4 window is utilized for each sample to decrease the data volume in the process of convolution.


Step 5-1: Trap ants in antlion's pits by using Equations (4) and (5).

Step 5-2: Random walk ants by using Equation (3).

