Abstract

The thresholding process finds the proper threshold values by optimizing a criterion, which can be considered as a constrained optimization problem. The computation time of traditional thresholding techniques will increase dramatically for multilevel thresholding. To greatly overcome this problem, swarm intelligence algorithm is widely used to search optimal thresholds. In this paper, an improved glowworm swarm optimization (IGSO) algorithm has been presented to find the optimal multilevel thresholds of color image based on the between-class variance and minimum cross entropy (MCE). The proposed methods are examined on standard set of color test images by using various numbers of threshold values. The results are then compared with those of basic glowworm swarm optimization, adaptive particle swarm optimization (APSO), and self-adaptive differential evolution (SaDE). The simulation results show that the proposed method can find the optimal thresholds accurately and efficiently and is an effective multilevel thresholding method for color image segmentation.

1. Introduction

Image segmentation is to partition an image into multiple segments or regions and extract the meaningful and interested objects, which is the critical step in image processing and image analysis. The goal of image segmentation is to make an image more meaningful and easier to understand and analyze [1, 2]. Nowadays image segmentation has been widely used in many practical applications such as medical imaging [3], object detection [4], optical character recognition (OCR) [5], and remote sensing [6].

By now, several algorithms and techniques have been proposed for image segmentation in the literature and thresholding is one of the simplest but most effective methods in all the image segmentation algorithms. The fundamental principle of thresholding technique is to divide the whole pixel points of an image into several classes by setting different threshold values, so the key to this method is to find the proper threshold values. According to the number of threshold values, thresholding techniques can be separated into two groups: bilevel and multilevel thresholding. Bilevel thresholding is to divide an image into two parts by using one threshold value. If the threshold value is more than one, it will be extended into multilevel thresholding, which can accurately divide an image into several significant parts. Therefore, multilevel thresholding is an effective and famous technique, and it is extensively applied in many fields.

For years, a great number of thresholding techniques have been described in the literature. In 1979, Otsu’s method was presented by Otsu [7], which is one of the best ways of thresholding. However, the computation time is much longer in multilevel threshold problem because it exhaustively searches optimal threshold values by maximizing the between-class variance. In 1985, Tsai [8] proposed a new method to find optimal thresholding values of an input gray-level image by moment-preserving principle, which is called Tsallis entropy method. In 1986, Kittler and Illingworth [9] assumed that the pixel level values of each object in an image are normally distributed. Li and Lee [10] proposed minimum cross entropy thresholding method which selects the optimal thresholding values by minimizing the cross entropy between the original image and its segmented image. The Otsu, Tsallis entropy, and minimum cross entropy methods can be easily extended to multilevel thresholding. For bilevel thresholding, the traditional thresholding algorithms can find optimal threshold quickly and effectively and the image is accurately segmented into two parts. But, for multilevel thresholding, the traditional techniques become very time-consuming because a large number of iterations are needed for computing the optimal threshold values [1113].

Swarm intelligence algorithms are very popular global optimization schemes, and the techniques imitate the collective behavior of natural or artificial systems that show some intelligence [14]. The algorithms have been widely used in complex optimization problems which show better performances. In order to solve the multilevel thresholding problem, swarm intelligence algorithms have been used to find optimal thresholds over the years, including genetic algorithm (GA) [15, 16], particle swarm optimization (PSO) [1719], artificial bee colony (ABC) [2022], differential evolution (DE) [2325], firefly algorithm (FA) [26, 27], cuckoo search algorithm (CS) [28, 29], wind driven optimization (WDO) [29], and electromagnetism-like optimization (EMO) algorithm [30]. These methods use different basic swarm intelligence algorithms, different improved algorithms, and different objective functions for different types of images, such as between-class variance, Tsallis entropy, Kapur’s entropy, and minimum cross entropy. GA was inspired by the process of natural selection which has been used for multilevel thresholding [31, 32]. The PSO and the improved PSO algorithms were also used to solve the multilevel thresholding problem which mimics the social behavior of bird flock or fish school. The researchers Yin [17] and Maitra and Chatterjee [18] applied PSO algorithm to multilevel thresholding. Thereafter, particle swarm optimization (PSO) and artificial bee colony (ABC) have been adopted to search the optimal multilevel thresholds by Akay using Kapur’s entropy and between-class variance as objective functions [19]. Horng [20], Zhang and Wu [21], and Cuevas et al. [33] proposed a new image segmentation method using artificial bee colony algorithm for multilevel thresholding. And the algorithm is also used for segmentation of SAR image [34, 35] and satellite image [22]. In 2010, a novel multilevel thresholding segmentation method based on differential evolution (DE) algorithm is presented [23]. Firefly algorithm (FA), inspired by the social behavior of firefly swarm, is also used to find several threshold values on a given image [36]. Also, two new swarm intelligence algorithms, cuckoo search algorithm (CS) and wind driven optimization (WDO), using Kapur’s entropy for multilevel thresholding are proposed, and two algorithms can efficiently and accurately search multiple threshold values [29].

