Abstract

Histogram based multilevel thresholding approach is proposed using Brownian distribution (BD) guided firefly algorithm (FA). A bounded search technique is also presented to improve the optimization accuracy with lesser search iterations. Otsu’s between-class variance function is maximized to obtain optimal threshold level for gray scale images. The performances of the proposed algorithm are demonstrated by considering twelve benchmark images and are compared with the existing FA algorithms such as Lévy flight (LF) guided FA and random operator guided FA. The performance assessment comparison between the proposed and existing firefly algorithms is carried using prevailing parameters such as objective function, standard deviation, peak-to-signal ratio (PSNR), structural similarity (SSIM) index, and search time of CPU. The results show that BD guided FA provides better objective function, PSNR, and SSIM, whereas LF based FA provides faster convergence with relatively lower CPU time.

1. Introduction

In imaging science, image processing plays a vital role in the analysis and interpretation of images in fields such as medical discipline, navigation, environment modeling, automatic event detection, surveillance, texture and pattern recognition, and damage detection. The development of digital imaging techniques and computing technology increased the potential of imaging science.

During the image processing operation, a photograph or a video frame is analyzed with a chosen signal processing technique and the outcomes such as processed image, data, and/or parameters related to image are further investigated to extract the desired information from the raw input image.

Image segmentation is one of preprocessing techniques used to regulate the features of an image. It is also judged to be an important procedure for significant examination and interpretation of input images [1].

Over the years, several techniques for segmentation have been proposed and implemented in the literature [210]. In segmentation, the input image is separated into nonoverlapping, homogenous regions containing similar objects. Based on the performance appraisal process, the segmentation methods are classified into two groups such as supervised and unsupervised evaluation. Unsupervised methods are preferable in real-time processing because they do not require a manually segmented image [11].

Thresholding is considered the most desired procedure out of all the existing procedures used for image segmentation, because of its simplicity, robustness, accuracy, and competence [12]. If the input image is divided into two classes, such as the background and the object of interest, it is called bilevel thresholding. Bilevel thresholding is extended to multilevel thresholding to obtain more than two classes [11, 13, 14].

The thresholds can be derived at a local or global level [15]. In local thresholding, a different threshold is assigned for each part of the image. In global thresholding, a single global threshold in the probability density function of the grey level histogram is obtained using parametric or nonparametric approach to find the thresholds. In the parametric approaches, the statistical parameters of the classes in the image are estimated. They are computationally expensive, and their performance may vary depending on the initial conditions. In the nonparametric approaches, the thresholds are determined by maximising some criteria, such as between-class variance [16] or entropy measures.

The methods such as Kapur, Tsallis, and Otsu are widely adopted by most of the researchers to find solution for multilevel image segmentation problems [1720]. In general, Kapur and Otsu based thresholding techniques proved their better shape and uniformity measures for the bilevel and multilevel thresholding problems [1].

Traditional methods work well for a bilevel thresholding problem, when the number of threshold level increases, complexity of the thresholding problem also will increase and the traditional method requires more computational time. Hence, in recent years, soft computing algorithm based multilevel image thresholdingprocedure is widely proposed by the researchers.

Recent literature illustrates that the heuristic and metaheuristic algorithms such as particle swarm optimization (PSO) [2025], bacterial foraging algorithm (BFO) [1, 13, 17, 18], differential evaluation (DE) [19, 2628], artificial bee colony (ABC) [11, 29], cuckoo search (CS) [12, 30], watershed algorithm [31], fuzzy logic [32], hybrid method [33], and self-adaptive parameter optimization algorithm [34] are widely considered for optimal multilevel image segmentation problem to enhance the outcome.

In this work, the FA, initially proposed by Yang, is considered [35, 36]. From the recent literature, it is observed that the FA offers better optimal solution for variety of engineering problems [3748]. In this work, recently proposed Brownian distribution guided firefly algorithm (BDFA) by Sri Madhava Raja et al. [49] is adopted for solving multilevel thresholding image segmentation problem using Otsu’s between-class variance method. The proposed technique is tested on twelve standard test images and compared with the traditional FA and Lévy flight guided firefly algorithm (LFFA).

The paper is organized as follows. Section 2 presents the Otsu based multilevel thresholding problem. Section 3 presents the overview of the FA, and the implementation of Otsu guided FA is discussed in Section 4. Experimental results are evaluated and discussed in Section 5. Conclusion of the present research work is given in Section 6.

