Matrix Science Pharma

: 2019  |  Volume : 3  |  Issue : 1  |  Page : 5--8

Medical image segmentation method based on the improved artificial bee colony algorithm

LF Li1, MR Qi2,  
1 Department of Medicine, School of Computer Science, Shaanxi Normal University, Xi'an, China
2 Department of Medicine, Xi'an University of Science and Technology, College of Humanities and Foreign Languages, Xi'an, China

Correspondence Address:
Dr. L F Li
School of Computer Science, Shaanxi Normal University, Xi'an 710119


Objectives: The aim is to study the application of artificial bee colony (ABC) algorithm in medical image threshold segmentation. Methods: A new image segmentation method based on the improved ABC and thresholding medical image threshold segmentation method is proposed, which is variable coefficient ABC (VCABC) optimization algorithm, which is used to determine n-1 optimal n level threshold on a given image. The proposed method is compared with the Particle Swarm Optimization fractional image threshold segmentation method and the ABC fractional medical image threshold segmentation method. Results: When considering a variety of conditions, the performance of this method is better than that of other methods. Conclusions: The improved method of combining ABC and fractional medical image threshold segmentation method is effective.

How to cite this article:
Li L F, Qi M R. Medical image segmentation method based on the improved artificial bee colony algorithm.Matrix Sci Pharma 2019;3:5-8

How to cite this URL:
Li L F, Qi M R. Medical image segmentation method based on the improved artificial bee colony algorithm. Matrix Sci Pharma [serial online] 2019 [cited 2021 Nov 30 ];3:5-8
Available from:

Full Text


As the basis of image processing, image segmentation is a key step from low-level image processing to high-level image analysis and high-level image understanding. The subsequent steps of image processing, such as feature extraction, target detection, and so on, all rely heavily on the segmentation results and accuracy. Therefore, the development and improvement of image segmentation technology has a very important role and research value for image processing technology.[1]

The so-called image segmentation is based on the characteristics of the foreground and background of the image, or different threshold color information, to extract a meaningful part of an image.

In recent years, many image segmentation techniques have been proposed. Among all the currently existing segmentation technologies, image threshold segmentation technology has become a research hotspot due to its ease of use, stability, and high precision. Image threshold segmentation techniques can be roughly divided into two categories: one is to determine the optimal threshold by analyzing the histogram characteristics of the image and the other is to design an evaluation function and use an optimization algorithm to find its optimal solution and to determine the optimal threshold.[2] These methods include the maximum entropy method, the minimum Bayesian error method, and the largest between-class variance method (Otsu). Among them, the maximum between-class variance method is to use the image and is divided into several categories, using the threshold information as input to construct a function, so that the intra-class variance is the smallest, the maximum variance between classes, it is a maximizing threshold segmentation function. However, due to the exhaustive search algorithm segmentation time is long, its complexity increases exponentially with the increase of the dimension. Therefore, many scientists have introduced intelligent optimization algorithms. Commonly used are particle swarm optimization (PSO), differential evolution, artificial bee colony (ABC), ant colony optimization, and so on. Among them, ABC algorithm has been widely used in various application fields because of its strong global search capability.[3] However, the convergence speed itself is slow, and the optimization accuracy is not high, thus limiting its performance. Based on these characteristics, this article proposes an improved artificial bee colony algorithm (ABC)based on the group experience to speed up the convergence speed and improve the optimization accuracy [Figure 1].{Figure 1}


Threshold segmentation is one of the most widely used segmentation methods. The most popular method is the largest interclass variance method (Otsu) proposed by the Japanese scientist Otsu Exhibition and the later derived two-dimensional (2D) and 3D Otsu methods. These algorithms are based on one-dimensional and 2D methods. The features of dimensional and 3D histograms, combined with intelligent algorithms, have achieved good applications in various fields. The ABC algorithm is an intelligent search method that was used by Karaboga et al. in 2007 to imitate bees' honey collection behavior. This algorithm uses the information sharing among three bees to find the best honey source for nectar (threshold). The algorithm has the advantages of less control parameters, easy implementation, and simple calculation. At present, the common problem of bee colony algorithm is that the search ability is strong, but the development ability is weak, which slows down the convergence speed of the algorithm and easily falls into the local optimal solution. Huo Fengcai et al. borrowed the idea of quantum to introduce the sinusoidal component of the bit probability amplitude into the bee colony algorithm. By updating the honey source initialization method, honey source updating strategy, and investigating bee behavior, the convergence time and noise reduction of the improved algorithm in segmentation are effectively shortened. Yu Fangjun et al. combined the Tent chaos optimization algorithm, using Tent chaotic sequence to initialize the population and dynamically adjust the chaotic search space.[4] The experimental results show that the improved algorithm accelerates the convergence speed and optimization accuracy. Gao et al. proposed two search formulas at the hiring and reconnaissance bee stage. The results show that the performance of the algorithm is improved, and the stability, convergence, and honey quality are improved. Alizadegan et al., Bhandari et al., and Gao et al.[5] have conducted a research on this issue and proposed their own improvement schemes in generating initial honey sources and local search optimization solutions.

This article addresses the above issues of bee colony algorithm, adding the current optimal food source and the guidance of the preferred direction when updating the food source location, and introduces a declining boundary strategy during each iteration to guide the bees. The group moves only to the optimal position and selects a new honey source, which accelerates the convergence of the algorithm and can avoid the algorithm from falling into a locally optimal solution to some extent.[6]


