# Using an Artificial _Physarum polycephalum_ Colony for Threshold Image Segmentation
## 4 Algorithm Steps of APPCA
### Step 2: Expansion
Finally, the statistical comparison of the Stanford background dataset is shown in Table 3. Some metrics were explored for performance comparison, including \(MSE\) in Equation (6), \(PSNR\) in Equation (7), and \(SSIM\) in Equation (13). The optimal solution for each benchmark image is highlighted in bold. Table 3 again verified that the proposed APPCA can obtain better performance in most performance metrics than other artificial intelligence algorithms, including three optimal solutions on image ID 0105146, 6000141, and 9000002. Other artificial intelligence algorithms have also obtained the optimal solution with a certain probability; for example, DL [4; 12; 21; 38] obtained two optimal solutions on image ID 6000321 and 9005294, and PSO [7; 23; 40] achieved an optimal solution on image ID 5000226. At the same time, the APPCA did not achieve the highest \(MSE\) or the lowest \(PSNR\) or \(SSIM\). Although other artificial intelligence algorithms have a small chance of achieving high-performance metrics, they are more likely to achieve the highest \(MSE\) or lowest \(PSNR\) or \(SSIM\). The DL [4; 12; 38; 12] algorithm performs well in computational accuracy, but it often requires more computational time. The increase in population size in the expansion stage helps the artificial _Physarum polycephalum_ colony search for more solutions in a shorter time and prevents it from falling into local optima too early. Figure 6: _Cont._

### Experiment Summary

According to the benchmark experimental results in Sections 5.2 and 5.3, it is verified that the proposed APPCA has some advantages in solving the threshold image segmentation problem. First, the proposed APPC algorithm can use Kapur's entropy in Equation (5) as a fitness function to search for the optimal solutions to the threshold image segmentation problem. Kapur's entropy is useful to maximize the total entropy of the segmented target and background. The artificial _Physarum polycephalum_ colony can employ the fitness function to instruct its expansion and contraction to search for the optimal segmented images. Second, the variable population size of the proposed APPC algorithm can effectively improve its global search performance. In the expansion operation, the population size increases and more hyphae are produced to search for more feasible solutions by self-learning, social learning, and free learning. Three parts of hyphae can enhance global searching and fast convergence performance and obtain better segmentation performance than other artificial intelligence algorithms in most cases. Third, the optimal solutions are easy to preserve through a quick sort algorithm in the contraction of the proposed APPC so as to improve its convergence performance. In each iteration, the APPC uses a quick sort algorithm to select the best hyphae with high fitness and the population size recovers. The contraction operation protects the optimal solutions after the expansion operation, but the other swarm intelligence algorithms are more likely to lose the optimal solution in each iteration. The expansion and contraction operations effectively solved the problem that the traditional swarm intelligence algorithm easily falls into the local optimal solution prematurely. Fourth, the proposed algorithm has good robustness but traditional swarm intelligence algorithms tend to deteriorate rapidly with the expansion of the problem scale. Although

Figure 6: Convergence curves on Stanford background dataset. (**a**) image ID 0105146; (**b**) image ID 5,000,226; (**c**) image ID 6,000,141; (**d**) image ID 6,000,321; (**e**) image ID 9,000,002; (**f**) image ID 9,005,294.

other artificial intelligence algorithms can obtain good segmentation performance, i.e., DL can obtain accurate segmented images in many cases, they will consume more time and more iterative computation. The APPC algorithm can obtain a good balance between the solving accuracy and solving time. The time performance and space performance of APPC are linearly correlated with the problem scale and computational parameters.