Color images include more information than gray images and multilevel color image segmentation is widely used now. Swarm intelligence algorithms are also used for color image multilevel segmentation. Zingaretti et al. [37] proposed the new method which is based on genetic algorithm (GA) for color image segmentation. Raja et al. [38] presented an improved particle swarm optimization (PSO) algorithm for cancer infected breast thermal images by Otsu’s method. Sarkar et al. [39] developed a novel multilevel color image thresholding method based on differential evolution (DE) algorithm and minimum cross entropy, and simulation results show that it is an effective method. Three different quantum inspired metaheuristic techniques, namely, Quantum Inspired Ant Colony Optimization, Quantum Inspired Differential Evolution, and Quantum Inspired Particle Swarm Optimization technique, for multilevel color image thresholding are presented. Simulations and results prove that the Quantum Inspired Ant Colony Optimization method outperforms the other methods [40]. Rajinikanth and Couceiro [41] used the firefly algorithm (FA) for color image segmentation. The evolutionary and swarm-based algorithms of evolution strategy (ES), genetic algorithm (GA), differential evolution (DE) algorithm, adaptive differential evolution algorithm (JADE), particle swarm optimization (PSO) algorithm, artificial bee colony (ABC) algorithm, cuckoo search (CS), and differential search (DS) algorithm are also used for multilevel color image thresholding problem [42].

The glowworm swarm optimization (GSO) is a novel swarm intelligence algorithm for optimization developed by Krishnanand and Ghose in 2005 [43] which mimics the flashing behavior of glowworms. In the algorithm, each glowworm carries a luminescence quantity called luciferin, which is decided by the function value of glowworm’s current location. During the course of movement, glowworm identifies its neighbors based on local-decision domain and selects a neighbor which has a luciferin value higher than its own using a probabilistic mechanism and moves toward it [4449]. GSO algorithm has been applied for numerous complex optimization problems. Qifang et al. [50] and Horng [51] used GSO algorithm based on Otsu’s method and minimum cross entropy for multilevel threshold image segmentation and the experimental results show that the method has better performance for gray images. In order to improve the performance of the standard GSO algorithm and search the global optimal value efficiently and accurately, the improved glowworm swarm optimization (IGSO) is presented in this paper. Step size is an important parameter in determining the convergence of GSO algorithm, so a new update method of step size is proposed. Furthermore the sensor range is extended to the whole search space and the random movement of the brightest glowworms of firefly algorithm is also introduced. Subsequently the IGSO algorithm using different objective functions is used for multilevel color image thresholding problem, such as between-class variance and minimum cross entropy (MCE). The performance of IGSO algorithm for multilevel color image thresholding is measured in terms of the optimal threshold values, objective values, the peak signal to noise ratio (PSNR), and structural similarity index (SSIM) and then compared with other swarm intelligence algorithms such as adaptive particle swarm optimization (APSO) [52] and self-adaptive differential evolution (SaDE) algorithm [53].

The remainder of the paper is organized as follows. Section 2 presents the concepts of between-class variance method and minimum cross entropy method. Section 3 gives a detailed description of GSO algorithm and the proposed IGSO algorithm. In Section 4, the numerical experimental results of IGSO, GSO, APSO, and SaDE algorithms for multilevel color image segmentation are shown and discussions are also given. Finally, the conclusion is presented in Section 5.