2. Methodology

The classical and optimization algorithm based thresholding methods existing in the literature are employed to find the best possible threshold in the segmented histogram by satisfying some guiding parameters. Otsu based image thresholding is initially proposed in 1979 [50]. This method presents the optimal values by maximizing the objective function. In the present work, Otsu’s nonparametric segmentation method known as between-class variance is considered. A detailed description of the between-class variance method could be found in [1, 11].

In bilevel thresholding (for ), input image is divided into two classes such as and (background and objects, or vice versa) by a threshold at a level “.” The class encloses the gray levels in the range 0 to and class encloses the gray levels from to . The probability distributions for the gray levels and can be expressed as where , , and .

The mean levels and for and can be expressed as The mean intensity of the entire image can be represented as The objective function for the bilevel thresholding problem can be expressed as where and .

The above discussed procedure can be extended to a multilevel thresholding problem for various “” values as follows.

Let us consider that there are “” thresholds , which divide the input image into “” classes: with gray levels in the range 0 to , with enclosed gray levels in the range to , and with gray levels from to .

The objective function for the multilevel thresholding problem can be expressed as where , . (Note that, in the proposed work, objective functions are assigned for , , , and .)

3. Firefly Algorithm

Firefly algorithm is a nature inspired metaheuristic algorithm initially proposed by Yang [35, 36]. This algorithm is developed by imitating the flashing illumination patterns generated by invertebrates such as glowworm and firefly. They generate chemically produced light from their lower abdomen. This bioluminescence with varied flashing patterns generated by glowworm/firefly is used to establish communication between two neighboring insects, to search for prey and also to find mates.

The classical FA is developed by taking the following conditions into account [3740].(i)All the fireflies are unisex and one firefly will be attracted to the nearest firefly regardless of their sex.(ii)The attractiveness between two fireflies is proportional to the luminance. For any couple of flashing fireflies, the firefly with the brighter luminance will attract the firefly with lesser luminance. The attractiveness between two fireflies mainly depends on the Cartesian distance and is proportional to the brightness which decreases with increasing distance between fireflies. In a region, if all the fireflies have lesser luminance, then they will move randomly in the “” dimensional search space until they find a firefly with brighter luminance.(iii)The brightness of a firefly is somehow related to the analytical form of the objective function assigned to guide the search process.

The overall performance (exploration time, speed of convergence, and optimization accuracy) of the FA depends on the cost function, which monitors the optimization search. For a maximization problem, luminance of a firefly is considered to be proportional to the value of cost function (i.e., luminance = objective function).

3.1. Fundamentals

The chief parameters which decide the efficiency of the FA are the variations of light intensity and attractiveness between neighboring fireflies. These two parameters will be affected by the increase in the distance between fireflies [23].

Variation in luminance can be analytically expressed by the following Gaussian form: where is the new light intensity, is the original light intensity, and is the light absorption coefficient.

The attractiveness to the luminance can be analytically represented as where is the attractiveness coefficient and is the attractiveness at .

The above equation describes a characteristic distance over which the attractiveness changes significantly from to . The attractiveness function can be any monotonically decreasing functions such as the following form: For a fixed , the characteristic length becomes Conversely, for a given length scale , the parameter can be used as atypical initial value (i.e., ).

The Cartesian distance between two fireflies and at and , in the -dimensional search space, can be mathematically expresses as In FA, the light intensity at a particular distance from the light source obeys the inverse square law. The light intensity of a firefly reduces,as the distance increases in terms of . The movement of the attracted firefly towards a brighter firefly can be determined by the following position update equation: where is the updated position of firefly, is the initial position of firefly, is the attraction between fireflies, and is the randomization parameter.

From (11), it is observed that updated position of the th firefly depends on initial position of the firefly, attractiveness of firefly to the luminance, and the randomization parameter. In this paper randomization parameters such as   [36] and Lévy [37, 51] are considered. Lévy flight based randomization parameter helps to achieve faster convergence compared to other randomization parameters existing in the literature.

3.2. Working Principle

The working principle of the traditional FA is demonstrated in this section using a two-dimensional optimization problem. The total number of fireflies is assigned as six. When the algorithm is initialized, all the fireflies are randomly distributed in the two-dimensional search space. In this problem, it is assumed that the search space has two local best values and a global best value.

