Dragonﬂy Algorithm with Opposition-Based Learning for Multilevel Thresholding Color Image Segmentation

: Multilevel thresholding is a very active research ﬁeld in image segmentation, and has been successfully used in various applications. However, the computational time will increase exponentially as the number of thresholds increases, and for color images which contain more information this is even worse. To overcome the drawback while maintaining segmentation accuracy, a modiﬁed version of dragonﬂy algorithm (DA) with opposition-based learning (OBLDA) for color image segmentation is proposed in this paper. The opposition-based learning (OBL) strategy simultaneously considers the current solution and the opposite solution, which are symmetrical in the search space. With the introduction of OBL, the proposed algorithm has a faster convergence speed and more balanced exploration–exploitation compared with the original DA. In order to clearly demonstrate the outstanding performance of the OBLDA, the proposed method is compared with seven state-of-the-art meta-heuristic algorithms, through experiments on 10 test images. The optimal threshold values are calculated by the maximization of between-class variance and Kapur’s entropy. Meanwhile, some indicators, including peak signal to noise ratio (PSNR), feature similarity index (FSIM), structure similarity index (SSIM), the average ﬁtness values, standard deviation (STD), and computation time are used as evaluation criteria in the experiments. The promising results reveal that proposed method has the advantages of high accuracy and remarkable stability. Wilcoxon’s rank sum test and Friedman test are also performed to verify the superiority of OBLDA in a statistical way. Furthermore, various satellite images are also included for robustness testing. In conclusion, the OBLDA algorithm is a feasible and e ﬀ ective method for multilevel thresholding color image segmentation.


Introduction
Image segmentation is a vital processing stage of object recognition and robotic vision.It can be also considered as a technique which partitions the components of an image into several distinct and disjoint regions, based on some features such as color or texture.More precisely, the interested objects or meaningful contours can be extracted conveniently [1].In general, each of the pixels in the same region is homogeneous whereas the adjacent regions vary greatly [2].The fundamental goal of image segmentation is to simplify or change the representation of the given image, making it easier for human visual observation and analysis.Nowadays, the image segmentation technique has already become a widespread application in various fields, and more intensive research is carried out continually [3].
In the last few years, a great variety of methods has been proposed for image segmentation, which can be summarized as four types, including region-based method, clustering-based method, Symmetry 2019, 11, 716 3 of 24 in which the better ones are selected from current individuals and its opposite solutions through comparison [30].With advantages in increasing population diversity and accelerating the convergence, it has increasingly extensive applications in various fields.The combination of krill herd algorithm and OBL can solve complex economic load dispatch problems [31].Ewees et al. [32] successfully embedded the OBL in the grasshopper optimization algorithm and used this method to solve four engineering problems, namely, the welded beam design problem, the tension spring design problem, the three-bar truss design problem, and the pressure vessel design problem.
The dragonfly algorithm (DA) is a swarm-based algorithm which was proposed in 2015 by Mirjalili [33].The main inspiration of the DA algorithm is two different behaviors of dragonflies, static and dynamic which are similar to the exploration and exploitation phases of meta-heuristic optimization.Exploration plays a vital role in the early stage to search for the unknown promising regions.Exploitation makes a significant effect in the later stage to get closer to an optimal solution [34].The position of each dragonfly in the search space denotes a solution in optimization process.The DA algorithm has been widely used in various fields, such as medical diagnosis [35], optimization of proportional-integral-derivative (PID) controller [36], and a benchmark study of brushless DC motor optimization [37].Meanwhile the simulation results proved strong robustness and high accuracy of the DA algorithm.
It is evident that color images contain more information compared with common images, highlighting the difficulty of satellite image segmentation.Furthermore, there are some drawbacks of the standard DA algorithm mentioned as follows: premature convergence, unbalanced exploration -exploitation [38][39][40].In order to enhance the performance of traditional DA algorithm to a certain extent, as well as provide an efficient method to solve the problems in multilevel thresholding image segmentation, a modified dragonfly algorithm combined with opposition-based learning (OBLDA) is presented in this paper.The advantages of the proposed method include powerful optimizing ability, higher precision, strong robustness and remarkable stability.In this paper, between-class variance and Kapur's entropy are used as objective functions which will be maximized to find the optimal thresholds.The performance of the proposed method is evaluated using five satellite images and five natural images.Meanwhile, several state-of-the-art meta-heuristic algorithms are selected for comparison, such as DA [39], PSO [23], the sine cosine algorithm (SCA) [41], the BA [25], the harmony search algorithm (HSO) [42], ant lion optimization (ALO) [43], and the salp swarm algorithm (SSA) [44].Furthermore, some indicators such as the peak signal to noise ratio (PSNR), the feature similarity index (FSIM), the structure similarity index (SSIM), the average fitness values, standard deviation (STD), and computation time are chosen as quality metrics to compare the performance of proposed algorithm with other algorithms.Wilcoxon's rank sum test [45] and Friedman test [46] is also performed to verify the superiority of OBLDA in a statistical way.
The remainder of this paper is organized as follows: Section 2 introduces the needed dataset.Section 3 firstly introduces thresholding technique including between-class variance and Kapur's entropy, then gives an overview of the standard dragonfly algorithm, and finally describes the proposed method based on opposition-based learning.Section 4 presents a description of experiment in detail.Subsequently, the experimental results of proposed algorithm compared to other algorithms and its analysis are discussed in Section 5. Finally, the conclusion is illustrated in Section 6.