2. Formulation of the Problem

Swarm intelligence algorithms find the optimal thresholds by maximizing an objective function. In this paper, two commonly used thresholding methods, between-class variance method (Otsu’s) and minimum cross entropy are used as objective functions to find the optimal multilevel thresholds.

2.1. Between-Class Variance Method (Otsu’s Method)

Thresholding based on Otsu’s method is a nonparametric segmentation method that divides the whole image into classes by maximizing the between-class variance.

Assume that an image has pixels and gray levels, and the number of pixels at level is represented by ; then . The occurrence probability of level is defined by

In bilevel thresholding, the optimum threshold divides the image into two classes, and the cumulative probabilities of each class can be described as follows:

The mean levels of two classes are described as follows:

The between-class variance of two classes is defined by (4):where is the mean levels of whole image:

The optimum threshold is searched exhaustively by maximizing the between-class variance, and the optimal threshold is

Otsu’s method can be extended to multilevel thresholding. Assume that an image is divided into classes; the extended between-class variance of classes is calculated by

The sigma terms are determined using (9) and the mean levels are calculated by (10):

The optimum thresholds are searched by maximizing the between-class variance by

2.2. Minimum Cross Entropy Method

Assume that two probability distributions, and , belong to the same set. The cross entropy between and is defined as follows:

The concept of cross entropy is widely used for optimization problem, and the minimum cross entropy thresholding method selects an optimal threshold that minimizes the cross entropy between the original image and the processed image. If an original image in gray levels can be divided into two segments by threshold and , where   is the number of gray levels, then the cross entropy can be calculated by where

We can select an optimal threshold by minimizing the cross entropy based on (13):

Since the first item is constant, the expression of the cross entropy can be modified aswhere is the zero-moment and is the first-moment of the image histogram.

It is quite straightforward to extend minimum cross entropy thresholding method to multilevel thresholding segmentation. If an image is required to find thresholds , the cross entropy is given by

We can obtain the optimal threshold by minimizing (17). As the swarm intelligence algorithms are usually used to solve maximization problems, we modified (17) as shown below:

All algorithms used in this paper calculate the minimum cross entropy fitness function by (18) for multilevel thresholding segmentation, which can find the optimal thresholds.

3. Glowworm Swarm Optimization Algorithm

3.1. The Standard Glowworm Swarm Optimization Algorithm

The standard GSO algorithm includes the following steps.

Step 1 (parameters’ definition). The key parameters impact the performance of GSO algorithm, that is, , , , , and .

Step 2 (glowworms’ initialization). In the phase, the glowworms are initially distributed randomly in the given fitness function space so that they are well dispersed, which have equal quantity of luciferin and sensor range. Furthermore, the current iteration is set to 1.

Step 3 (luciferin update phase). The luciferin depends on the function value at the current position of the glowworm, so the position of glowworms changes and the luciferin updates accordingly in the each iteration. Each glowworm updates luciferin according to the following equation:where is the luciferin of glowworm at time , is the luciferin decay constant , represents the luciferin enhancement constant, and is the function value.

Step 4 (movement phase). Each glowworm has a variable local-decision domain, which is bounded by a radial sensor range , and is attracted to brighter glowworms. In the movement phase, glowworms search a neighbor by a probabilistic mechanism that has higher luciferin value and move to it. For each glowworm , the probability equation of moving toward a neighbor can be stated aswhere , is the set of neighbors of glowworm ,   is the variable local-decision domain, and represents the Euclidean distance between glowworms and at time . Then, the equation of the glowworm movements is given bywhere represents the location of glowworms at time , is the step size, and is the Euclidean norm operator.

Step 5 (local-decision domain update). In the GSO algorithm, the local-decision domain is a dynamic value that is a function with the number of peaks captured. In order to update adaptively the local-decision domain range of each glowworm, the rule is stated aswhere is a constant parameter and is a threshold parameter used to control the number of neighbors.

