# OTSU Multi-Threshold Image Segmentation Based on Improved Particle Swarm Algorithm
## 5 Experimental Analysis
### Benchmark Function  
This paper selects 12 standard test functions for comparative experiments to test the robustness, exploration, and development performance of the functions. These functions were derived from the CEC benchmark function [26], covering unimodal functions (F1-F4), multimodal functions (F5-F8), and fixed dimensional multimodal functions (F9-F12), all of which had minimum values. The algorithm compared with this paper uses the traditional meta-heuristic algorithms, which are whale optimization algorithm (WOA) [27], butterfly optimization algorithm [28], and particle swarm optimization algorithm [14]. In order to make a fair evaluation, this paper conducted 30 experiments on four optimization algorithms at the same time, and the experimental results less than \(10^{-8}\) are represented by 0. Table 1 shows the selected test functions: Dim is the number of variables and N\(\backslash\)A is unsolvable. Table 2 shows the average value and standard deviation of the benchmark function calculated by this method and the traditional meta heuristic algorithm. According to the data in Table 2, our method is robust in dealing with the mechanism of benchmark function, whether it is unimodal, multimodal, or a fixed-dimensional multimodal function. From Table 2, we can see that our method has better performance than WOA, BOA, and PSO. In particular, there is a smaller error in multimodal function, which shows that the method in this paper has better exploration capability. We found that our method did not find the global minimum in several functions, but the error was smaller than other algorithms. To sum up, our method was more exploitative and exploratory than other algorithms. The specific experiments are as follows: \begin{table}
\begin{tabular}{l c c c c c c c} \hline
**Test Function** & **Type** & **Dim** & **Range** & \(f_{min}\) \\ \hline \(F_{1}(x)=\sum_{i=1}^{n}x_{i}^{2}\) & US & 30 & \([-100,100]\) & 0 \\ \(F_{2}(x)=\sum_{i=1}^{n}|x_{i}|+\prod_{i=1}^{n}|x_{i}|\) & US & 30 & \([-10,10]\) & 0 \\ \(F_{3}(x)=\sum_{i=1}^{n}(|x_{i}+0.5|)^{2}\) & US & 30 & \([-100,100]\) & 0 \\ \(F_{4}(x)=\sum_{i=1}^{n}ix_{i}^{4}+random[0,1)\) & US & 30 & \([-128,128]\) & 0 \\ \(F_{5}(x)=-20 exp(-0.2\sqrt{\frac{1}{n}\sum_{i=1}^{n}x_{i}^{2}})-exp(\frac{1}{ n}\sum_{i=1}^{n}cos(2\pi x_{i}))+20+e\) & UN & 30 & \([-32,32]\) & 0 \\ \(F_{6}(x)=\frac{1}{4000}\sum_{i=1}^{n}x_{i}^{2}-\prod_{i=1}^{n}cos(\frac{x_{i} }{\sqrt{i}})+1\) & UN & 30 & \([-600,600]\) & 0 \\ \(F_{7}(x)=\frac{\pi}{n}(10 sin(\pi y_{1})+\sum_{i=1}^{n-1}(y_{i}-1)^{2}(1+10 sin^ {2}(\pi y_{i+1}))+(y_{n}-1)^{2})\) & UN & 30 & \([-50,50]\) & 0 \\ \(+\sum_{i=1}^{n}u(x_{i},10,100,4)\) & & & & & \\ \(F_{8}(x)=0.1(sin^{2}(3\pi x_{1})+\sum_{i=1}^{n}(x_{i}-1)^{2}(1+sin^{2}(3\pi x _{i}+1))+(x_{n}-1)^{2}\) & UN & 30 & \([-50,50]\) & 0 \\ \((1+sin^{2}(2\pi x_{n}))))+\sum_{i=1}^{n}u(x_{i},5,100,4)\) & & & & \\ \(F_{9}(x)=4x_{1}^{2}-2.1x_{1}^{4}+\frac{1}{3}x_{1}^{6}+x_{1}x_{2}-4x_{2}^{2}+4x_ {2}^{4}\) & FDM & 2 & \([-5,5]\) & \(-1.0316\) \\ \(F_{10}(x)=(x_{2}-\frac{5.1}{4\pi^{2}}x_{1}^{2}+\frac{5}{\pi}x_{1}-6)^{2}+10(1- \frac{1}{8\pi})cosx_{1}+10\) & FDM & 2 & \([-5,5]\) & 0.398 \\ \(F_{11}(x)=(1+(x_{1}+x_{2}+1)^{2}(19-14x_{1}+3x_{1}^{2}-14x_{2}+6x_{1}x_{2}+3x_{ 2}^{2}))\) & FDM & 2 & \([-2,2]\) & 3 \\ \(\times(30+(2x_{1}-3x_{2})^{2}\times(18-32x_{1}+12x_{1}^{2}+48x_{2}-36x_{1}x_{ 2}+27x_{2}^{2}))\) & & & & \\ \(F_{12}(x)=-\sum_{i=1}^{1}0((X-a_{i})(X-a_{i})^{T}+c_{i})^{-1}\) & FDM & 4 & [0,10] & \(-10.5363\) \\ \hline \end{tabular}
\end{table} 
Table 1: Benchmark Function.