Dataset
In this paper, the proposed algorithm is tested on ten standard test color images, namely Image 1, Image 2, Image 3, Image 4, Image 5, Image 6, Image 7, Image 8, Image 9, and Image 10, respectively.Images 1-5 are taken from the database of Berkeley University [47], which are of size 481 × 321, and satellite Images 6-10 are taken from [48], which are also of size 481 × 321.Besides, all the test images and their corresponding histogram images are presented in Table 1.

Massif
The stark transitions and vertical ecology of the canyon.

Image 5 Image 6
Chesapeake Bay in America.
An area about 50 kilometers southeast of Paso de Indios.

Massif
The stark transitions and vertical ecology of the canyon.

Image 5 Image
Chesapeake Bay in America.
An area about 50 kilometers southeast of Paso de Indios.

Image 7 Image
Image 5 Image 6 Cow Cat Image 1 Image 2

Zebra Weasel
Image 3 Image 4

Massif
The stark transitions and vertical ecology of the canyon.

Image 5 Image 6
Chesapeake Bay in America.
An area about 50 kilometers southeast of Paso de Indios.

Image 7 Image 8
Chesapeake Bay in America.

Image 1 Image
Zebra Weasel

Massif
The stark transitions and vertical ecology of the canyon.

Image 5 Image
Chesapeake Bay in America.
An area about 50 kilometers southeast of Paso de Indios.

Image 7 Image
Cow Cat Image 1 Image 2

Zebra Weasel
Image 3 Image 4

Massif
The stark transitions and vertical ecology of the canyon.

Image 5 Image 6
Chesapeake Bay in America.
An area about 50 kilometers southeast of Paso de Indios.

Image 7 Image 8
An area about 50 kilometers southeast of Paso de Indios.

Image 1 Image
Zebra Weasel

Massif
The stark transitions and vertical ecology of the canyon.

Image 5 Image
Chesapeake Bay in America.
An area about 50 kilometers southeast of Paso de Indios.

Image 7 Image
Image 7 Image 8 The emergence of performance made by the Kilauea eruption.
The growth in the city of New Delhi and its adjacent areas.

The Proposed Method for Multilevel Thresholding
In this section, firstly, we introduce two most widely used image thresholding techniques, including Otsu's method which is based on between class variance and Kapur's method which is based on the criterion of entropy.Then, we present a brief description of the standard dragonfly algorithm.In the end, we describe the proposed method based on opposition-based learning, and it can be effectively applied to the initialization stage and updated stage.The emergence of performance made by the Kilauea eruption.
The growth in the city of New Delhi and its adjacent areas.

The Proposed Method for Multilevel Thresholding
In this section, firstly, we introduce two most widely used image thresholding techniques, including Otsu's method which is based on between class variance and Kapur's method which is based on the criterion of entropy.Then, we present a brief description of the standard dragonfly algorithm.In the end, we describe the proposed method based on opposition-based learning, and it The emergence of performance made by the Kilauea eruption.
The growth in the city of New Delhi and its adjacent areas.

The Proposed Method for Multilevel Thresholding
In this section, firstly, we introduce two most widely used image thresholding techniques, including Otsu's method which is based on between class variance and Kapur's method which is based on the criterion of entropy.Then, we present a brief description of the standard dragonfly algorithm.In the end, we describe the proposed method based on opposition-based learning, and it can be effectively applied to the initialization stage and updated stage.
The growth in the city of New Delhi and its adjacent areas.The emergence of performance made by the Kilauea eruption.
The growth in the city of New Delhi and its adjacent areas.

The Proposed Method for Multilevel Thresholding
In this section, firstly, we introduce two most widely used image thresholding techniques, including Otsu's method which is based on between class variance and Kapur's method which is based on the criterion of entropy.Then, we present a brief description of the standard dragonfly algorithm.In the end, we describe the proposed method based on opposition-based learning, and it Image 9 Image 10

The Proposed Method for Multilevel Thresholding
In this section, firstly, we introduce two most widely used image thresholding techniques, including Otsu's method which is based on between class variance and Kapur's method which is based on the criterion of entropy.Then, we present a brief description of the standard dragonfly algorithm.In the end, we describe the proposed method based on opposition-based learning, and it can be effectively applied to the initialization stage and updated stage.

Otsu's Method
The Otsu method selects the optimum values of thresholds for multilevel thresholding by maximizing between class variance of each segmented class [49].It can be defined as follows: assume that L denotes the number of gray levels in a given image so that the range of intensity values is Otsu's method also can be effectively used for multilevel thresholding problems.Assume that the given image is subdivided into n classes so that there are n − 1 optimal thresholds, through maximization of the objective function.
The objective function based between-class variance is calculated by: where P k represents the cumulative probabilities of each class; µ k is the mean level of each class.µ is the mean level of whole image.The optimum thresholds t * (t 1 , t 2, • • • t n ) are obtained by maximizing the between-class variance objective function.A higher value of objective function refers to better quality of the segmented images.

