# OTSU Multi-Threshold Image Segmentation Based on Improved Particle Swarm Algorithm
## 5 Experimental Analysis
### Segmentation Experiment and Results  
We took the optimization time and image segmentation quality to evaluate the performance of algorithms for comparison. The segmentation quality was evaluated with peak signal-to-noise ratio (PSNR) [29; 30], structural similarity (SSIM) [31; 32], and feature similarity (FSIM) [33; 34], and fitness values of all algorithms were calculated. PSNR was used to evaluate the degree of image distortion, and the higher its value, the smaller the image distortion. SSIM evaluated image segmentation performance from image contrast and structural information. The larger the value, the better the performance. FSIM was used to evaluate the feature similarity between the original image and the segmented image. The larger the \(FSIM\in[0,1]\), the better the image segmentation quality. In this paper, the images in PASCAL 2012 [25] were selected as the experimental data set, including Figure 3a-f (numbered 000019, 000436, 001478, 003579, 004423, 006404). They were typical images with relatively centralized gray distribution and small inter class variance, while Figure 3g-l (numbered 001236, 001876, 002036, 004231, 004610, 006946) selected images with obvious differences in gray distribution, that is, the inter class variance was relatively large, as shown in Figure 3. Theoretically, the greater the number of segmentation thresholds, the greater the accuracy of the image segmentation. In order to quantitatively analyze the performance of segmentation, in the experiment, four groups of different segmentation thresholds were used. \(k\) is, 2, 4, 6, and 8 for index analysis. Our improved particle swarm optimization algorithm was compared with the classical particle swarm optimization algorithm [13], whale optimization algorithm [25], and butterfly optimization algorithm [26]. With several evaluation indicators, such as the classical particle swarm optimization algorithm, the whale optimization algorithm and the butterfly optimization algorithm are both bionic algorithms. The differences are that the whale optimization algorithm achieves the goal of searching by searching, surrounding, chasing, and attacking prey, while the butterfly algorithm locates the source of the target through its own perception. In this way, we can better understand the segmentation effect of the improved particle swarm optimization OTSU image segmentation method compared with other algorithms under different thresholds. Tables 3-10 show the comparison results of PSNR, SSIM, FSIM, and fitness values, respectively. It can be seen that with the increase of the number of thresholds k, the distortion after image segmentation gradually decreases, which is closer to the original image. SSIM and FSIM gradually increase, and the segmentation performance gets better and better, which shows the advantages of multi-threshold image segmentation methods. To verify the universality of the algorithm in this paper, we randomly selected 100 images from the PASCAL 2012 dataset for the same experiment and listed the average values of the experimental parameters in Table 11. In addition, the algorithm that performs best on the evaluation criteria is marked in bold. When the number of thresholds is small (\(k=2\) or \(k=4\)), the PSNR, SSIM, and FSIM values of the improved particle swarm optimization algorithm are slightly better than other algorithms. However, after the threshold number increases (\(k=6\) or \(k=8\)), the advantages of improved particle swarm optimization are reflected. The calculated PSNR, SSIM, and FSIM values were the highest among the four algorithms, which indicates that the segmentation, when the improved particle swarm algorithm solves the optimal threshold combination, has the highest similarity with the original image, and the optimization accuracy performance of the algorithm can be reflected. The algorithm runtime is shown in Figures 4 and 5. Figure 3: Histogram distribution.