3.2. The Proposed Glowworm Swarm Optimization Algorithm

The size step is a key parameter, which affects the convergence of the GSO algorithm. In GSO algorithm, the step size should be smaller than the -distance in order to find the optimal solutions [54]. However, the lower step size value may lead to a slow convergence speed. So it can be a large value for starting the algorithm and gradually reducing the value of step size with the increase of iteration [54]. Also, the step size is relevant to the size of the search space. For the larger space, step size must be a larger value. In the standard GSO, is a constant. In order to improve the convergence of the GSO algorithm, we present a new step size update method in this section. Considering the search space and dimension of image segmentation, the expression is given bywhere is the range of step size, is iteration, is the maximum number of iterations, and , where is the dimension of the search space. When the dimension is a large value and is a low value, the step size will correspondingly increase and algorithm can search more quickly.

The local-decision domain is an important parameter that affects the ability of capturing multiple peaks. When the sensor range of each glowworm extends to the whole search space, all the glowworms move to the global optimal value and ignore the local optimum [54]. To ensure that the GSO algorithm can find the global optimal threshold of image segmentation, the sensor range covers the entire space of image gray histogram and the value is set to in this paper.

In the GSO algorithm, the glowworms with the maximum luciferin remain stationary during the each iteration. The above feature leads to the movements of glowworms that are confined to the interior region of the convex hull [54]. The firefly algorithm can search multiple global solutions simultaneously, and thus it is a very efficient algorithm. However, in the FA algorithm, the brightest fireflies move randomly. So the random movement of the brightest agents is introduced to GSO in this paper.

The pseudocodes of the IGSO algorithm are shown as Pseudocode 1.

Set number of dimensions
Set number of glowworms
Let be the location of glowworm at time
Generate initial population of glowworms    randomly
for = 1 to do
;
set maximum iteration number = iter_max
set
While ( < iter_max) do
 for each glowworm do
;
  for each glowworm do
  ;
   for each glowworm do
   
   = select_glowworm
  
  ;
  for to do
   ;
  end
;

4. Results and Discussion

In this paper, the improved glowworm swarm optimization (IGSO) algorithm is applied to the multilevel color image thresholding problem. The RGB color model is a simple and effective model of color image which has three basic color components of red, green, and blue, so we should search the optimal threshold values and fitness values for the each component of the color images. The optimal fitness values () of color image is equal to the sum of the optimal fitness values of three components. The work of IGSO algorithm for multilevel color image thresholding problem in this paper is briefly illustrated in Figure 1.

In this section, a large number of experiments are carried out on ten well-known color test images in order to test the performance of the IGSO algorithm for multilevel color image thresholding. Two simple segmentation methods, namely, between-class variance (Otsu) method and minimum cross entropy, are utilized as the fitness functions. All algorithms are implemented in MATLAB Release 2010. Ten well-known color test images and their histograms are shown in Figure 2. All the images are 512 × 512 in size. The population size is set to be 50 and the maximum number of iterations is 100 in all experiments in this paper. The IGSO algorithm is also compared with two efficient optimization algorithms of APSO and SaDE algorithms. Tables 13 give the value of important parameters used for IGSO, APSO, and SaDE algorithms, respectively. In order to estimate the quality of segmented image, the two parameters of peak signal to noise ratio (PSNR) and structural similarity (SSIM) index are used. The higher value of PSNR and SSIM shows a better quality of thresholding.

The peak signal to noise ratio (PSNR) is one of the important performance criteria of image segmentation. The expression of PSNR is defined as follows:wherewhere is the size of image, is the original image, and is the segmented image.

For a RGB color image, the PSNR value of three basic components is computed independently and the average values of them are considered as the PSNR value of color image.

The structural similarity (SSIM) index [55] is used to measure the similarity between the original image and the segmented image. The SSIM between two images can be stated as where is the average of , is the average of , is the variance of , is the variance of , is the covariance of and , two variables and stabilize the division with weak denominator, and is the dynamic range of the pixel-values, and . In addition, the SSIM can be extended for color RGB images as shown below:where and are the channel of the original image and segmented color image, respectively, and is channel number.

