Keywords

1 Introduction

For the analysis, interpretation, and understanding of digital images, segmentation is one of the most essential and fundamental technologies [1]. It is useful for partitioning a digital image into multiple regions/objects with distinct gray-levels [2]. Over the several decades, three main categories in image segmentation have been exploited in the literatures: (1) edge-based image segmentation, (2) region-based image segmentation, and (3) special theory-based image segmentation. Detailed introduction of their properties are presented in [3]. Particularly, thresholding technique of the region-based segmentation is regard as the most popular one out of others [4]. The main purpose of image thresholding is to determine one (bi-level thresholding) or m ( multilevel thresholding) appropriate threshold values for an image to divide pixels of the image into different groups [5, 6]. In the recent years, increasing complexity of digital images, such as intensity inhomogeneity, makes multilevel thresholding approaches drawn much more attention. This is mainly due to its easy implementation and low storage memory characteristic [7].

Generally, the multilevel thresholding transforms the image segmentation to an optimization problem where the appropriate threshold values are found by maximizing or minimizing a criterion. For example, in the popular Otsu’s method [8], thresholds are determined by maximizing the between-class variance. In the Kapur’s entropy [9], the optimum thresholds are achieved by maximizing the entropy of different classes. A fuzzy entropy measure is applied for picking the optimum thresholds in [10] while Qiao et al. [11] formulated the thresholding criterion by exploring the knowledge in terms of intensity contrast. Researches have also developed some other preferable criteria, including fuzzy similarity measure [12], Bayesian error [13], cross entropy [14], Tsallis entropy [15], and so on.

Exhaustive search algorithms achieved optimization of the aforementioned criteria. However, the methods will become quiet time consuming if the number of desired thresholds is increased [16]. Moreover, the exhaustive search algorithms prone to premature convergence when dealing with complex real life images [1719]. Nature-inspired algorithms (NAs) possess the ability for searching the optimal solutions on the basis of any objective function [7]. Furthermore, the population-based nature of NAs allows the generation of several candidate thresholds in a single run [20]. The population-based nature of NAs thus remarkably reduces the computational time of multilevel thresholding. Consequently, many NAs have been preferred in finding optimum thresholds for image thresholding.

The NAs can be categorized into three typical kinds: swarm intelligence algorithms (SIAs), evolutionary algorithms (EAs), and physics-based algorithms (PAs) in accordance with their original inspirations. Popular NAs chosen for multilevel thresholding include genetic algorithm (GA) [8, 2124], differential evolution (DE) [18, 2527], simulated annealing (SA) [16, 28], ant colony optimization (ACO) [29, 30], artificial bee colony optimization (ABC) [17, 31], differential search algorithm (DS) [16, 32], particle swarm optimization (PSO) [17, 3335], and so on. Generally speaking, all these algorithms have achieved certain successes and have showed different advantages. For example, DE achieves higher quality of the optimal thresholds than GA, PSO, ACO, and SA whereas PSO converges the most quickly when comparing with ACO, GA, DE, and SA [21]. Besides, the DS consumes the shortest running time for multilevel color image thresholding when comparing with DE, GA, PSO, ABC, etc. [16].

Moreover, to further improve the optimization ability of these NAs, large amounts of variants, such as hybrid algorithms have been proposed. Many of the hybrid algorithms have been utilized in solving multilevel thresholding problems, including GAPSO (hybrid GA with PSO) [36, 37], ACO/PSO (hybrid ACO with PSO) [38], SA/PSO (hybrid SA with PSO) [39], BBO-DE (hybrid DE with biogeography-based optimization (BBO)) [40] etc. It is demonstrated that these hybrid algorithms can always perform more effective search ability than the original ones. But simple hybrid model easily causes high-computational complexity.

