Abstract
Multilevel thresholding is a very active research field 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 modified version of dragonfly 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 fitness 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 effective method for multilevel thresholding color image segmentation.
1. 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, graph-based method, and thresholding-based method [4,5,6]. The criterion of the region-based method is that the entire image is divided into lots of subregions continuously, and then the subregions with similar characteristics are merged to obtain objects [7]; the clustering-based method divides the image pixels into several sub-collections based on the similarity such as K-means and hierarchical clustering algorithm [8]; in the graph-based method, the global segmentation and local information processing can be combined together based on the good correspondence between image and graph theory features [9]; thresholding-based method which employs the image histogram, and classifies the image pixels into corresponding regions by comparing with threshold values [10]. The thresholding technique has become the most popular compared with the existing methods because of its high accuracy and simple implementation. It composes of bi-level and multilevel segmentation depending on the number of thresholds [11]. Bi-level segmentation means a given image should be segmented into two classes with respect to a single threshold value, namely, object and background. Nevertheless, it is difficult to select a preeminent threshold when the histogram of the image is multi-modal [12]. Hence, in order to improve the universality and practicability of the thresholding-based method, some scholars and researchers extend bi-level into multi-level thresholding. This is tantamount to saying that a given image will be subdivided into several non-overlapping classes according to multiple threshold values.
Numerous techniques based on respective criteria has been developed for getting appropriate thresholds during the last couple of decades. They can be divided into two different categories: global and local [13,14]. Otsu’s method and Kapur’s entropy which belong to the former are the most widely used [15]. Otsu proposed an available method which selects the optimal threshold values by maximizing between class variance of each segmented class in 1979 [16]. Kapur’s method was presented by J. N. Kapur et al. in 1985, which is used to classify image into multiple classes by comparing the entropy of histogram [17], and a higher entropy value indicates more homogeneous classes. However, the significant limitations among the available techniques are that the computational time increases with the number of thresholds increasing, and then image segmentation becomes too complicated for classic methods to obtain satisfying threshold values [18,19]. Therefore, further research is proceeding in the field of multilevel thresholding color image segmentation to enhance the performance of traditional methods.
The purpose of optimization is to find the optimal solutions which are more realistic and feasible for a specific problem under certain constraints [20]. The segmentation of each image can be regarded as a different single-objective optimization problem. More specifically, the objective functions which to be optimized are established based on specific criteria, such as Otsu’s method and Kapur’s entropy in this paper. The decision variables represent segmentation thresholds of an image. The current problem has two constraint conditions, firstly the gray level must be the integer, then its values should be between 0 and 255. Swarm intelligence (SI) algorithms inspired by nature with respective unique global and local searching strategies have been effectively applied to the optimization field [21]. What’s more, in order to reduce the time complexity of traditional thresholding methods and maintain accuracy effectively, many scholars are devoted to combining multilevel thresholding image segmentation with SI algorithms practically. Such as He and Huang proposed a modified firefly algorithm (MFA) based on the processing of mutual attraction and movement in the swarm for color image segmentation, using between-class variance, Kapur’s entropy, and minimum cross entropy techniques [21]. Khairuzzaman and Chaudhury presented the grey wolf optimizer (GWO) using the Otsu’s method and Kapur’s method for image segmentation, which is inspired from the social hierarchy and hunting behavior of grey wolves [22]. In addition, particle swarm optimization (PSO) [23], bacterial foraging optimization (BFO) [24], bat algorithm (BA) [25], whale optimization algorithm (WOA) [26], artificial bee colony (ABC) [27], and cuckoo search algorithm (CSA) [28] are also used extensively in multilevel thresholding segmentation.
Meta-heuristic algorithms have their own limitations which reduce the possibility of obtaining the global optimal values. So far a mass of strategies have been propounded to avoid these weaknesses. Opposition-based learning (OBL) is a more remarkable and general-purpose choice among them [29], 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.
2. 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.
Table 1.
Original test images and the corresponding histograms.
3. 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.
3.1. Thresholding Technique
3.1.1. 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 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 classes so that there are optimal thresholds, through maximization of the objective function.
The objective function based between-class variance is calculated by:
where 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 are obtained by maximizing the between-class variance objective function. A higher value of objective function refers to better quality of the segmented images.
3.1.2. 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 optimal thresholds based on the Kapur’s entropy maximization:
where 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.
3.2. 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 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 and 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.
Figure 1.
Primitive corrective patterns of dragonfly swarm [33].
Separation:
where denotes the position of the current dragonfly. denotes the j-th position of neighboring dragonfly, and is the number of neighboring dragonflies.
Alignment:
where is the velocity of the j-th neighboring dragonfly.
Cohesion:
where represents the position of the current dragonfly. represents the j-th position neighboring dragonfly, and is the number of neighboring dragonflies.
Attraction towards a food source:
where shows the position of the current dragonfly, and 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 denotes the position of the current dragonfly, 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 is the current iteration, and 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 based on opposition-based learning. |
| Initialize step vectors . |
| WHILE the end condition is not satisfied |
| FOR |
| 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 and enemy . |
| Update and |
| Calculate and 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 , which represents the optimal values for multilevel thresholding segmentation. |
3.3. 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 be a point in D-dimensional space, and the opposite of is calculated by as follow:
where and are predefined as the lower and the upper bound of the search place respectively. 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 of size as its initial solutions. 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 with a size of randomly.
where, and are the upper and lower bound of search space.
Step 2: Calculate the opposite population as:
Step 3: Select a fitter one between and 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 . 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.
Figure 2.
Framework of the dragonfly algorithm with opposition-based learning (OBLDA) based multilevel thresholding.
4. 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.
4.1. 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.
4.2. 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.
Table 2.
Parameters of each algorithm.
All the algorithms are developed by using “Matlab 2014b” and implemented on “Windows 10-64bit” environment on a computer having Pentium(R) Dual core T4500 @ 2.30 GHz and 2 GB of memory.
4.3. 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 and are the original and segmented images which are of size .
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. represents the phase congruence which is selected from the larger of the original and segmented images.
The value of is defined as follows:
where, is the similarity of phase consistency between two images. 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 , 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, and represent the average intensity of the original and segmented images respectively. and represent the variance of the original and segmented images respectively. is the covariance between the original and segmented images. and are constants.
5. 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.
Figure 3.
The segmented images of “Image 2”, “Image 3”, and “Image 4” using the threshold technique.
Figure 4.
The segmented images of “Image 7”, “Image 8” and “Image 9” at 4, 8, and 12 threshold levels.
5.1. 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.
Table 3.
The average fitness values using Otsu’s method and Kapur’s method in comparison with other algorithms.
5.2. 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 Table 4 and Table 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.
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.
5.3. 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, Figure 6, Figure 7, Figure 8, Figure 9 and Figure 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].
Figure 5.
Comparison of PSNR values using Otsu’s method, at K = 4, 6, 8, 10, and 12.
Figure 6.
Comparison of PSNR values using Kapur’s entropy, at K = 4, 6, 8, 10, and 12.
Figure 7.
Comparison of feature similarity index (FSIM) values using Otsu’s method, at K = 4, 6, 8, 10, and 12.
Figure 8.
Comparison of FSIM values using Kapur’s entropy, at K = 4, 6, 8, 10, and 12.
Figure 9.
Comparison of SSIM values using Otsu’s method, at K = 4, 6, 8, 10, and 12.
Figure 10.
Comparison of structure similarity index (SSIM) values using Kapur’s entropy, at K = 4, 6, 8, 10, and 12.
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 Figure 5 and Figure 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 Figure 7 and Figure 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 Figure 7 and Figure 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 Figure 9 and Figure 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.
5.4. 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.
Table 6.
Statistical analysis of Wilcoxon rand sum test for the results.
The null hypothesis in Friedman test states equality of medians between the algorithms, and the alternative hypothesis 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.
Table 7.
Statistical analysis of Friedman test for the results.
5.5. 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.
Figure 11.
The convergence curves for fitness function at 12 levels of thresholding.
5.6. 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.676 s., 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.
Table 8.
The average time (s) considering all images under different threshold levels.
5.7. 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.
Figure 12.
The original image, ground truth, and segmented results.
6. 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.
Author Contributions
X.B., H.J. and C.L. contributed to the idea of this paper; X.B. performed the experiments; X.B. wrote the paper; X.B., H.J. and C.L. contributed to the revision of this paper.
Funding
This research received no external funding.
Acknowledgments
The authors would like to thank the anonymous reviewers for their constructive comments and suggestions.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Robert, M.; Carsten, M.; Olivier, E.; Jochen, P.; Noordhoek, N.J.; Aravinda, T.; Reddy, V.Y.; Chan, R.C.; Jürgen, W. Automatic segmentation of rotational X-ray images for anatomic intra-procedural surface generation in atrial fibrillation ablation procedures. IEEE Trans. Med. Imaging. 2010, 29, 260–272. [Google Scholar]
- Qian, P.; Zhao, Y.; Jiang, K.; Deng, Z.; Wang, S.; Muzic, R.F. Knowledge-leveraged transfer fuzzy C-Means for texture image segmentation with self-adaptive cluster prototype matching. Knowl. Based Syst. 2017, 130, 33–50. [Google Scholar]
- Lv, J.; Wang, F.; Xu, L.; Ma, Z.; Yang, B. A segmentation method of bagged green apple image. Sci. Hortic. 2019, 246, 411–417. [Google Scholar] [CrossRef]
- Lee, S.H.; Koo, H.I.; Cho, N.I. Image segmentation algorithms based on the machine learning of features. Pattern Recognit. Lett. 2010, 31, 2325–2336. [Google Scholar] [CrossRef]
- Breve, F. Interactive image segmentation using label propagation through complex networks. Expert Syst. Appl. 2019, 123, 18–33. [Google Scholar] [CrossRef]
- Tang, N.; Zhou, F.; Gu, Z.; Zheng, H.; Yu, Z.; Zheng, B. Unsupervised pixel-wise classification for Chaetoceros image segmentation. Neurocomputing 2018, 318, 261–270. [Google Scholar] [CrossRef]
- Meher, B.; Agrawal, S.; Panda, R.; Abraham, A. A survey on region based image fusion methods. Inf. Fusion 2019, 48, 119–132. [Google Scholar] [CrossRef]
- Mittal, H.; Saraswat, M. An automatic nuclei segmentation method using intelligent gravitational search algorithm based superpixel clustering. Swarm Evol. Comput. 2019, 45, 15–32. [Google Scholar] [CrossRef]
- Chen, J.; Zheng, H.; Lin, X.; Wu, Y.; Su, M. A novel image segmentation method based on fast density clustering algorithm. Eng. Appl. Artif. Intell. 2018, 73, 92–110. [Google Scholar] [CrossRef]
- Ishak, A.B. A two-dimensional multilevel thresholding method for image segmentation. Appl. Soft Comput. 2017, 52, 306–322. [Google Scholar] [CrossRef]
- Manikandan, S.; Ramar, K.; Iruthayarajan, M.W.; Srinivasagan, K.G. Multilevel thresholding for segmentation of medical brain images using real coded genetic algorithm. Measurement 2014, 47, 558–568. [Google Scholar] [CrossRef]
- Fu, X.; Liu, T.; Xiong, Z.; Smaill, B.H.; Stiles, M.K.; Zhao, J. Segmentation of histological images and fibrosis identification with a convolutional neural network. Comput. Biol. Med. 2018, 98, 147–158. [Google Scholar] [CrossRef]
- Li, J.; Tang, W.; Wang, J.; Zhang, X. A multilevel color image thresholding scheme based on minimum cross entropy and alternating direction method of multipliers. Optik 2019, 183, 30–37. [Google Scholar] [CrossRef]
- Jiang, Y.; Tasi, P.; Yeh, W.; Cao, L. A honey-bee-mating based algorithm for multilevel image segmentation using Bayesian theorem. Appl. Soft Comput. 2017, 52, 1181–1190. [Google Scholar] [CrossRef]
- Feng, Y.; Zhao, H.; Li, X.; Zhao, X.; Li, H. A multi-scale 3D Otsu thresholding algorithm for medical image segmentation. Dig. Signal Process. 2017, 60, 186–199. [Google Scholar] [CrossRef]
- Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef]
- Kapura, J.N.; Sahoob, P.K.; Wongc, A.K.C. A new method for gray-level picture thresholding using the entropy of the histogram. Comput. Vis. Gr. Image Proc. 1985, 29, 273–285. [Google Scholar] [CrossRef]
- Fredo, A.R.J.; Abilash, R.S.; Kumar, C.S. Segmentation and analysis of damages in composite images using multi-level threshold methods and geometrical features. Measurement 2017, 100, 270–278. [Google Scholar] [CrossRef]
- Demirhan, A.; Törü, M.; Güler, İ. Segmentation of tumor and edema along with healthy tissues of brain using wavelets and neural networks. IEEE J. Biomed. Health Inf. 2015, 19, 1451–1458. [Google Scholar] [CrossRef] [PubMed]
- Dirami, A.; Hammouche, K.; Diaf, M.; Siarry, P. Fast multilevel thresholding for image segmentation through a multiphase level set method. Signal Process. 2013, 93, 139–153. [Google Scholar] [CrossRef]
- He, L.; Huang, S. Modified firefly algorithm based multilevel thresholding for color image segmentation. Neurocomputing 2017, 240, 152–174. [Google Scholar] [CrossRef]
- Khairuzzaman, A.K.M.; Chaudhury, S. Multilevel thresholding using grey wolf optimizer for image segmentation. Expert Syst. Appl. 2017, 86, 64–76. [Google Scholar] [CrossRef]
- Pham, T.X.; Siarry, P.; Oulhadj, H. Integrating fuzzy entropy clustering with an improved PSO for MRI brain image segmentation. Appl. Soft Comput. 2018, 65, 230–242. [Google Scholar] [CrossRef]
- Pan, Y.; Xia, Y.; Zhou, T.; Fulham, M. Cell image segmentation using bacterial foraging optimization. Appl. Soft Comput. 2017, 58, 770–782. [Google Scholar] [CrossRef]
- Ye, Z.; Wang, M.; Liu, W.; Chen, S. Fuzzy entropy based optimal thresholding using bat algorithm. Appl. Soft Comput. 2015, 31, 381–395. [Google Scholar] [CrossRef]
- Aziz, M.A.E.; Ewees, A.A.; Hassanien, A.E. Whale Optimization Algorithm and Moth-Flame Optimization for multilevel thresholding image segmentation. Expert Syst. Appl. 2017, 83, 242–256. [Google Scholar] [CrossRef]
- Gao, H.; Fu, Z.; Pun, C.; Hu, H.; Lan, R. A multi-level thresholding image segmentation based on an improved artificial bee colony algorithm. Comput. Electr. Eng. 2018, 70, 931–938. [Google Scholar] [CrossRef]
- Pare, S.; Kumar, A.; Bajaj, V.; Singh, G.K. An efficient method for multilevel color image thresholding using cuckoo search algorithm based on minimum cross entropy. Appl. Soft Comput. 2017, 61, 570–592. [Google Scholar] [CrossRef]
- Remli, M.A.; Mohamad, M.S.; Deris, S.; Samah, A.A. Cooperative enhanced scatter search with opposition-based learning schemes for parameter estimation in high dimensional kinetic models of biological systems. Expert Syst. Appl. 2019, 116, 131–146. [Google Scholar] [CrossRef]
- Mahdavi, S.; Rahnamayan, S.; Deb, K. Opposition based learning: A literature review. Swarm Evol. Comput. 2018, 39, 1–23. [Google Scholar] [CrossRef]
- Bulbul, S.M.A.; Pradhan, M.; Roy, P.K.; Pal, T. Opposition-based krill herd algorithm applied to economic load dispatch problem. Ain Shams Eng. J. 2018, 9, 423–440. [Google Scholar] [CrossRef]
- Ewees, A.A.; Elaziz, M.A.; Houssein, E.H. Improved grasshopper optimization algorithm using opposition-based learning. Expert Syst. Appl. 2018, 112, 156–172. [Google Scholar] [CrossRef]
- Seyedali, M. Dragonfly algorithm: a new meta-heuristic optimization technique for solving single-objective, discrete, and multi-objective problems. Neural Comput. Appl. 2016, 27, 1053–1073. [Google Scholar]
- Shen, L.; Huang, X.; Fan, C. Double-group particle swarm optimization and its application in remote sensing image segmentation. Sensors 2018, 18, 1393. [Google Scholar] [CrossRef]
- Díaz-Cortés, M.; Ortega-Sánchez, N.; Hinojosa, S.; Oliva, D.; Cuevas, E.; Rojas, R.; Demin, A. A multi-level thresholding method for breast thermograms analysis using Dragonfly algorithm. Infrared Phys. Technol. 2018, 93, 346–361. [Google Scholar] [CrossRef]
- Guha, D.; Roy, P.K.; Banerjee, S. Optimal tuning of 3 degree-of-freedom proportional-integral-derivative controller for hybrid distributed power system using dragonfly algorithm. Comput. Electr. Eng. 2018, 72, 137–153. [Google Scholar] [CrossRef]
- Kizhakkethil, S.R.; Murugan, S. Memory based hybrid dragonfly algorithm for numerical optimization problems. Expert Syst. Appl. 2017, 83, 63–77. [Google Scholar]
- Sambandam, R.K.; Jayaraman, S. Self-adaptive dragonfly based optimal thresholding for multilevel segmentation of digital images. J. King Saud Univ.-Comput. Inf. Sci. 2018, 30, 449–461. [Google Scholar] [CrossRef]
- Jafari, M.; Chaleshtari, M.H.B. Using dragonfly algorithm for optimization of orthotropic infinite plates with a quasi-triangular cut-out. Eur. J. Mech. A. Solids. 2017, 66, 1–14. [Google Scholar] [CrossRef]
- Hariharan, M.; Sindhu, R.; Vijean, V.; Yazid, H.; Nadarajaw, T.; Yaacob, S.; Polat, K. Improved binary dragonfly optimization algorithm and wavelet packet based non-linear features for infant cry classification. Comput. Methods Programs Biomed. 2018, 155, 39–51. [Google Scholar] [CrossRef]
- Mirjalili, S. SCA: A Sine Cosine Algorithm for solving optimization problems. Knowl.-Based Syst. 2016, 96, 120–133. [Google Scholar] [CrossRef]
- Horng, M. A multilevel image thresholding using the honey bee mating optimization. Appl. Math. Comput. 2010, 215, 3302–3310. [Google Scholar] [CrossRef]
- Moghaddam, M.J.H.; Nowdeh, S.A.; Bigdeli, M.; Azizian, D. A multi-objective optimal sizing and siting of distributed generation using ant lion optimization technique. Ain Shams Eng. J. 2018, 9, 2101–2109. [Google Scholar] [CrossRef]
- Mirjalili, S.; Gandomi, A.H.; Mirjalili, S.Z.; Saremi, S.; Faris, H.; Mirjalili, S.M. Salp Swarm Algorithm: A bio-inspired optimizer for engineering design problems. Adv. Eng. Software 2017, 114, 163–191. [Google Scholar] [CrossRef]
- Frank, W. Individual Comparisons of Grouped Data by Ranking Methods. J. Econ. Entomol. 1946, 39, 269–270. [Google Scholar]
- Friedman, M. The use of ranks to avoid the assumption of normality implicit in the analysis of variance. J. Am. Stat. Assoc. 1937, 32, 676–701. [Google Scholar] [CrossRef]
- The Berkeley Segmentation Dataset and Benchmark. Available online: https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/ (accessed on 3 March 2019).
- Landsat imagery courtesy of NASA Goddard Space Flight Center and U.S. Geological Survey. Available online: https://landsat.visibleearth.nasa.gov/index.php?&p=1 (accessed on 3 March 2019).
- Jia, H.; Lang, C.; Oliva, D.; Song, W.; Peng, X. Hybrid Grasshopper Optimization Algorithm and Differential Evolution for Multilevel Satellite Image Segmentation. Remote Sens. 2019, 11, 1134. [Google Scholar] [CrossRef]
- Bhandari, A.K.; Singh, V.K.; Kumar, A.; Singh, G.K. Cuckoo search algorithm and wind driven optimization based study of satellite image segmentation for multilevel thresholding using Kapur’s entropy. Expert Syst. Appl. 2014, 41, 3538–3560. [Google Scholar] [CrossRef]
- Elaziz, M.A.; Oliva, D.; Xiong, S. An improved opposition-based sine cosine algorithm for global optimization. Expert Syst. Appl. 2017, 90, 484–500. [Google Scholar] [CrossRef]
- Dinkar, S.K.; Deep, K. An efficient opposition based Lévy Flight Antlion optimizer for optimization problems. Int. J. Comput. Sci. Eng. 2018, 29, 119–141. [Google Scholar] [CrossRef]
- Aldahdooh, A.; Masala, E.; Wallendael, G.V.; Barkowsky, M. Framework for reproducible objective video quality research with case study on PSNR implementations. Dig. Signal Process. 2018, 77, 195–206. [Google Scholar] [CrossRef]
- John, J.; Nair, M.S.; Kumar, P.R.A.; Wilscy, M. A novel approach for detection and delineation of cell nuclei using feature similarity index measure. Biocybern. Biomed. Eng. 2016, 36, 76–88. [Google Scholar] [CrossRef]
- Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: from error visibility to structural similarity. IEEE T. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef]
- data-Dragonfly-Algorithm-with-Opposition-based-Learning-for-Multilevel-Thresholding-Color-Image-Segmentation. Available online: https://github.com/baoxiaoxue/Dragonfly-algorithm/blob/master/data-Dragonfly-Algorithm-with-Opposition-based-Learning-for-Multilevel-Thresholding-Color-Image-Segmentation.pdf (accessed on 8 March 2019).
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).



















