2013 Fifth Conference on Measuring Technology and Mechatronics Automation
Multi-level threshold Image Segmentation using Artificial Bee Colony Algorithm Hu zhihui, Yu weiyu*, Lv shanxiang, Feng jiuchao School of Electronic and Information Engineering, South China University of Technology, Guangzhou, 510640China *Corresponding author
[email protected] (MEABCT) algorithm for image segmentation. The previous methods all can’t achieve the maximum of PSNR for image segmentation results. Besides that, the maximum entropy based algorithms are not suitable for segmenting the images with some Gaussian noise. We combined ABC algorithm with PSNR in this paper and put forward a novel algorithm, that is, maximum PSNR based artificial bee colony thresholding algorithm (MPABCT). The remainder of this paper is arranged as follows: section 2 introduces artificial bee colony algorithm. Section 3 MPABCT algorithm is given. Section 4 shows the experimental results of MEABCT and MPABCT. Section 5 concluded this paper.
Abstract—Image segmentation is still a crucial problem in image processing. In this paper, we proposed a novel multilevel image segmentation method based on PSNR using artificial bee colony algorithm (ABCA). PSNR is considered as an objective function of ABCA. The best multi-level thresholds
t
* 1
, t 2* , , t n*1 , t n*
are those which can make the PSNR
maximize. Further, we compare entropy and PSNR in segmenting gray-level images and noisy images. Through experiments, it is found that the entropy isn’t suitable to be applied to segmentation of images with Gaussian noise. So we can conclude that entropy can’t be used for noisy image segmentation. The experiments results demonstrate our proposed method is effective and efficient. Keywords-Artificial bee colony algorithm; segmentation Multi-level threshold; PSNR
I.
II.
Image
INTRODUCTION
Image segmentation plays as a vital role in image processing. It underlies high-level vision, which is significant for image retrieval, object recognition, semantic analysis and others. A number of segmentation methods [1-4] have been proposed in the past years. In these methods, thresholding is a typically simple technique and achieves high accuracy which has been applied extensively in image segmentation. Thresholding [5] includes clustering-based methods [7] and entropy-based methods [8]. Clustering-based method’s aim is to distinguish and classify image pixels under some requirements and rules. In the process, similarities among image pixels can be considered as guidelines in dividing them into certain categories. The typical clustering method includes Otsu [9], fuzzy C-means [10, 11] and so on. Entropy-based method is an approach originating from Shannon entropy [12]. To obtain faster and better segmentation results, many researchers applied swarm intelligence to thresholding for image segmentation [8, 15]. Genetic algorithm (GA) is one of the most popular evolutionary algorithms, which simulated Darwinian theory of evolution by natural selection and genetic mechanism of biological evolution [14]. Tang [15] combined minimum cross entropy with genetic algorithm to achieve more efficient thresholding. Particle swarm optimization (PSO) is a population based stochastic optimization technique developed by Kennedy [16], inspired by the social behaviour of bird flocking. However, the algorithms based on PSO or GA is easy to fall into local optimum. To solve these problems, many experts introduced artificial bee colony algorithm (ABCA) to multi-level threshold image segmentation. ABCA is proposed by Karaboga for optimizing numerical problems [17]. Horng [8] adopted the maximum entropy based ABCA thresholding 978-0-7695-4932-3/12 $26.00 © 2012 IEEE DOI 10.1109/ICMTMA.2013.177
ARTIFICIAL BEE COLONY ALGORITHM
In ABCA, the bee colony is divided into three categories: employed bees, onlooker bees and scouts. There are three steps in each cycle. Firstly, the employed bees are assigned to their food sources and the amounts of nectar are evaluated. After sharing this information about the nectar, onlooker bees select the food source regions and evaluating the amount of nectar in the food sources. The scout bee is sent out to find the new food sources. (1) Employed bees: All bees that are currently exploiting a food source are classified as ’employed’. There is only one employed bee for every food source, i.e., the number of food sources equals to the number of employed bees. They share the nectar information of the food sources with the onlookers. (2) Onlooker: ‘‘Onlookers’’ are those bees that are waiting in the hive for the information to be shared by the employed bees about their food sources. They tend to choose a food source according to the probability proportional to the quality of that food source. (3) Scouts: ‘‘Scouts’’ are those bees which are currently searching for new food sources in the vicinity of the hive. At first, generates a set of initial population T of FN solutions. (FN is the number of food sources). Each solution Ti contains D optimization parameter. Every employed bee determines a food source in its neighborhood and calculates its nectar amount (fitness) in each iteration. In order to determine a solution Ti in the neighborhood of Ti , a solution parameter j and another solution Tk (t k1 , t k 2 , t kD ) are selected randomly. Except for the value of the selected parameter j, all other parameter values of Ti are same as Ti i.e.,
Ti (Ti1Ti 2 , , Ti ( j 1) , Tij , Ti ( j 1) , , TiD ) . The value
707
Ti of the selected parameter j in Ti is determined using the following formula:
Tij Tij u (Tij Tkj )
tˆ0 ,0 I (i , j ) t1 tˆ1 , t1 I (i , j ) t 2 Iˆ (i , j ) , tˆ , t I (i , j ) t n n 1 n 1 tˆ , t I (i , j ) 255 n n
(1)
where u is an uniform varying in [-1, 1]. If its quality is better than that of its current food source then that employed bee moves to this new food source discarding the old one, otherwise it remains at its old food source. When a food source is exploited fully, all the employed bees linked with it abandon it. They will transmit the nectar information to onlookers which will choose the food sources as a probability Pi proportional to the nectar amount given in Eq. 2. 0.9 f (i) 0.1, i 0,1,, s max f i 1 f (i ) , Obj (i) 0 Obj (i) 1
Pi
(2)
f (i ) 1 Obj (i) , Obj (i) 0
(where f i is the fitness of the solution, s is the total number of food sources, and Obj (i ) means the objective function value of new solution). After all onlookers have selected their food sources, each of them determines a food source in the neighborhood of its chosen food source and computes its fitness. The best food source among all the neighboring food sources determined by the onlookers will be the new location of the food source i . If a solution represented by a particular food source does not improve for a predetermined number of iterations (limit) then that food source is abandoned by its associated employed bee. Then the scout search for a new food source randomly. After the new location of each food source is determined, another iteration of ABC algorithm begins. The process is repeated again and again till the termination condition is satisfied. The overview of the ABC is shown in figure1. III.
Figure1 overview of the ABCA tˆ0
1i
RMSE (t1 , t 2 , , t n 1 , t n )
i 1 j 1
i tn 1 tn 1
P
1i
1i
1i
, tˆn
i t n 255
i t1
i t n 1
P
1i
i t n
I . When the gray-level value of one pixel I (i, j ) in the original image is in the range from t n -1 to t n , the corresponding gray-level value Iˆ(i, j ) is replaced by tˆ n 1
* 1
* 2
* n 1
* n)
in the segmented image. ( t , t , , t , t denotes the best thresholds. 3.2 Proposal approach The parameters of ABC are listed as follows: NP denotes the number of bee colony including employed bees and onlooker bees, FN represents the number of food sources which equals the half of the colony max Cycle is the number of cycles, size, and limit indicates the number of trials. Set: NP 40 , FN 20 , max Cycle 100 ,
P
, , tˆn1
i P
image
limit 100 . Step1. Initialize population of solutions Generate food sources. Ti (i 1,2, , FN ) is denoted by
and I i, j denotes the one in the segmented image. The unit of PSNR is db. Therefore, the higher the PSNR is, the better result is. N
i t1 t 2 1
255
1i
(5) where P1i is the probability of gray-level value i in the
I i, j denotes the pixel’s value in the original image,
M
, tˆ1
i P
, t1* , t 2* , , t n* 1 , t n* max( PSNR(t1 , t 2 , , t n 1 , t n ))
(3)
I i, j I i, j
P i 0
PROPOSED APPROACH
2
i 0 t1 1
i P
1i
1i
3.1 PSNR PSNR which the objective function in our proposal is defined as 255 PSNR 10 log10 RMSE
i P
t n 1
t2 1
t1 1
matrix T in Eq. 6.
2
T T1 , T 2 , , T FN ,
(4)
MN
Ti Ti1 , Ti 2 , , TiD
(6)
Where Tij is the j-th component value of the i-th food
source that is restricted into 0, ,255 and Tij Tij 1 for
j . The fitness value of all solutions Ti is evaluated and
708
then set cycle 1 and the trial number of each
maximum entropy and PSNR of “Lena” images with Salt & Pepper noise using ABC.
solution Ti , traili 0 . Step2. Assign the employed bees on their food sources ' Each employed bee produces a new solution Ti by using Eq. 1. If the fitness of the new solution is better than that of the previous one, the employed bee memorizes the new position and replaces the original one; otherwise, the employed bee retains the original solution. Step3. Assign onlooker bees to the food sources depending on their amount of nectar Calculate the probability value Pi of the solution Ti according to their fitness values using Eq. 2. A onlooker bee updates its solution depending on the probabilities and determines a neighbor solution around the chosen one. In the selection procedure for the i-th onlooker( the initial value of i is 1), a random number is produced between [0, 1]. If this number is less than Pi , the solution is updated and i i 1 . This process is repeated until all onlookers have been distributed to solutions. Step4. The scout bees randomly research the neighbor area to discover new food sources Through Steps 2-3, the trail i of solution Ti will be
Table1 Result of Lena with Gaussian noise Gaussian noise intensity Original image 0.005 0.01 0.05 0.1
Threshold/ Entropy 80,126,175 /15.3913
Threshold/ PSNR 80,125,169 /25.9406
86,176 / 12.9872 90,180 / 12.9849 91,177/ 12.9447 89,166/ 12.8275
67,130 ,194 /16.2497 65,126 ,187 / 16.2707 58,128,190 /16.2393 55,125,185 /16.1051
76,126 ,176 / 23.9073 76,130,184 /23.3491 87,135,185 23.8746 99,152,200 /24.0075
93,158 / 21.6852 93,158 /21.6715 105,169/ 21.6402 119,180/ 21.7254
k=3
Figure2 the curve of table1
The curves in figure 2 reflect the variation of maximum entropy with the increase of the intensity of Gaussian noise. By observing the trend of the curves, we can observe that the maximum entropy of the images with Gaussian noise is higher than that of the original one. When the intensity of Gaussian noise is 0.05, a turning point appears. And the curves in figure 2 display the change of maximum PSNR in images along with the rise of the intensity of Gaussian noise. And the maximum PSNR of image with different Gaussian noise is lower than that of the original one. The trend will change in nearly 0.03 and 0.05. What’s more, the similar tendency can be seen in 2-3 threshold segmentation images. Therefore, the entropy and the PSNR curves of different images present totally different trend. Table2 Result of Lena with Salt & Pepper noise
increased by 1. If the solution Ti is not better than through Steps 2-3, the solution Ti will be abandoned in case that the
trail i of solution Ti will be increased by 1. If the trail i of solution exceeds the predetermined “ limit ”, the solution Ti is considered to be an abandoned solution. At the same time, the employed bee will be changed into a scout. The scout randomly produces the new solution by Eq. 7, and compares the fitness of new solution with that of its old one. If the new solution is better than the old solution, it will replace the old one and set its own trail i into 0. This scout will be changed into an employed bee. Otherwise, the old one is retained in the memory. (7) Tij Tmin, j rand (0,1) (Tmax, j Tmin, j ), j 1,2, , D
Salt & pepper noise intensity Original image
where the Tmin, j and Tmax, j are the minimum and maximum of the j-th component of all solutions, the rand (0, 1) is a function that generates the random number between [0, 1]. Step5. The best solution is recorded. Step6. The algorithm is end if the cycle is equal to the maximum cycle number, otherwise go to Step 2. IV.
k=2 Threshold/ Threshold/ Entropy PSNR 96,163 91,149 /12.4017 /22.9252
0.005 0.01 0.05
EXPERIMENTAL RESULTS
0.1
To compare the segmentation results using maximum entropy artificial bee colony thresholding (MEABCT) algorithm and our proposal (MPABCT) for the non-noisy and noisy images, we tested standard gray-level images with noise of different intensity. Table 1 and figure2 show the maximum entropy and PSNR of “Lena” images with Gaussian noise based on ABC. Table 2 and figure 3 list the
709
k=2
k=3
Threshold/ Entropy
Threshold/ PSNR
Threshold/ Entropy
Threshold/ PSNR
96,163 /12.4017
91,149 /22.9252
80,126,175 /15.3913
80,125,169 /25.9406
96,163/ 12.4314 96,163/ 12.4220 96,162/ 12.2542 100,156/ 11.8853
92 ,151/ 22.7481 101,163/ 22.4828 104,168/ 21.9384 108,181/ 21.4461
78,125,175 / 15.4295 78,125,175 / 15.4160 76,122,167 /15.1798 83,123,163 /14.7288
79,124 ,170 / 25.7616 81,128 ,173 / 25.4044 83,128,180 /24.5646 83,134,189 /23.8542
Gaussian noise is much better. Apparently, this result is opposite to subjective evaluation. Therefore, the entropy isn’t suitable to be applied to noisy image segmentation. On the other hand, the maximum PSNR of images with some Gaussian noise is lower than that of the original one. The result accords with the principle that the result with higher PSNR is better. From the analysis above, we can conclude that entropy can’t be used for segmentation of images with Gaussian noise. The experiments results show our proposed method is effective and efficient.
Figure3 the curve of table2
From the figure 3, we observe that the maximum entropy almost continues decreasing with the rise of the intensity of the Salt & Pepper noise no matter what the number of the threshold is. And the maximum PSNR also keeps declining. But a turning point appears in the intensity 0.03. In a word, the maximum entropy and PSNR of the images with Salt & Pepper noise is lower than that of the original images. The shape of the curves differs from those in figure 3. So the images with Gaussian noise have discrepant properties from the images with Salt & Pepper noise.
ACKNOWLEDGEMENTS This work was supported by the National Natural Science Foundation of China (Grant No.60972133), the Joint Fund of the National Natural Science Foundation and the Guangdong Provincial Natural Science Foundation (Grant No. U0835001), the fund for Higher-level Talent in Guangdong Province (No. X2DXN9101070).
REFERENCES [1]
[2]
[3]
(a) based on entropy (b) based on PSNR Figure4 two level threshold image
It’s obvious that the contrast between the object and the background is much higherin the figure4 (b) than that in the (b). Thus, the segmentation result is much better based on PSNR.
[4]
[5]
[6]
[7]
(a) based on entropy (b) based on PSNR Figure5 two threshold with 0.1 Gaussian noise
From the figure 5, it is obvious that Lena in figure 5(b) is more highlighted. And the segmentation results based on PSNR is superior to those based on entropy.
[8]
[9]
[10]
(a) based on entropy (b) based on PSNR Figure6 two threshold with 0.1 salt & pepper noise
V.
[11]
CONCLUSIONS [12]
Image segmentation is a crucial problem in image processing. PSNR is used as a principle to estimate the reconstruction images and denoised images. In this paper, we proposed a novel multi-level image segmentation method based on PSNR using ABCA. We compare entropy and PSNR in segmenting gray-level images and noisy images. In our experiment, the maximum entropy of the images with Gaussian noise is higher than that of the original one. Under this principle, the segmentation result of image with
[13]
[14]
710
Haniza Yazid, H. Arof, Hafizal Yazid, etal. Discontinuities detection in welded joints based on inverse surface thresholding, NDT & E International, vol.44, iss.7, Nov. 2011, pp.563-570. J. Peters, O. Ecabert, C. Meyer, etal. Optimizing boundary detection via Simulated Search with applications to multi-modal heart segmentation, Medical Image Analysis, vol.14, iss.1, 2010, pp.70-84. P.D. Sathya, R. Kayalvizhi. Modified bacterial foraging algorithm based multilevel thresholding for image segmentation, Engineering Applications of Artificial Intelligence, vol.24, Iss.4, 2011,pp.595-615. Zhongwu Wang, J.R. Jensen, Jungho Im, An automatic region-based image segmentation algorithm for remote sensing applications, Environ. Mod. & Soft., vol.25, iss.10, 2010, pp.1149-1165. Mehmet Sezgin, Bu¨ lent Sankur, Survey over image thresholding techniques and quantitative performance evaluation, Journal of Electronic Imaging, vol.13. iss.1, 2004, pp.146-165. Khang Siang Tan, Nor Ashidi Mat Isa, Color image segmentation using histogram thresholding-Fuzzy C-means hybrid approach, Pattern Recognition, vol.44, iss.1, 2011, pp.1-15. S. Das, A. Abraham, A. Konar Automatic kernel clustering with a Multi-Elitist particle swarm optimization algorithm, Pattern Recognition Letters, vol. 29, iss.5, 2008, pp.688-699. Ming-Huwi Horng, Multilevel thresholding selection based on the artificial bee colony algorithm for image segmentation, Expert Systems with Applications, vol.38, iss.11, 2011, pp.13785-13791. P. Javier Herrera, G. Pajares, M. Guijarro, A segmentation method using Otsu and fuzzy k-Means for stereovision matching in hemispherical images from forest environments, Applied Soft Computing, vol.11, iss.8, 2011, pp.4738-4747. H. Izakian, A. Abraham. Fuzzy Clustering Using Hybrid Fuzzy cmeans and Fuzzy Particle Swarm. http://www.softcomputing.net/nabic09_3.pdf. Xiang-Yang Wang, Juan Bu. A fast and robust image segmentation using FCM with spatial information, Digital Signal Processing, vol.20, iss.4, 2010, pp.1173-1182. M.L. Menendez, Shannon ’ s entropy in exponential families: statistical applications, Appl. Math. Lett. Vol.13,iss.1, 2000,pp.37-42. Tereshko, V., Loengarov, A., Collective decision-making in honey bee foraging dynamics, Computing and Information Systems, vol.9, iss.3, 2005,pp.1-7. Kamal Hammouche, Moussa Diaf, Patrick Siarry, A multilevel automatic thresholding method based on a genetic algorithm for a fast image segmentation, Computer Vision and Image Understanding, vol.109, iss2, 2008, pp.163-175.
[15] Kezong Tang, Xiaojing Yuan, Tingkai Sun. An improved scheme for minimum cross entropy threshold selection based on genetic algorithm, Knowledge-Based Systems,24, 2011, pp.1131-1138. [16] Yong Zhang, Dan Huang, Min Ji, Fuding Xie, Image segmentation using PSO and PCM with Mahalanobis distance, Expert Systems with Applications, vol.38, iss.7, 2011,pp.9036-9040. [17] B. Basturk and D. Karaboga, An artificial bee colony (ABC) algorithm for numeric function optimization, IEEE Swarm Intelligence Symposium, USA, 2006.
711