Therefore, in this chapter, we developed a novel hybrid algorithm of GSA with GA ( GSA-GA) for multilevel thresholding. The proposed GSA-GA is expected to rapidly obtain the high-quality optimal thresholds. In GSA-GA, the discrete mutation operator [41] is introduced to promote the population diversity when premature convergence occurred. Moreover, for selecting the particles for mutation, the roulette selection [42] is also introduced. The introduction of these operators therefore could promote GSA-GA to perform faster and more accurate multilevel image thresholding. Both Kapur’s entropy and Otsu are considered as evaluation criteria for GSA-GA.

Section 2 formulates the multilevel thresholding problem as an optimization problem first and then introduces two criteria briefly. In Sect. 3, typical NAs and hybrid NAs based multilevel image thresholding are overviewed. Section 4 describes the proposed GSA-GA algorithm and states its application in multilevel thresholding. In Sect. 5, experiments are conducted over two standard test images and two real satellite images to evaluate the effectiveness of the GSA-GA. Finally, the chapter is concluded in Sect. 6.

2 Formulation of Multilevel Thresholding Problem

Optimal thresholding methods search for the optimum thresholds by minimizing or maximizing an objective function. Parameters in the utilized objective function are made up by the selected thresholds in each iteration. Specially, the purpose of multilevel thresholding is to classify the Num pixels of an image into K classes using a set of thresholds \(Th=(td_1, td_2, \ldots , td_m)\) where \(m=K-1\). Obviously, different sets of thresholds will produce different image segmentation results. Researchers have formulated some criteria for constructing efficient objective functions [8, 9, 12, 13, 43, 44]. Two most preferred criteria are Kapur’s entropy and Otsu methods as they are relatively easy to use. They are also chosen as criteria in this chapter.

2.1 Kapur’s Entropy Criterion

The Kapur’s entropy criterion, proposed by Kapur et al. [9], is originally developed for bi-level image thresholding. In this method, proper segmentation of an image is achieved by maximizing the Kapur’s entropy. For a bi-level thresholding, the Kapur’s entropy can be described as follows:

$$\begin{aligned} \begin{array}{ll} HE_{0}=-{\sum _{i=0}^{td_0-1} \frac{prob_i}{\omega _0} ln \frac{prob_i}{\omega _0}},\omega _0=\sum _{i=0}^{td_0-1} prob_i\\ HE_{1}=-{\sum _{i=td_0}^{L-1} \frac{prob_i}{\omega _1} ln \frac{prob_i}{\omega _1}},\omega _1=\sum _{i=td_0}^{L-1} prob_i\\ \end{array} \end{aligned}$$
(1)

where \(HE_i\) is the entropy of class i (\(i \in {0, 1}\)) and \(\omega _i\) is the probability of class i, \(td_0\) is the optimum threshold of the bi-level thresholding. Assume that there are L gray-levels in a given image, the probability of the gray-level i can be defined as follows:

$$\begin{aligned} prob_{i}=\frac{hist_i}{\sum _{i=0}^{L-1} hist_i}, \end{aligned}$$
(2)

where \(hist_i\) denotes the number of pixels with gray-level i.

As shown in (1) and (2), \(td_0\) is the selected threshold. To obtain the optimum threshold \(td_0\), the fitness function (3) needs to be maximized as follows:

$$\begin{aligned} f(td_0)=HE_0+HE_1, \end{aligned}$$
(3)

To solve complex multilevel thresholding problems, the Kapur’s entropy has been extended to determine m thresholds for a given image, i.e., \([td_1, td_2, \ldots , td_m]\). The objective of the Kapur’s entropy-based multilevel thresholding is to maximize the fitness function (4) as follows:

$$\begin{aligned} f([td_1, td_2, \ldots , td_m])=HE_0+HE_1+HE_2+\cdots +HE_m, \end{aligned}$$
(4)

where