Kapur's Entropy
The Kapur's method is used to determine the optimal thresholding values based on the maximization of entropy.It has attracted the interest of a lot of researchers because of its superior performance and been widely applied to solve image segmentation problems.The entropy of a given image represents the compactness and separateness among distinctive classes [50].
Kapur's method can be used for multi-level thresholding, and it can obtain the n optimal thresholds (t 1 , t 2, • • • t n ) based on the Kapur's entropy maximization: where H 0 , H 1 , • • • , H n represent the entropies of distinct classes.However, the foremost restriction between Otsu's and Kapur's methods is that the computational time is increasing exponentially as the number of thresholds increases.Hence, it is time-consuming in practical terms for multilevel image segmentation applications.In order to overcome the above shortcomings, this paper presents a novel method based on the modified dragonfly algorithm to find the optimal thresholds.The purpose is to find the optimal thresholds accurately by maximizing the objective function in less processing time and maintaining segmentation accuracy.

Dragonfly Algorithm (DA)
The dragonfly algorithm (DA) is a swarm-based algorithm which was proposed in 2015 by Mirjalili [33].The main inspiration of the DA algorithm is two different swarming behaviors of dragonflies, static and dynamic.In static swarm, the dragonflies form several small groups which are characterized as local movements and abrupt changes in flying path, and afterwards they fly in all Symmetry 2019, 11, 716 6 of 24 directions over a small area to search for food sources.Meanwhile in the dynamic swarm, a large number of the dragonflies fly in one direction with the purpose of migrating.Static and dynamic swarming behaviors are similar to the exploration and exploitation phases of meta-heuristic optimization.The position of each dragonfly in the search space denotes a solution in the optimization process.
Reynolds proposed that the behavior of swarms consists of three primitive principles, including separation, alignment, and cohesion These principles can be also adapted to the DA algorithm; besides, in order to model the swarming behavior of dragonflies in detail, two behaviors, the individuals of the swarm should be attracted towards food sources and diverted away from enemies, are also taken into account.Hence, the position of each dragonfly is updated by five different types of actions, which are mathematically modeled as Equations ( 3)- (7). Figure 1 shows primitive corrective patterns of dragonfly swarm.Meanwhile, in order to make a balance between exploration and exploitation, [33] defines s, a, c, f , and e as weight factors for separation, alignment, cohesion, attraction towards a food source, and distraction outwards by an enemy, respectively, which will adjust adaptively in DA algorithm.In addition, the two dragonflies are in the same neighborhood, in which the distance between them is less than the radius of neighborhood; on the contrary, they will be not in the same neighborhood.The radii of neighborhoods increases linearly with the number of iterations simultaneously to improve convergence speed, until all the dragonflies become one group at the final phase of optimization.where X represents the position of the current dragonfly.j X represents the j-th position neighboring dragonfly, and W is the number of neighboring dragonflies.Attraction towards a food source: where X shows the position of the current dragonfly, and X + shows the position of the food source, and it is chosen from the best dragonfly that the swarm has found up to now.Distraction outwards by an enemy: where X denotes the position of the current dragonfly, X − denotes the position of the enemy , and it is chosen from the worst dragonfly that the swarm has found up to now.The position of dragonfly is updated by: where ( ) , which can denote the direction of the movement.
When there is no neighboring individual, the behavior of dragonflies is assumed to be a random walk (Levy flight) around the search place to enhance randomness, stochastic behavior and exploration.The position of the dragonfly is updated as follows: where t is the current iteration, and d represents the dimension of position vectors.Separation: where X denotes the position of the current dragonfly.X j denotes the j-th position of neighboring dragonfly, and W is the number of neighboring dragonflies.Alignment: where V j is the velocity of the j-th neighboring dragonfly.Cohesion: where X represents the position of the current dragonfly.X j represents the j-th position neighboring dragonfly, and W is the number of neighboring dragonflies.Attraction towards a food source: where X shows the position of the current dragonfly, and X + shows the position of the food source, and it is chosen from the best dragonfly that the swarm has found up to now.Distraction outwards by an enemy: where X denotes the position of the current dragonfly, X − denotes the position of the enemy, and it is chosen from the worst dragonfly that the swarm has found up to now.The position of dragonfly is updated by: where When there is no neighboring individual, the behavior of dragonflies is assumed to be a random walk (Levy flight) around the search place to enhance randomness, stochastic behavior and exploration.The position of the dragonfly is updated as follows: where t is the current iteration, and d represents the dimension of position vectors.Pseudo code of dragonfly for multilevel thresholding has been shown in Algorithm 1.

Algorithm 1. Pseudocode of dragonfly algorithm for multilevel thresholding
Initialize the position of dragonfly population X i (i= 1, 2, . . ., n) based on opposition-based learning.Initialize step vectors ∆X i (i = 1, 2, . . ., n).WHILE the end condition is not satisfied FOR i = 1 : n Calculate the objective value of each dragonfly by using the Equation (1) for Kapur's entropy or Equation ( 2) for Between-class variance Update the position of the food source X f and enemy X e .Update w, s, a, c, f , and e Calculate S, A, C, F, and E using Equations ( 4) to (7) Update neighboring radius IF a dragonfly has at least one neighboring dragonfly Update velocity vector; Update position vector using Equation (8) ELSE Update position vector using Equation (9) END IF Select half of dragonflies from the current population randomly, and the opposition-based learning is embedded in them.Check and correct the new positions based on the boundaries of variables END FOR END WHILE Return X f , which represents the optimal values for multilevel thresholding segmentation.

