# Using an Artificial _Physarum polycephalum_ Colony for Threshold Image Segmentation
## 1 Introduction  
Image segmentation is a key step from image processing to image analysis. Among them, threshold segmentation is the most commonly used parallel region technique and also the category with the highest number of applications in image segmentation. Threshold image segmentation employs the image gray-level histogram and one or more thresholds to segment an image [1]. This method compares the gray values between the target and the background on an image and selects appropriate thresholds to implement image segmentation where it judges each pixel belonging to the target region or the background region [2]. Now, the threshold image segmentation method is the most widely used and has become an essential link in image processing, i.e., COVID-19 diagnosis [2], satellite monitoring [3], remote sensing analysis [4], fault diagnosis [5], carotid artery surgery [6], prevention and control of maize diseases [7], CT scan [8], etc. Peak signal-to-noise ratio (PSNR) and feature similarity (FSIM) are often used indexes for performance evaluation of threshold image segmentation. The selection of a threshold is important for threshold segmentation methods since only accurate threshold selection can ensure the accuracy of threshold image segmentation [9]. Recently, more and more scholars are getting involved in this area and trying to findthe optimal threshold. For a given image, the optimal threshold can often be determined by analyzing its histogram. For example, when the histogram clearly shows a bimodal pattern, the midpoint of the two peaks can be selected as the optimal threshold [10]. According to the dimension, the image histogram can be classified into one-dimensional (1-D) histogram, two-dimensional (2-D) histogram, three-dimensional (3-D) histogram [3; 11], and so on. Because of the complexity of images and the uncertainty of noise interference, determining the appropriate threshold through histograms is still not an easy task [12]. Due to the difficulty of manually selecting thresholds, many scholars have begun to use artificial intelligence algorithms to help us determine appropriate thresholds and many algorithms are verified to have great potential in the field of threshold image segmentation [6; 9]. Among them, swarm intelligence is a hotspot that simulates the behaviors of a swarm of animals in foraging and living. For example, the whale optimization algorithm (WOA) [1], Harris hawks optimization (HHO) [2], artificial neural networks (ANNs) [3; 11], deep learning (DL) [4; 12], gray wolf optimization (GWO) [5], particle swarm optimization (PSO) [7], differential evolution algorithm (DEA) [9], cuckoo search algorithm (CSA) [10], ant colony optimization (ACO) [13], genetic algorithm (GA) [14], artificial bee colony algorithm (ABC) [15], sparrow search algorithm (SSA) [16], and so on. Recent works verified that swarm intelligence algorithms can obtain good performance and are promising to solve image segmentation problems. However, the heuristic search used by artificial intelligence algorithms also easily to falls into the local optimal solution too early due to the probabilistic [6; 9]. Inspired by the intelligent behavior of a natural _Physarum polycephalum_, which can produce a large number of hyphae to search for food [17; 18], a novel artificial _Physarum polycephalum_ colony algorithm (APPCA) is proposed to help us solve the threshold image segmentation. The main contributions of this article are as follows:  
* To overcome the shortcomings of an algorithm search, an APPCA is designed, which can search for the optimal solutions by the expansion and contraction of a lot of artificial hyphae. Different _Physarum polycephalum_ hyphae can learn from each other and produce more hyphae in expansion to enhance the global search capability. In contraction, the artificial _Physarum polycephalum_ colony (APPC) can select the best hyphae with the highest fitness values through a quick sort algorithm to improve the convergence performance.