$$\begin{aligned} \begin{array}{ll} H_E{0}=-{\sum _{i=0}^{td_1-1} \frac{prob_i}{\omega _0} ln \frac{prob_i}{\omega _0}},\omega _0=\sum _{i=0}^{td_1-1} prob_i\\ HE_{1}=-{\sum _{i=td_1}^{td_2-1} \frac{prob_i}{\omega _1} ln \frac{prob_i}{\omega _1}},\omega _1=\sum _{i=td_1}^{td_2-1} prob_i\\ HE_{2}=-{\sum _{i=td_2}^{td_3-1} \frac{prob_i}{\omega _2} ln \frac{prob_i}{\omega _2}},\omega _2=\sum _{i=td_2}^{td_3-1} prob_i\\ HE_{m}=-{\sum _{i=td_m}^{L-1} \frac{prob_i}{\omega _m} ln \frac{prob_i}{\omega _m}},\omega _m=\sum _{i=td_m}^{L-1} prob_i. \end{array} \end{aligned}$$
(5)

2.2 Otsu Criterion

The Otsu criterion [8] is another histogram-based multilevel image thresholding algorithm. The method divides the given image into m classes so that the total variance of different classes is maximized. The object function of Otsu is defined as the sum of sigma functions of each class as follows:

$$\begin{aligned} f(td_0)=\sigma _0+\sigma _1, \end{aligned}$$
(6)

The sigma functions are as follows:

$$\begin{aligned} \begin{array}{ll} \sigma _0=\omega _0(\mu _0-\mu _T)^2,\mu _0=\frac{\sum _{i=0}^{td_0-1}i \cdot prob_i}{\omega _0},\\ \sigma _1=\omega _1(\mu _1-\mu _T)^2,\mu _1=\frac{\sum _{i=td_0}^{L-1}i \cdot prob_i}{\omega _1},\\ \end{array} \end{aligned}$$
(7)

where \(\mu _i\) is the mean gray-level of class i (\(i \in {0, 1}\)) and \(\mu _T\) is the mean intensity of the original image.

Similar to the entropy method, the Otsu criterion has already been extent to multilevel thresholding problems. The objective in the Otsu-based multilevel thresholding is to maximize the following function:

$$\begin{aligned} f([td_1, td_2, \ldots , td_m])=\sigma _0+\sigma _1+\sigma _2+\cdots +\sigma _m, \end{aligned}$$
(8)

where

$$\begin{aligned} \begin{array}{ll} \sigma _0=\omega _0(\mu _0-\mu _T)^2,\mu _0=\frac{\sum _{i=0}^{td_1-1}i \cdot prob_i}{\omega _0},\\ \sigma _1=\omega _1(\mu _1-\mu _T)^2,\mu _1=\frac{\sum _{i=td_1}^{td_2-1}i \cdot prob_i}{\omega _1},\\ \sigma _2=\omega _2(\mu _2-\mu _T)^2,\mu _2=\frac{\sum _{i=td_2}^{td_3-1}i \cdot prob_i}{\omega _2},\\ \sigma _m=\omega _m(\mu _m-\mu _T)^2,\mu _m=\frac{\sum _{i=td_m}^{L-1}i \cdot prob_i}{\omega _m}. \end{array} \end{aligned}$$
(9)

3 Nature-Inspired Algorithms Based Multilevel Thresholding

In this chapter, we categorized the NAs utilized for multilevel thresholding into three kinds: SIAs, EAs, and PAs based on their original inspirations. Since different kinds of NAs possess unique information sharing mechanisms, certain successes have been produced by each kind of NA. Sections 3.13.3 give a detailed review of the three aforementioned kinds of NAs based multilevel thresholding, respectively. In Sect. 3.4, we briefly reviewed the hybrid NAs based multilevel thresholding.

3.1 Swarm Intelligence-Based Optimization Algorithms Based Multilevel Thresholding