Dragonfly Algorithm with Opposition-Based Learning (OBLDA) Based on Multilevel Thresholding
Opposition-based learning (OBL), which considers the current solution and opposite solution simultaneously to accelerate the convergence of meta-heuristic methods [30].On the basis of probability theory, there is a 50-50 chance that the distance between the current solution and optimal solution is farther than its corresponding opposite [51].Hence, we can utilize the concept of OBL to obtain a higher chance for approaching the promising regions, and then have a good balance of exploration and exploitation [52].In general, the initial solutions are created randomly which are absence of priori knowledge about the solution.In addition, the convergence of the meta-heuristic methods will be time-consuming, when they are far away from the optimal solution.The applications of OBL can solve the problem in initialization effectively; meanwhile, the OBL also provides a strategy to search for the closer solution in the current population.
Let x ij x i1 , x 2 j , • • • , x iD be a point in D-dimensional space, and the opposite of x ij is calculated by where a j and b j are predefined as the lower and the upper bound of the search place respectively.k represents the type of opposition-based learning.
The opposition-based learning can be employed in two stages of the standard DA effectively.Firstly, the OBL is embedded to the initialization of population to improve the diversity of dragonflies, and then the OBLDA algorithm can obtain fitter initial solutions which can help converge to global optimal solution accurately.Secondly, in the updating phase of the DA algorithm, the OBL is used in half of the current population randomly to check if the current solution is fitter than its corresponding opposite, increasing the randomness of the algorithm and saving more optimizing time simultaneously.
a. Initialization stage The proposed method takes a random population X of size N as its initial solutions.D is the number of dimension.The OBL is used to computed the opposite solution for each member.The steps of initialization are shown as follows: Step 1: Initialize the population X with a size of N randomly.
where, ub and lb are the upper and lower bound of search space.
Step 2: Calculate the opposite population x * ij as: Step 3: Select a fitter one between x ij and x * ij based on fitness function values to construct a new initial population.
b. Updated stage In this stage, we select half of dragonflies from current population randomly which will be combined with the OBL, and then compute their fitness functions respectively based on the DA to choose the best solutions from x ij ∪ x * ij .A new population will be generated using the OBLDA algorithm in each iteration.All the steps will be carried out constantly until the final conditions are reached.
Finally, the flowchart of OBLDA for finding the optimal threshold values is shown in Figure 2.
In this stage, we select half of dragonflies from current population randomly which will be combined with the OBL, and then compute their fitness functions respectively based on the DA to choose the best solutions from A new population will be generated using the OBLDA algorithm in each iteration.All the steps will be carried out constantly until the final conditions are reached.
Finally, the flowchart of OBLDA for finding the optimal threshold values is shown in Figure 2.

Experiments
In this section, firstly, we present a brief description of the experimental setup associated with multilevel thresholding.Then we show the parameter values which are used in all algorithms.

Experimental Setup
In this paper, two thresholding techniques namely Otsu's method and Kapur's entropy are used to determine the appropriate thresholds for color image segmentation.The performance of the proposed algorithm is compared with seven widely used optimization algorithms, namely the DA, PSO, SCA, BA, HSO, ALO, and SSA algorithms.All experiments are performed on ten test images with the following number of thresholds: 4, 6, 8, 10, and 12.

Parameter Setting
As we know, the value of parameters is of significance in determining the performance of each algorithm.In this paper, all algorithms have the same stopping conditions for a fair comparison.The max iteration is 500 with a total of 30 runs each algorithm, and the population size is set to be 30.The parameters of all algorithms are presented in Table 2.

Segmented Image Quality Metrics
a.The peak signal-to-noise ratio (PSNR) The parameter of PSNR based on the produced mean square error (MSE) is used to verify the difference of the original image and segmented image [53], and the value refers to the quality of the segmented image.The PSNR is evaluated by Equation (13).
where I(i, j) and K(i, j) are the original and segmented images which are of size M × N. b.The feature similarity index (FSIM) A comparison of the features contained in the segmented image is performed using the FSIM and it is calculated as Equation (14).A higher FSIM value indicates a higher segmentation accuracy of the original image [54].
where Ω represents the entire domain of the image.PC m (x) represents the phase congruence which is selected from the larger of the original and segmented images.The value of S L (x) is defined as follows: where, S PC (x) is the similarity of phase consistency between two images.S G (x) is the similarity of gradient magnitude between two images.c.The structure similarity index (SSIM) The SSIM index, helps to access the structural similarity between the original and segmented image [55].The value of SSIM index is in the range [0, 1], and a higher value indicates better performance of algorithm.The value of SSIM equals 1 meaning that the two images are the same.The SSIM is defined as: where, µ x and µ y represent the average intensity of the original and segmented images respectively.σ 2 x and σ 2 y represent the variance of the original and segmented images respectively.σ xy is the covariance between the original and segmented images.c 1 and c 2 are constants.