During the initial search, some fireflies move towards the local best (LB) values and some reach the global best (GB) value as illustrated in Figure 1(a). From Figure 1(a), it is observed that firefly 1 (FF1) is at LB1, firefly 4 (FF4) is at GB, and firefly 5 (FF5) is at LB2. FF2 lies between LB1 and GB, FF3 lies between GB and LB2, and FF6 is between GB and LB2. The light intensity produced by FF4 is brighter than the light intensity by FF1 and FF5. At this condition, FF2 moves towards LB1 or GB based on the Cartesian distance “” (8). In this problem, the distance between FF1 and FF2 () is short compared to ; hence FF2 moves towards LB1. Similarly, the Cartesian distance between FF4 and FF3 is shorter than , and FF3 is more likely attracted to GB than LB2. The Cartesian distance between FF6 and FF5 is shorter than , and FF6 is likely attracted to LB2.

Figure 1(b) shows the second stage of search process. When the search iteration increases, the firefly at the GB is retained. The attraction signal between the fireflies at the local best value is exponentially decreased with the increase in search iteration and the entire fireflies move towards the GB. Finally a considerable amount of fireflies are gathered at the global best value as shown in Figure 1(c) at the end of optimization search.

3.3. Lévy Flight and Brownian Distribution

In recently developed nature inspired methods such as firefly and cuckoo algorithm, optimization search process is guided by Lévy flight (LF) strategy [35].

LF is a random walk with a sequence of arbitrary steps and is conceptually similar to the search path of a foraging animal [52]. In LF, the flight span and the length between two successive changes in direction are drawn from a probability distribution. Similar to LF, Brownian distribution (BD) is also in the family of random walks. Figure 2 shows the relationship between LF and BD. Based on the temporal exponent () and spatial exponent values, LF and BD can be realized from the random walks [53]. A detailed justification of LF and BD is discussed in the book by Yang [35]. Lévy flight is superdiffusive Markovian process, whose step length is drawn from the Lévy distribution in terms of a simple power-law formula:

The Brownian walk is a subdiffusive non-Markovian process, which obeys a Gaussian distribution with zero mean and time-dependent variance. In (12), the ratio of exponents provides the relationship between sub- and superdiffusion. When , the continuous random walk is superdiffusive, and for it is subdiffusive. For , the search process exhibits the same scaling as ordinary Brownian motion [52, 54].

Figures 3(a) and 3(b) depict the search patterns of a single firefly with LF and BD in a two-dimensional search space. Figure 3(a) shows that Lévy flight guided FA is very efficient in exploring unknown search space with minimal number of iterations, because of its large step size. Figure 3(b) shows that the BD guided FA explores the search space with smaller step size and provides the best possible solution. In this work, the following formulae are considered: where is the random variable, is the spatial exponent, is the temporal exponent, and is a Gamma function. Equations (13) and (14) are formed as discussed in [49]. The random variable presented in (15) is chosen based on the article by Gandomi et al. [51].

4. Implementation

The multilevel thresholding problem deals with finding optimal thresholds within the gray scale range that maximize a fitness criterion . Otsu’s between-class variance function is employed to find the threshold values. The search dimension of the optimization problem is assigned based on the number of thresholds considered. In this paper, optimal multilevel thresholding has been carried out by an unsupervised global-level nonparametric approach. In the proposed approach, the efficiencies of BDFA, LFFA, and FA are tested separately, and their performances have been compared.

Figure 4 depicts the flow chart of the proposed work. The firefly algorithms are employed to find the optimal threshold values by maximizing the objective function.

In metaheuristic algorithm based optimization methods, the bounded search technique helps to achieve better values with lesser iterations [49]. In the proposed work, the dimension of the search varies from 2 to 5 based on the “” values. When , it is a simple two-dimensional optimization problem and an unbounded search may offer better result with lesser iterations. When “” value increases, the complexity of the optimization problem also will increase.

In this paper we introduced a bounded search technique for the image segmentation problem. Instead of initializing the search operation with a range of gray levels , we propose a search boundary as

Figure 5 shows the histogram of the Barbara image. The value of “” is five; hence it is a five-dimensional optimization problem (i.e., the number of threshold to be identified is five). The search boundary for the threshold is assigned as 20 < gray levels < 220. During the boundary based search, the optimization algorithm explores the gray levels situated between 20 and 220 and ignores the rest of the gray levels. This bounded search technique will provide better solution with lesser iterations.