SIAs are mainly proposed by mimicking the foraging or hunting behaviors of different species like ants, bees, birds, cuckoos, bats, wolf, and so on [45]. Well-known SIAs include ACO [29], ABC [31], PSO [46], cuckoo search algorithm (CS) [47], Bat Algorithm (BA) [48], and Gray Wolf Optimizer (GWO) [49], etc. In these algorithms, one special particle/individual with the best performance is usually chosen as exemplar/leader for others. The guidance of the exemplar ensures the population evolves directionally in each iteration. The directional search property equips the SIAs with the fast convergence performance [50].

Application of swarm intelligence thereby makes a success in decreasing the computational complexity problem of multilevel thresholding. For example, in [30], Tao et al. utilized ACO to optimize the fuzzy entropy criterion while Zhang et al. search for the optimum multilevel thresholding on the basis of the maximum Tsallis entropy [51]. Similarly, ABC, BA, and GWO also obtained certain successes in multilevel thresholding [6, 17, 5154]. Besides, as one of the most popular swarm intelligence-based optimization algorithm, PSO and its various variants have contributed to multilevel thresholding a lot [2, 17, 3335, 55]. Moreover, Hammouche et al. have found that PSO converges more quickly than ACO, ABC, and SA because of all particles can directly learn from the global best particle [21].

Although SIAs contribute a lot to image thresholding, their fast convergence property caused rapid decrease of population diversity. That is, exploration of SIAs is insufficient. This defective exploration of SIAs may result in temperature convergence of multilevel thresholding.

3.2 Evolutionary Algorithms Based Multilevel Thresholding

EAs are motivated by the principle of evolution through selection and mutation. In the past decade, many EAs, such as GA [8], DE [27], and DS [32], have been widely applied. In conventional EAs, evolutionary processes are conducted through reproduction, crossover, mutation, and selection operators. Particularly, only two individuals are randomly selected to exchange information in a single crossover operation [50]. Similarly, in a traditional mutation operator, only two genes in the individuals are randomly varied [50]. Obviously, evolutionary performance of EAs is not as directional as SIAs do. It is omnidirectional to some extent. Thereby EAs have better exploration than SIAs.

Naturally, a number of researchers have paid close attention to obtain optimal thresholds by EAs, especially the GA [2124] and DE [18, 25, 26]. The favorable exploration ability of EAs makes them achieve remarkable progress in the research area of multilevel thresholding. However, the omnidirectional characteristic of EAs leads to their slow convergence. Moreover, the success of some EAs in solving specific problems highly rely on the user set trial vector generation strategies and control parameters [16].

3.3 Physics-Based Algorithms Based Multilevel Thresholding

The PAs, as the name suggested, are constructed by simulating the phenomenon of physics. For instance, SA [28] imitates the annealing process of melted iron; search algorithm (GSA) [56] inspired by the gravitational kinematics; electromagnetism-like algorithm (EM) [57] and charged search system (CSS) algorithm [58] are proposed on the basis of electrodynamics. More detailed survey of the PAs can be found in [59]. Individuals in PAs explore the search space follows several exemplars. Accordingly, interactions among individuals result in iterative improvement of solutions quality over time. Search diversity of PAs is better than that of SIAs and thus PAs usually perform better exploration. On the other hand, their more directional search property keep higher convergence speed of them. Nevertheless, none of the PAs can solve all the optimization problems in accordance with the “No Free Lunch Theorems” [60].

Comparing with the SIAs and EAs, few researchers have focused on their application on multilevel thresholding. GSA, which possesses simple concept, high-computational efficiency, and few parameters, has proven its promising efficiency in solving complex problems [56, 61]. Furthermore, numerical experiments has confirmed the superiority of GSA with respect to search ability and speed over many other NAs, such as PSO, GA, ACO etc. [56, 6264]. These advantages make GSA a potential choice for solving multilevel thresholding.

3.4 Hybrid NAs Based Multilevel Thresholding