Results and Discussions
In this section, we present the experimental results of the proposed algorithm compared to other algorithms based on Kapur's entropy and Otsu's method.The optimal threshold values for each of the color component as obtained by all algorithms and the segmented images can be found from [56].The segmented results of natural images are show in Figure 3. Due to there being no absolute standard for a given image, we manually labeled the target region and separated it according to segmented results from the Berkeley dataset.And then took it as the ground truth for experimental comparison.It can be found from the figures that the targets obtained by the proposed method have been successfully separated from the complex background, which are similar to ground truth.Figure 4.
shows the satellite segmented images with different threshold levels.We can observe from these figures, the images with higher level contains more detail than the others.The analysis in terms of PSNR, FSIM, SSIM, the average fitness function values and STD.A statistical analysis is also performed to see the advantage of the proposed algorithm outperforms all the other algorithms.All these are discussed in the following section.

Objective Function Measure
Between-class variance method and Kapur's entropy are used as the objective functions that are maximized based on OBLDA, DA, PSO, SCA, BA, HSO, ALO, and SSA.In this way, each solution is represented by a real value which shows the quality of a solution.Table 3 present the average fitness function values based multilevel thresholding after application of all algorithms, and the higher value of average fitness function indicates the better solution (bold is the best).As seen from the results, the proposed method obtained the highest value for almost all the cases when compared to DA, PSO, SCA, BA, HSO, ALO, and SSA.This indicates that the performance of the proposed algorithm is the most outstanding, it can improve segmentation accuracy while ensuring algorithm stability.For instance, the optimal fitness function values are 33.6991, 33.3882, 33.3775, 32.1851, 31.6970, 33.4260, 33.5922, and 33.4392 for OBLDA, DA, PSO, SCA, BA, HSO, ALO, and SSA, respectively, when Kapur's method is applied on Image 7, the average fitness function value of the OBLDA algorithm is the highest and the ALO algorithm comes at the second rank followed by SSA, and the BA is the worst algorithm because of an exponentially varying pulse emission rate.The experiment results also shows that the proposed algorithm not only has the advantage of multidimensional function for extremum problems, but also shows strong engineering practicability in color segmentation.

Stability Analysis
Measure of how far a given variable is from the mean, which is used to evaluate stability.A lower value of STD indicates that the method is more stable.It is defined as follows: The lower the STD, the more stable the algorithm.Then the competitive results for 30 runs of OBLDA and other algorithms are shown in Tables 4 and 5 (bold is the best).From the whole results, it is found that the OBLDA algorithm obtained the lowest values in 46 out of 50 cases (Otsu's method) and 47 out of 50 cases (Kapur's entropy).Therefore, it is evident that the HHO-DE algorithm has more remarkable stability than other algorithms.

Segmentation Evaluation
In this section, we use PSNR, SSIM, and FSIM indicators to evaluate the segmentation accuracy of each algorithm.The higher the value of the indicator, the better the similarity with the original image (i.e., the higher segmentation quality).For a given image, if we take a limiting case into consideration, meaning there is no difference between original image and segmented image, the values of PSNR, FSIM, and SSIM are 1, 1, and infinity.Meanwhile, in order to easily and clearly observe in a way that is convenient for visual analysis, the line graphs of PSNR, SSIM, and FSIM are given in Figures 5-10 respectively, From these figures it can be seen that, the black lines with square data points which represents the proposed method are located above other lines for the majority cases.Note that in order to make the structure more clear, we give the relevant experimental results in [56].