4.1. Experiment 1

In this section, the IGSO algorithm is used for ten color test images using Otsu’s method as fitness function and the results are compared with the GSO, APSO, and SaDE algorithms. Tables 4 and 5 present the number of thresholds , corresponding optimal thresholds, and objective values for , and computed by IGSO, APSO, and SaDE algorithms using Otsu’s method. In Table 6, comparison of PSNR (dB) and SSIM values is depicted for each method and number of thresholds, which reveals the quality of segmented images. The segmented images using IGSO algorithm based on Otsu’s method at 2, 4, 6, and 8 levels of thresholding are shown in Figures 3 and 4.

4.2. Experiment 2

In the second part of the experiments, we find optimal threshold values by maximizing the modified equation (18). The number of thresholds, the optimal thresholds, and the optimal objective values for IGSO, GSO, APSO, and SaDE algorithms are listed in Tables 7 and 8. The parameter values of PSNR (dB) and SSIM value are shown in Table 9. Figures 5 and 6 give the multilevel thresholding segmented results at 2, 4, 6, and 8 levels of thresholding using IGSO algorithm based on minimum cross entropy for ten test color images, respectively.

4.3. Comparison of the Segmented Performance

In this paper, the results of IGSO algorithm based on Otsu and MCE have been compared with basic GSO algorithm and two other well-known optimization algorithms. For the Otsu fitness function, it can be clearly seen from Tables 4 and 5 that the improved GSO algorithm offers superior optimal thresholds and objective values in comparison with GSO, APSO, and SaDE algorithms when the number of thresholds is more than 4. From Tables 7 and 8, it is easy to deduce that the optimal thresholds and objective values of multilevel color image thresholding segmentation using minimum cross entropy for all the test images are better than GSO, APSO, and SaDE algorithms.

The parameters of peak signal to noise ratio (PSNR) and structural similarity (SSIM) index are introduced to evaluate the quality of segmented images. Tables 6 and 9 show that PSNR and SSIM values obtained with IGSO algorithm are higher than those produced by the other algorithms. The PSNR and SSIM values obtained by IGSO and GSO algorithms using Otsu’s and MCE methods are presented in Table 10. For the same color test image and number of thresholds , the IGSO algorithm based on the minimum cross entropy method has higher PSNR and SSIM values than Otsu’s method. After the analysis of results, it is found that IGSO algorithm based on the minimum cross entropy has better quality of segmented image than the other algorithms for each color test image.

Moreover, the convergence curves for IGSO, GSO, APSO, and SaDE algorithms of ten test color images using Otsu’s method have been shown in Figure 7 for 8-level thresholding. It can be clearly observed from these figures that the IGSO algorithm needs less iterations to obtain optimal segmentation results and has better convergence property than GSO, APSO, and SaDE algorithms for multilevel color image thresholding segmentation.

5. Conclusions

In this paper, a new multilevel color image thresholding segmentation method based on improved glowworm swarm optimization (IGSO) algorithm is presented. The presented method utilized Otsu’s method and minimum cross entropy as the fitness functions criteria and is tested on ten color test images for 2, 4, 6, and 8. The results obtained by IGSO algorithm are compared with those obtained by GSO, APSO, and SaDE algorithms and the segmentation performance of these methods was evaluated in terms of the optimal threshold values, optimal objective values, PSNR values, and SSIM values. Finally, the convergence curves using minimum cross entropy are drawn of ten test color images for . The comparative results show that the improved GSO algorithm is superior to the GSO, APSO, and SaDE algorithms for multilevel color image thresholding problem. Furthermore, the quality of segmented image of the IGSO algorithm using minimum cross entropy outperforms the IGSO algorithm using Otsu’s method in terms of PSNR and SSIM. The further work will include introduction of the other fitness criteria for multilevel thresholding segmentation. In addition, the IGSO algorithm is also applied to the other complex problems.

Competing Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work was supported by the National Nature Science Foundation of China (no. 51204077) and the Nature Science Foundation of Kunming University of Science and Technology (no. 2014-9-x-8).