As discussed in Sects. 3.13.3, each kind of NAs has separate and unique advantages and disadvantages. To incorporate different advantages of various NAs and improve the optimization ability of them, large amounts of hybrid algorithms have been proposed over the past decades. For instance, in GAPSO [9], the mutation operator of GA is introduced to PSO to tackle the premature convergence problem while the memory property of PSO is preserved. BBO-DE [40] incorporate both the crossover operator and the selection operator of DE algorithm to BBO to promote exploration ability of BBO while the exploitation ability of BBO is kept. Experiments reported in the literatures demonstrated that these hybrid algorithms can always perform more effective search ability than the original ones.

Many of the hybrid algorithms have already been utilized to solving multilevel thresholding problems, including GAPSO [9], ACO/PSO [38], SA/PSO [39], and BBO-DE [40], etc. The hybrid algorithms usually possess advantages of each composed algorithm. Due to simple hybrid model easily causes high-computational complexity, new NAs, or efficient hybrid NAs are desirable.

4 GSA-GA Based Multilevel Image Thresholding

This chapter introduces a novel hybrid GSA-GA for multilevel image thresholding [65]. Although many researches have paid close attention to the improvement of GSA and presented some GSA variants in the past few years [1, 61, 66, 67], very few of the algorithms have focused on the application on multilevel thresholding. When applying GSA into multilevel image thresholding, especially when the desired number of thresholds is large, the premature convergence and high time-consuming problems become more serious.

The lack of diversity is one important reason for the premature convergence [68]. In GSA-GA, the discrete mutation operator of GA was introduced to promote the population diversity when premature convergence occurred. Moreover, for decreasing computational time, adaptive method is utilized to judge whether the hybridization of GSA and GA are performed. The details of GSA-GA and its application for multilevel image thresholding are given in Sects. 4.1 and 4.2, respectively.

Fig. 1
figure 1

The GSA-GA principle

Fig. 2
figure 2

Pseudocode of the GSA-GA algorithm for multilevel image thresholding

4.1 GSA-GA

In GSA-GA, to adaptively identify whether the hybridization of GSA and GA is necessary, the standard deviations of objective functions and the ratio of the current iteration t to the maximum iterations maxiterations are calculated before conducting the selection and mutation operators of GA. More specifically, when particles are trapped (judging by \(rand< std(fit)\) or \(rand<t/maxiterations)\), the roulette selection and discrete mutation operators are carried out to update position of each particle and thus to diversify the population. Due to the population diversity is crucial for a health search, combination of GA, and GSA can help the algorithm escape from local optima. Besides, because of satisfaction of the condition ‘\(rand<t/maxiterations\)’ becomes easier by the lapse of time, GSA-GA can utilize selection and mutation operators to accelerate convergence in the last iterations. The principle of GSA-GA is shown in Fig. 1. The detailed introduction of the method can be found in [65].

4.2 Implementation of GSA-GA for Multilevel Thresholding

The application of GSA-GA approach to the multilevel image thresholding problem depends on the criterion used for optimization. In this chapter, the Kapur’s entropy and Otsu criteria were implemented. To start the GSA-GA for multilevel thresholding, initial population \(\varvec{X}=[\varvec{X}_1,\varvec{X}_2,\ldots ,\varvec{X}_i,\ldots ,\varvec{X}_N]\) where \(\varvec{X}_i=[x_{i1},x_{i2},\ldots ,x_{iD}]\) should be randomly generated first. Each particle \(\varvec{X}_i\) is comprised of a set of gray values, which stands for a candidate solution of the required threshold values. The size of the population is N (can be set by users), and dimension of each particle is D, which is also the number of desired thresholds: \(D=m\). In the iteration process, the fitness value of each particle is calculated from the Kapur’s entropy or Otsu criterion using Eqs. (4)–(5) and (8)–(9), respectively. The pseudocode of the GSA-GA algorithm for multilevel image thresholding is shown in Fig. 2.

5 Experimental Results and Discussion