A fractional-order image threshold segmentation method based on the variable coefficient ABC (VCABC) algorithm is proposed, which transforms the selection of thresholds in fractional-order image segmentation methods into the optimization problem of ABC algorithm for φc-maximization. Among them:


φc is the global optimal value, and the corresponding threshold is the best segmentation threshold.

The steps of fractional order image threshold optimization based on the VCABC algorithm are as follows:

Randomly place the hired bees with half the number of algorithm populations within the search scope and hire the bee to search for new honey sources and determine the initial marker honey sourceCalculate the quality of the honey source, use the fractional image threshold segmentation method to calculate the value of/, and take the quality of the corresponding honey sourceThe follower bee with the same number of hired bees searches for a new honey source according to the improved search formula and calculates the value of the quality degree φc of the searched honey source and compares it with the previously searched honey source, and the value of φc is high. Replace the low φc value into a marker honey source, as the initial honey source for the next generation of bee colony searchWhether there is a honeybee search for a honeybee that has not changed after a certain number of iterations, and if so, it will require the scout bee to generate a new location to replace the corresponding honey sourceWrite down the global optimal solution Sbest and determine if the maximum number of iterations i has been reached. If not, repeat steps (3) and (4). Otherwise, the threshold corresponding to the optimal solution Sbest at this time is the optimal threshold for image threshold segmentation.


Do the following two simulation experiments on MATLAB software:

Experiment 1: Testing the performance of VCABC algorithm. Experiments were performed on the Griewank function, Sphere function, and Rosenbrock function. The parameters of the algorithm were set the same and the dimensions were all 5.

On the Grievek function, the convergence speeds of the two algorithms have advantages in different iteration periods, but the convergence of the VCABC algorithm is better than that of the ABC algorithm. On the Sphere function, both the convergence speed of the VCABC algorithm are in the two algorithms. It is slightly better than the ABC algorithm. On the Rosenbrock function, the VCABC algorithm in both the algorithms is superior to the ABC algorithm in the convergence and convergence speed of the algorithm.

Experiment 2: Using the PSO algorithm, classic ABC algorithm, and improved ABC algorithm, medical image was segmented and compared using fractional image segmentation method.

From the left to right in [Figure 2], [Figure 3], [Figure 4] are the original image, PSO algorithm fractional image segmentation method segmentation results, ABC algorithm fractional image segmentation method segmentation results, and VCABC algorithm fractional image segmentation method segmentation results.{Figure 2}{Figure 3}{Figure 4}

By comparing the fitness values, thresholds, and operation time of three algorithms for different medical test images, we can see that the PSO algorithm has the best stability, followed by the VCABC algorithm, and the ACB algorithm is the worst; the VCABC algorithm has the shortest running time. Second, the ABC algorithm is the second, and the PSO algorithm is the worst. The VCABC algorithm has the best convergence and the highest precision. The ABC algorithm is the second, and the PSO algorithm is the worst.

In summary, the fractional image threshold segmentation method based on the VCABC algorithm is more effective than PSO algorithm's fractional image threshold segmentation method and slightly better than ABC algorithm's fractional image threshold segmentation method. However, whether it is from the accuracy of the image threshold, the algorithm's running time and threshold selection are based on the VCABC algorithm of fractional image threshold segmentation method is better. It can be seen that the fractional image threshold segmentation method based on the VCABC algorithm can make up for the deficiency of PSO algorithm's fractional image threshold segmentation method.


In the medical image analysis, segmenting an image into meaningful objects is very important for classification and object recognition. The adaptability, accuracy, and real-time performance of image segmentation can reflect the degree of intelligence, accuracy, and detection speed of target recognition and target detection. Therefore, research on image segmentation has very important practical value. Fractional image threshold segmentation method based on the VCABC algorithm proposed in this article can effectively segment the medical image and optimize the ABC algorithm based on inheriting the advantages of ABC algorithm such as strong optimization ability, simple operation, high time efficiency, and then fractional image. Threshold segmentation method is improved. Experiments show that the fractional image threshold segmentation method based on the VCABC algorithm is superior to other fractional image threshold segmentation methods in the segmentation effect, time efficiency, and algorithm accuracy.

Financial support and sponsorship


Conflicts of interest

There are no conflicts of interest.


1Kang F, Li J, Ma Z. Rosenbrock artificial bee colony algorithm for accurate global optimization of numerical functions. Inf Sci 2011;181:3508-31.
2Karaboga D, Okdem S, Ozturk C. Cluster based wireless sensor network routing using artificial bee colony algorithm. Wirel Netw 2012;18:847-60.
3Wang H, Wu Z, Rahnamayan S. Multi strategy ensemble artificial bee colony algorithm. Inf Sci 2014;279:587-603.
4Cuevas E, Sención F, Zaldivar D. A multi-threshold segmentation approach based on Artificial Bee Colony optimization. Appl Intell 2012;37:321-36.
5Mernik M, Liu SH, Karaboga D. On clarifying misconceptions when comparing variants of the artificial bee colony algorithm by offering a new implementation. Inf Sci 2015;291:115-27.
6Gao WF, Liu SY, Huang LL. Enhancing artificial bee colony algorithm using more information-based search equations. Inf Sci 2014;279:112-33.