The performance of the Otsu guided firefly algorithms is evaluated using the well-known parameters such as peak-to-signal ratio (PSNR) and structural similarity indices (SSIM) [11].

The PSNR is mathematically represented as

The SSIM is normally used to estimate the image quality and interdependencies between the original and processed image. SSIM index combines luminance comparison, contrast comparison, and structure comparison and satisfies symmetry, boundedness, and unique maximum properties:

Otsu guided firefly algorithm based multilevel thresholding techniques have been tested on different standard test images such as Barbara, where is the average of , is the average of , is the variance of , is the variance of , is the covariance of and , and stabilize the division with weak denominator, , , and .

Like SSIM, structural dissimilarity (DSSIM) is also a measure of the processed image quality and it can be expressed as

In this work, PSNR and SSIM are considered to evaluate the performance of firefly algorithms.

5. Results and Discussion

The images Lena, Cameraman, Living Room, Mandrill, Jet, and Boat are obtained from the database available at [55]. The remaining five images, Zebra, Snake, Fish, Star Fish, and Sailor, were taken from the Berkeley Segmentation Dataset [56]. The entire image has an inimitable grey level histogram. All the test images are converted into a 256 × 256 sized gray scale image before the analysis. In the test images, most of them are difficult to segment because of their multimodal histograms. Images such as Barbara and Lena show multiple peaks and valleys whereas the Living Room image shows abruptly changing pixel levels. Other images such as Mandrill, Boat, Zebra, Snake, Fish, and Star Fish show a smooth distribution in gray level compared to the Cameraman and Jet.

All the experiments were performed on a work station with an AMD C70 Dual Core 1 GHz CPU with 4 GB of RAM and equipped with MATLAB R2010a software.

The firefly algorithm parameters are assigned as discussed in [51]; the number of fireflies is as follows:, , , and (gradually reduced to 0.1 in steps of 0.01 as iterations proceed), and the total number of run is chosen as 5000.

During the experiment, each image is examined with a number of thresholds such as to 5. The simulation study is repeated 20 times individually and the best value among the search is recorded as the optimal threshold value. In Figures 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, and 17, (a) represents the original image, (b) represents the histogram for a 256 × 256 image, and (c) to (f) represent the segmented images of Otsu guided BDFA for to 5.

During the optimization exploration, the search boundaries for the images are assigned as follows.

Lena = 20 < gray levels < 220, Cameraman = 50 < gray levels < 200, Living Room = 0 < gray levels < 230, Mandrill 30 < gray levels < 210, Jet = 50 < gray levels < 220, Boat = 50 < gray levels < 200, Zebra = 50 < gray levels < 200, Snake = 20 < gray levels < 200, Fish = 30 < gray levels < 230, Star Fish = 30 < gray levels < 230, and Sailor = 10 < gray levels < 210.

For all the test images, the histogram (Figure  ) and Otsu guided BDFA based processed images for = 2, 3, 4, and 5 are presented (Figures  () to ()) for all the considered test images. The quality of image segmentation is better for all the images when compared to lesser “” values.

The objective values and optimal threshold values for Otsu guided BDFA, LFFA, and FA are presented in Table 1. The other quality measures such as standard deviation, PSNR, SSIM, and CPU time are depicted in Table 2. From Table 1, it is seen that the BDFA offers better objective function values for most of the test images compared to the LFFA and FA.

6. Conclusion

In this paper, optimal multilevel image thresholding problem is addressed using Otsu guided firefly algorithms. The proposed histogram based bounded search technique helps in reducing the computation time. Further, the performances of the BDFA, LFFA, and FA are evaluated using parameters such as objective function, standard deviation, PSNR, SSIM, and search time of CPU. When the assigned threshold level is two , all the FAs provide approximately similar threshold values. When “” increases, the search time taken by the BDFA regularly increases compared to LFFA and FA. From the result, it is evident that, for , Brownian distribution based FA provides better objective function, PSNR, and SSIM, whereas Lévy flight based FA shows faster convergence with relatively lower CPU time. To analyze the permanence of the algorithms, the standard deviations of 20 runs have been presented in Table 1 for Otsu’s between-class variance. The PSNR and the SSIM presented in Table 2 also prove the efficiency of the proposed Brownian distribution guided firefly algorithm. Due to the smaller search step, the BD guided firefly algorithm’s run time is considerably larger than Lévy flight guided firefly and the traditional FAs.

Conflict of Interests

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