Segmentation Evaluation
In this section, we use PSNR, SSIM, and FSIM indicators to evaluate the segmentation accuracy of each algorithm.The higher the value of the indicator, the better the similarity with the original image (i.e. the higher segmentation quality).For a given image, if we take a limiting case into consideration, meaning there is no difference between original image and segmented image, the values of PSNR, FSIM, and SSIM are 1, 1, and infinity.Meanwhile, in order to easily and clearly observe in a way that is convenient for visual analysis, the line graphs of PSNR, SSIM, and FSIM are given in Figure 5-10 respectively, From these figures it can be seen that, the black lines with square data points which represents the proposed method are located above other lines for the majority cases.Note that in order to make the structure more clear, we give the relevant experimental results in [56].
First of all, the PSNR index based on the grayscale information is used to estimate the degree of image distortion.The PSNR index values of the segmented images obtained by OBLDA, DA, PSO, SCA, BA, HSO, ALO, and SSA algorithm based on between-class variance and Kapur's entropy are shown in Figures 5 and 6.PSNR index gives a higher value when the degree of image distortion is small.A comparative analysis of the results indicates that the performance of all the algorithms was nearly close when K = 4, however, the proposed algorithm still show certain superiority over the other algorithms (such as Images 3 and 9 ).For instance, the PSNR values are 17.7278, 17.4278, 17.2685, 17.2833, 17.4849, 17.2554, 17.7270, and 17.7068 for OBLDA, DA, PSO, SCA, BA, HSO, ALO, and PSO, respectively, when the segmentation operation of Image 3 using Otsu's method.The figures intuitively shows that as the number of thresholds increases, the PSNR values also increases for all algorithms, and the difference of value between the proposed method and other approaches is becoming more and more remarkable.It is evident that the proposed algorithm based on betweenclass variance or Kapur's entropy for different threshold values is superior in performance to the other algorithms compared.Then, the FSIM index based on phase consistency and spatial gradient feature is used to compare the quality of the segmented images and the range is [0,1].The FSIM values achieved using Kapur and Otsu method based OBLDA, DA, PSO, SCA, BA, HSO, ALO, and SSA are shown in Figures 7  and 8. From the experimental results it is clearly observed that the proposed algorithm outperforms all the other algorithms for each benchmark image since the FSIM index in all cases obtains the highest values.Hence, the OBLDA algorithm using Kapur's entropy and Otsu's method has better quality for multilevel color image thresholding segmentation compared to other algorithms.For example, the FSIM index values in case of Image 10 with 10 thresholds based Kapur's method are 0.9737, 0.9726, 0.9709, 0.9704, 0.9651, 0.9705, 0.9726, and 0.9731 for OBLDA, DA, PSO, SCA, BA, HSO, ALO, and PSO, respectively.It can be seen that the OBLDA came in the first rank and it has the highest FSIM values.The SSA algorithm is ranked second followed by ALO and DA, respectively.Due to PSO and SCA algorithm using linear decreasing inertia weight and control parameter to transform exploration and exploitation, they have no advantages in experiments.Through experimental results comparison and Figures 7 and 8, it is no doubt that the FSIM value of the OBLDA associated with Kapur's and Otsu's method is largest and has the smallest gap with 1.The experiments also indicate that the proposed algorithm has high optimization accuracy and improves the segmentation quality.
After that, the SSIM index based on brightness, contrast and structural information is used to assess the visual similarity of the original image and the segmented image.The SSIM index values of the segmented images using Kapur's entropy and Otsu methods obtained by all algorithms are given in Figures 9 and 10.A higher value of SSIM index indicates that the segmented image is more similar to the original image.It can be seen from the results that, for the same image segmentation, the proposed algorithm achieves the best results which are more competitive in the SSIM values.At the same time, as the number of thresholds increases, the value of SSIM keeps increasing, and all algorithms can obtain more original image information Hence, we can extract the interested objects more accurately, and the segmented images is more similar to the original images visually.For example, the SSIM values of Image 2 using Otsu's methods (OBLDA) are 0.6805, 0.7857, 0.8364, 0.8798, and 0.9031 for the number of thresholds is 4, 6, 8, 10, 12, respectively, as a contrast, the SSIM values of Image 2 using Otsu's methods (DA) are 0.6775, 0.7754, 0.8354, 0.8788, and 0.9004 for the number of thresholds is 4, 6, 8, 10, and 12, respectively.First of all, the PSNR index based on the grayscale information is used to estimate the degree of image distortion.The PSNR index values of the segmented images obtained by OBLDA, DA, PSO, SCA, BA, HSO, ALO, and SSA algorithm based on between-class variance and Kapur's entropy are shown in Figures 5 and 6.PSNR index gives a higher value when the degree of image distortion is small.A comparative analysis of the results indicates that the performance of all the algorithms was nearly close when K = 4, however, the proposed algorithm still show certain superiority over the other algorithms (such as Images 3 and 9).For instance, the PSNR values are 17.7278, 17.4278, 17.2685, 17.2833, 17.4849, 17.2554, 17.7270, and 17.7068 for OBLDA, DA, PSO, SCA, BA, HSO, ALO, and PSO, respectively, when the segmentation operation of Image 3 using Otsu's method.The figures intuitively shows that as the number of thresholds increases, the PSNR values also increases for all algorithms, and the difference of value between the proposed method and other approaches is becoming more and more remarkable.It is evident that the proposed algorithm based on between-class variance or Kapur's entropy for different threshold values is superior in performance to the other algorithms compared.
Then, the FSIM index based on phase consistency and spatial gradient feature is used to compare the quality of the segmented images and the range is [0, 1].The FSIM values achieved using Kapur and Otsu method based OBLDA, DA, PSO, SCA, BA, HSO, ALO, and SSA are shown in Figures 7  and 8. From the experimental results it is clearly observed that the proposed algorithm outperforms all the other algorithms for each benchmark image since the FSIM index in all cases obtains the highest values.Hence, the OBLDA algorithm using Kapur's entropy and Otsu's method has better quality for multilevel color image thresholding segmentation compared to other algorithms.For example, the FSIM index values in case of Image 10 with 10 thresholds based Kapur's method are 0.9737, 0.9726, 0.9709, 0.9704, 0.9651, 0.9705, 0.9726, and 0.9731 for OBLDA, DA, PSO, SCA, BA, HSO, ALO, and PSO, respectively.It can be seen that the OBLDA came in the first rank and it has the highest FSIM values.The SSA algorithm is ranked second followed by ALO and DA, respectively.Due to PSO and SCA algorithm using linear decreasing inertia weight and control parameter to transform exploration and exploitation, they have no advantages in experiments.Through experimental results comparison and Figures 7 and 8, it is no doubt that the FSIM value of the OBLDA associated with Kapur's and Otsu's method is largest and has the smallest gap with 1.The experiments also indicate that the proposed algorithm has high optimization accuracy and improves the segmentation quality.
After that, the SSIM index based on brightness, contrast and structural information is used to assess the visual similarity of the original image and the segmented image.The SSIM index values of the segmented images using Kapur's entropy and Otsu methods obtained by all algorithms are given in Figures 9 and 10.A higher value of SSIM index indicates that the segmented image is more similar to the original image.It can be seen from the results that, for the same image segmentation, the proposed algorithm achieves the best results which are more competitive in the SSIM values.At the same time, as the number of thresholds increases, the value of SSIM keeps increasing, and all algorithms can obtain more original image information Hence, we can extract the interested objects more accurately, and the segmented images is more similar to the original images visually.For example, the SSIM values of Image 2 using Otsu's methods (OBLDA) are 0.6805, 0.7857, 0.8364, 0.8798, and 0.9031 for the number of thresholds is 4, 6, 8, 10, 12, respectively, as a contrast, the SSIM values of Image 2 using Otsu's methods (DA) are 0.6775, 0.7754, 0.8354, 0.8788, and 0.9004 for the number of thresholds is 4, 6, 8, 10, and 12, respectively.
Through the above analysis, the proposed algorithm using Kapur's method and Otsu's method provide a great balance between exploitation and exploration in ten benchmark images at low and high threshold numbers.The performance of the OBLDA based multilevel thresholding for color image segmentation is satisfactory, for the reason that the segmented images has high quality and accuracy.It is evident the proposed algorithm can be effectively for solving color image segmentation problems.