In this section, the experimental results are presented. The performance of GSA-GA has been evaluated and compared with the other 6 NAs: the standard GSA [56], GGSA (Adaptive gbest-guided GSA) [67], PSOGSA (hybrid PSO and GSA) [66], DS (Differential Search algorithm) [32], BBO-DE [40], and GAPSO [36] by conducting experiments on two benchmark images that has been tested in many related literatures. Furthermore, to evaluate the ability of GSA-GA based thresholding on more complex and difficulty images, we conducted experiments on two real satellite images adopted from NASA (http://earthobservatory.nasa.gov/Images/?eocn=topnav046eoci=images). The obtained experimental results of the 7 algorithms are also compared. For the satellite images, the low spectral and spatial resolution usually makes objects hard to be segmented, while the high resolution always leads to highly computational complexity during the image segmentation. The four experimental images and corresponding histogram of each image are given in Fig. 3 as shown in Sect. 5.1.

5.1 Test Images

The two standard benchmark test images are two widely utilized images: House and pepper, as shown in Fig. 3a and b, respectively. Size of every tested benchmark images is 256 \(\times \) 256. The two tested satellite images are named SFB and NR respectively as shown in Fig. 3c and d. The image SFB is acquired by the Thematic Mapper on Landsat 5 on September 9, 2002 while image NR is an astronaut photograph taken by Kodak 760 C digital camera on November 8, 2006. Size of the image SFB and NR are 512 \(\times \) 512 and 539 \(\times \) 539, respectively. Due to the two satellite images are multi-spectral images, we transformed the two images using a famous orthogonal transformation method, i.e., principal component analysis (PCA). As the most informative component, the first principal component is selected for multilevel image thresholding in this chapter.

Fig. 3
figure 3

Test images used in the experiments

5.2 Experimental Settings

The relative parameter settings of algorithms utilized in this chapter are shown in Table 1. As illustrated in Table 1, to perform a fair experiment, in all of the seven algorithms, the population size (N) and maximum number of fitness evaluations (FEs) were set to 30 and 3000, respectively. For GSA-GA, GSA, PSOGSA, and GGSA, the initial gravitational constant \(G_0\) and decrease coefficient \(\beta \) were set to 100 and 20 as the default values in original GSA [56]. For PSOGSA, the two acceleration coefficients (\(c_1\) and \(c_2\)) were set to 0.5 and 1.5, respectively as suggested in [66]. For GGSA, the two acceleration coefficients (\(c_1\) and \(c_2\)) were set to \(-2t^3/{Iter^3_\mathrm{max}}+2\) and \(2t^3/{Iter^3_\mathrm{max}}\), respectively as recommended in [67]. The other parameters in DS, BBO-DE, and GAPSO were all adopted as the suggested values in the original papers. To be specific, in DS, the two control parameters (i.e., \(p_1\) and \(p_2\)) were both set to 0.3*rand; in BBO-DE, the mutation scheme was the DE/rand/1, the crossover probability (CR), the scaling factor (F), and the elitism parameter (\(n_\mathrm{{elit}}\)) were set to 0.9, 0.5, and 2 [40]; in GAPSO, the mutation probability (\(p_m\)) was set to 0.1, the crossover probability (denoted by \(p_c\)) was set to 1, and the two acceleration coefficients were both set to 2 [36]. For GSA-GA, the mutation probability \(p_m\) was set to 0.1 as it is recommended in many GA based algorithms [23, 37, 40].

Table 1 Parameter settings of the compared algorithms in this chapter

5.3 Performance Metrics

In this chapter, the uniformity measure [69] is adopted to qualitatively judge the segmentation results based on different thresholds. The uniformity measure (u) is calculated as follows:

$$\begin{aligned} u=1-2\times m \times \frac{\sum _{j=1}^{m+1}\sum _{i\in Re_j}(f_i-g_j)^2}{Num\times (f_{max}-f_{min})^2}, \end{aligned}$$
(10)

where m is the number of desired thresholds, \(Re_j\) is the j-th segmented region, Num is the total number of pixels in the given image IMG, \(f_i\) is the gray-level of pixel i, \(g_j\) is the mean gray-level of pixels in j-th region, \(f_{max}\) and \(f_{min}\) are the maximum and minimum gray-level of pixels in the given image, respectively. Typically, \(u \in \)[0, 1] and a higher value of uniformity indicates that there is better uniformity in the thresholding image.

Table 2 Comparison of algorithms taking the Kapur’s entropy as evaluation criterion in terms of best uniformity and corresponding thresholds
Table 3 Comparison of algorithms taking the Kapur’s entropy as evaluation criterion in terms of the mean of uniformity
Table 4 Comparison of algorithms taking the Kapur’s entropy as evaluation criterion in terms of the mean of CPU times (in seconds)

5.4 Experiment 1: Maximizing Kapur’s Entropy

The Kapur’s entropy criterion was first maximized to construct an optimally segmented image for all the seven NAs. Table 2 presented the best uniformity (u) and the corresponding threshold values (Th) on all the test images produced by the algorithms after 30 independent runs. Moreover, to test the stability of thresholding methods, average uniformity of 30 independent runs are reported in Table 3. Besides, to test the computation complexity, the mean of CPU times are reported in Table 4.

As shown in Table 2, for image House, GSA-GA outperformed GSA, PSOGSA, GGSA, DS, and GAPSO on all the different number of thresholds. Although BBO-DE gained the best uniformity when \(m=4\), GSA-GA has a better mean uniformity as illustrated in Table 3. For image Pepper, SFB and NR, GSA-GA performed as well as or was better than the other GSA-based segmentation methods on the best uniformity reported in Table 2. Meanwhile, mean uniformity of the three images shown in Table 3 also confirmed the superiority of GSA-GA in most cases. This may be due to that the introduced mutation operator prevents GSA from getting stuck to local optima. Furthermore, when comparing with DS, BBO-DE, and GAPSO, GSA-GA displayed the best on both the best and mean uniformity as presented in Tables 2 and 3. That is to say, variant-based multilevel image thresholding methods are more efficient than other NAs based techniques. That is because particles in GSA variants can learn from other particles fuller than other NAs. Besides, it is worth noting that the mean CPU times of GSA-GA are visible smaller than the comparison algorithms as reported in Table 4.

For a visual interpretation of the segmentation results, the segmented images of the two satellite images obtained based on the optimum thresholds shown in Table 2 were presented in Figs. 4 and 5 with \(m=2-5\). For the two images, it is hard to say which number of thresholds is more suitable for due to the complexity of these images. Their inherent uncertainty and ambiguity make it a challenging task for these tested algorithms to determine the proper number of classes in a given image.

Fig. 4
figure 4

Segmented images for the SFB image by Kapur’s entropy with different optimization techniques

Fig. 5
figure 5

Segmented images for the NR image by Kapur’s entropy with different optimization techniques

5.5 Experiment 2: Maximizing Otsu

This section devotes to maximize the Otsu criterion to construct an optimally segmented image for all of the seven algorithms. Experiments were performed on all the test images shown in Fig. 3. The best uniformity (u) and the corresponding threshold values (Th) produced by the algorithms were given in Table 5 after 30 independent runs. Similar to Sect. 5.4, to test the stability of the algorithms, Table 6 presented the mean of uniformity. In addition, Table 7 provided the mean of CPU times.

Table 5 Comparison of algorithms taking the Otsu as evaluation criterion in terms of best uniformity and corresponding thresholds
Table 6 Comparison of algorithms taking the Otsu as evaluation criterion in terms of the mean of uniformity
Table 7 Comparison of algorithms taking the Otsu as evaluation criterion in terms of the mean of CPU times (in seconds)

Generally speaking, with the Otsu criterion, GSA-GA yielded better results than the other six comparison algorithms as illustrated in Table 5. Moreover, similar to the results given in Table 4, the mean uniformity reported in Table 6 also confirms the superiority of GSA-based methods comparing with other NAs. Mean CPU times illustrated in Table 7 showed that the computational time of GSA-GA is also the lowest. Especially, time consuming of GSA-GA is much lower than that of DS. In Figs. 6 and 7, the segmentation images of SFB and NR by all the seven NAs used the Otsu criterion are presented.

Fig. 6
figure 6

Segmented images for the SFB image by Otsu with different optimization techniques

Fig. 7
figure 7

Segmented images for the NR image by Otsu with different optimization techniques

Furthermore, comparing the mean uniformity shown in Tables 3 and 6, we can concluded that for a given image, thresholds determined based on different criteria can be different. For images Pepper, SFB, and NR, the thresholding results using Otsu criterion is better than the results on the basis of Kapur’s entropy. While for the image House, we observed completely opposite conclusions. Thereby, comprehensive analysis for choosing the most appropriate objective function are desired in the future real-world application.

5.6 Running Time Analysis Using Student’s t-test

To statistically analyze the time-consuming shown in Tables 4 and 7, a parametric significance proof known as the Student’s t-test was conducted in this section [55]. This test allows assessing result differences between two related methods (one of the methods is chosen as control method). In this chapter, the control algorithm is GSA-GA. Results of GSA-GA were compared with other six comparison NAs in terms of the mean CPU times. The null hypothesis in this chapter is that there is no significance difference between the mean CPU times achieved by two compared algorithms for a test image over 30 independent runs. The significance level is \(\alpha =0.05\). Accordingly, if the produced t-value of a test is smaller than or equal to the critical value “−2.045”, the null hypothesis for the paired t-test should be rejected [70, 71].

Table 8 Statistical analysis of 30 runs for the experimental results on the Kapur’s entropy criterion
Table 9 Statistical analysis of 30 runs for the experimental results on the Otsu criterion

Tables 8 and 9 reported the t-values produced by Student’s t-test for the pairwise comparison of six groups. These groups were formed by GSA-GA (with Kapur’s entropy and Otsu, respectively) versus other comparison algorithms. In Tables 8 and 9, if the null hypothesis is rejected, we define a symbol “\(h=0\)” which means the difference between the results obtained by two algorithms are not different. By contrast, “\(h=1\)” indicates that the difference between GSA-GA and the compared algorithm is significant.

As illustrated in Tables 8 and 9, for all the test images, the produced t-values for the experiments on the Kapur’s entropy and Otsu criteria were smaller than the critical value. The results indicated that GSA-GA performed significantly fast image segmentation compared with the other six algorithms.

6 Conclusion

Multilevel thresholding is a fundamental and important technology for image segmentation and a fundamental process in image interpretation. An overview of the grayscale image segmentation using multilevel thresholding and nature-inspired algorithms is discussed in this chapter. On one hand, the NAs based multilevel image thresholding can reduce the computational consuming of exhaustive search algorithms based techniques. On the other hand, the global optimization property of NAs makes them as preferable choices for multilevel thresholding. Although some drawbacks of the NAs limited their application, hybrid algorithms can promote their performances. Therefore, a novel multilevel thresholding algorithm for image segmentation by employing an improved GSA variant, called GSA-GA is proposed in this chapter. In GSA-GA, the roulette selection and discrete mutation operators of GA were introduced into GSA to improve the search accuracy and speed of GSA. Experiments on benchmark images and real-word satellite images confirmed the superiority of GSA-GA compared with GSA, PSOGSA, GGSA, DS, BBO-DE, and GAPSO. Potential future investigation can be on the analysis of different criteria. By comprehensive analysis, the most appropriate criterion for constructing objective function can be selected or developed.