Statistical Analysis
In this section, two well-established non-parametric tests are used to evaluate the significant difference between algorithms, meanwhile prove the improvement of OBLDA algorithm is remarkable in a statistical way, namely the Wilcoxon rand sum test [45] and Freidman test [46], respectively.The former is used for pairwise comparison and the latter for multiple comparison.
In the Wilcoxon rand sum test, the null hypothesis is defined as: there is no significant difference between the OBLDA algorithm and seven other algorithms.The alternative hypothesis considers a significant difference among them.The p-values are applicable to judge "whether or not to reject the null hypothesis".If p-value is greater than 0.05 and h = 0 simultaneously, the null hypothesis will be rejected, indicating there is no significant difference among all algorithms.By contrast, the alternative hypothesis will be accepted at 5% significance level in which p is less than 0.05 or h = 1.The experiments are conducted 30 runs, and all obtained data are used for the testing.Table 6 shows the results of Wilcoxon rand sum test.It can be seen the table that P-values are much less than 0.05, both Otsu's method and Kapur's entropy.Therefore, there is a significant difference between OBLDA and other algorithms, in other words, the performance of proposed method has an remarkable improvement.The null hypothesis H 0 in Friedman test states equality of medians between the algorithms, and the alternative hypothesis H 1 indicates the difference.The experimental results are shown in Table 7 (bold is the best), including the average ranking of each algorithm at different threshold levels, the average overall ranking on all cases, and the P-value.It is observed that the proposed method obtains the best rank in the majority of cases.Meanwhile, the small P-value indicates the significant difference between the proposed method and others.Therefore, the promising results indicate that the performance of the OBLDA algorithm is improved markedly again.To sum up, the proposed method based on multilevel thresholding segmentation has superior performance compared with other algorithms.

Convergence Performance
In this section, "Image 1" and "Image 10" are used for testing.The convergence curves of all algorithms using Otsu's technique and Kapur's entropy at 12 threshold levels are shown in Figure 11.
From the figures, it is detected that the OBLDA algorithm has the most remarkable convergence property, and is capable of maintaining a good balance between exploratory and exploitative tendencies.

Convergence Performance
In this section, "Image 1" and "Image 10" are used for testing.The convergence curves of all algorithms using Otsu's technique and Kapur's entropy at 12 threshold levels are shown in Figure 11.From the figures, it is detected that the OBLDA algorithm has the most remarkable convergence property, and is capable of maintaining a good balance between exploratory and exploitative tendencies.

Computation Time
The average central processing unit (CPU) time of different algorithms considering all cases at 30 runs is given in Table 8.It can be observed that the exhaustive search method takes a long time for optimization, but by contrast the DA and OBLDA algorithms obtain competitive results.When K = 2, the average time of exhaustive search method is already 600.676s., which has grown to about 200 times DA or OBLDA algorithms.moreover, as the number of thresholds increases, the average time of each algorithm increases markedly, but the exhaustive search method behaves the fastest growth rates, which is far greater than DA and OBLDA algorithms.Then, it is seen that the OBLDA algorithm is slightly faster than DA, and can obtain the most appropriate threshold values.To sum up, the proposed method is significantly effective in color image multilevel thresholding.

Computation Time
The average central processing unit (CPU) time of different algorithms considering all cases at 30 runs is given in Table 8.It can be observed that the exhaustive search method takes a long time for optimization, but by contrast the DA and OBLDA algorithms obtain competitive results.When K = 2, the average time of exhaustive search method is already 600.676s., which has grown to about 200 times DA or OBLDA algorithms.moreover, as the number of thresholds increases, the average time of each algorithm increases markedly, but the exhaustive search method behaves the fastest growth rates, which is far greater than DA and OBLDA algorithms.Then, it is seen that the OBLDA algorithm is slightly faster than DA, and can obtain the most appropriate threshold values.To sum up, the proposed method is significantly effective in color image multilevel thresholding.

Application in Plant Canopy Image
In this section, the OBLDA algorithm-based multilevel thresholding technique is applied to the field of plant canopy image segmentation.The purpose of this experiment is to verify whether the proposed method can solve segmentation problems in engineering practice.This section takes two plant canopy images as an example.Plant canopy is the first to be exposed to light and the external atmosphere, and it is closely related with plant growth.Hence, an accurate segmentation result of the plant canopy is vitally necessary for the assessment of plant growing state.
Figure 12 shows the original image, ground truth, and segmented image.It can be seen from the figures that the leaves have been successfully separated from the background, which are similar to the ground truth.Therefore, the proposed method can be used as a competitive technique to solve the segmentation problems in the plant canopy image.

Application in Plant Canopy Image
In this section, the OBLDA algorithm-based multilevel thresholding technique is applied to the field of plant canopy image segmentation.The purpose of this experiment is to verify whether the proposed method can solve segmentation problems in engineering practice.This section takes two plant canopy images as an example.Plant canopy is the first to be exposed to light and the external atmosphere, and it is closely related with plant growth.Hence, an accurate segmentation result of the plant canopy is vitally necessary for the assessment of plant growing state.
Figure 12 shows the original image, ground truth, and segmented image.It can be seen from the figures that the leaves have been successfully separated from the background, which are similar to the ground truth.Therefore, the proposed method can be used as a competitive technique to solve the segmentation problems in the plant canopy image.

Original image
Ground truth Segmented image Plant 1 Plant 2 Figure 12.The original image, ground truth, and segmented results.

Conclusions
The paper presents a novel multilevel thresholding technique based on the OBLDA algorithm for solving complex image segmentation problems.The opposite-based learning strategy can strengthen the diversity of population and avoid sinking into a local optimum during the optimization process.The between-class variance and Kapur's entropy are used as objective functions, which are maximized to find the optimal threshold values.All experiments are performed on the five satellite images and five natural images, with the following number of thresholds: 4, 6, 8, 10, and 12.The performance of proposed algorithm is then compared with seven other algorithms.In addition, PSNR, FSIM, SSIM, the average fitness function values, computation time and STD are utilized as comparison metrics.
The results obtained indicate that most indicators showed a small difference in the case of K = 4, but the superiority of proposed algorithm becomes more and more remarkable as the number of thresholds increases.The competitive values of average fitness function, PSNR, FSIM, and SSIM prove the high accuracy of the OBLDA algorithm in the process of optimization.The significantly

Conclusions
The paper presents a novel multilevel thresholding technique based on the OBLDA algorithm for solving complex image segmentation problems.The opposite-based learning strategy can strengthen the diversity of population and avoid sinking into a local optimum during the optimization process.The between-class variance and Kapur's entropy are used as objective functions, which are maximized to find the optimal threshold values.All experiments are performed on the five satellite images and five natural images, with the following number of thresholds: 4, 6, 8, 10, and 12.The performance of proposed algorithm is then compared with seven other algorithms.In addition, PSNR, FSIM, SSIM, the average fitness function values, computation time and STD are utilized as comparison metrics.
The results obtained indicate that most indicators showed a small difference in the case of K = 4, but the superiority of proposed algorithm becomes more and more remarkable as the number of thresholds increases.The competitive values of average fitness function, PSNR, FSIM, and SSIM prove the high accuracy of the OBLDA algorithm in the process of optimization.The significantly superior results of STD verify that the proposed method has a good stability.The Wilcoxon's rank-sum test with 5% degree and Friedman test confirm the remarkable merits of the OBLDA algorithm compared to other algorithms in almost all cases.The promising results of computation time confirm the proposed method can converge to global optimal at a relatively rapid speed.The segmented results of plant canopy images is little different from groundtruth, and it can demonstrate the strong practicality of OBLDA algorithm in engineering.In addition, the OBLDA algorithm not only is effectively applied to Otsu's method, but also has good adaptability in Kapur's entropy.On the other hand, the proposed method shows excellent performance whether on satellite images or natural images, so it is provided with strong robustness.Hence, the proposed method can accomplish real-world and complex tasks of image segmentation effectively, as well as providing a more precise technique for multilevel segmentation.
In the future, we aim to find a much simpler and more effective method to strengthen the performance of the dragonfly algorithm for color image segmentation.We will also take up the deep study of how to make the proposed method adaptive to more practical engineering problems with superior performance.
The emergence of performance made by the Kilauea eruption.Symmetry 2019, 11, x FOR PEER REVIEW 2 of 26 Attraction towards a food source.(e) Distraction outwards an enemy.

Figure 2 .
Figure 2. Framework of the dragonfly algorithm with opposition-based learning (OBLDA) based multilevel thresholding.

Figure 2 .
Figure 2. Framework of the dragonfly algorithm with opposition-based learning (OBLDA) based multilevel thresholding.

Figure 11 .
Figure 11.The convergence curves for fitness function at 12 levels of thresholding.

Figure 11 .
Figure 11.The convergence curves for fitness function at 12 levels of thresholding.

Figure 12 .
Figure 12.The original image, ground truth, and segmented results.

Table 1 .
Original test images and the corresponding histograms.

Table 1 .
Original test images and the corresponding histograms.

Table 1 .
Original test images and the corresponding histograms.

Table 2 .
Parameters of each algorithm.

Table 3 .
The average fitness values using Otsu's method and Kapur's method in comparison with other algorithms.

Table 4 .
The standard deviation (STD) values using Otsu's method in comparison with other algorithms.

Table 5 .
The STD values using Kapur's method in comparison with other algorithms.

Table 6 .
Statistical analysis of Wilcoxon rand sum test for the results.

Table 7 .
Statistical analysis of Friedman test for the results.

Table 8 .
The average time (s) considering all images under different threshold levels.

Table 8 .
The average time (s) considering all images under different threshold levels.