# Gaslike Social Motility: Optimization Algorithm with Application in Image Thresholding Segmentation
## 4 GSM Algorithm Application to Threshold Segmentation
### Results and Discussion Related to the Segmentation Application  
Table 7 presents the optimal threshold values obtained for the tested levels: 2, 4, 8, and 16. As the number of levels increases, the threshold values often change significantly. Table 8 displays the fitness results for all images, providing insights into the algorithm's performance using measures of central tendency: Best Fitness, Mean, and Standard Deviation of the fitness values across experiments. Additionally, Table 7 includes the corresponding values for PSNR, MSE, SSIM, FSIM, UIQI, HPSI, QILV, and HAAR. The comparison was conducted using 35 independent runs for each image and four threshold levels (2, 4, 8, and 16). This resulted in seven metrics (mean values of 35 runs) per image across the nine test images. Higher values of PSNR, SSIM, FSIM, HPSI, QILV, and UIQI indicate better segmentation quality, while lower RMSE values signify improved performance. Tables 10-15 present the segmentation results and their corresponding histograms. Overall, the GSM algorithm demonstrates an exceptional balance between solution quality and computational efficiency, requiring only 50 particles and a maximum of 100 iterations. This performance is competitive compared to similar works [36; 37]. The synergy between GSM and MCET brings the method closer to real-time application, highlighting its practical potential. \begin{table}
\begin{tabular}{l l} \hline \hline
**Metric** & **Formulation** \\ \hline
1. Peak Signal to Noise Ratio (PSNR) & \(PSNR=20 log_{10}\left(\frac{255}{\text{RMSE}}\right)\) \\ Measures the similarity of structural information between the original image and the processed image. \\ \hline
2. Structural Similarity Index (SSIM) & \(SSIM=\frac{(2\mu_{k}\mu_{k}+C_{1})(2\sigma_{k,k}+C_{2})}{(\mu_{k}^{2}+\mu_{k}^ {2}+C_{1})(\sigma_{k}^{2}+\sigma_{k}^{2}+C_{1})}\) \\ Measures the similarity of structural information between the original image and the processed image. \\ \hline
3. Feature Similarity Index (FSIM) & \(FSIM=\frac{\sum_{X\in\mathcal{C}_{1}}S_{X}(\mathcal{C}_{1})C_{X}(X)}{\sum_{X \in\mathcal{C}_{1}}P_{\text{enc}}(X)}\) \\ Calculates the phase congruency and the gradient magnitude to characterize the local quality of the image. \\ \hline
4. Haar wavelet-based Perceptual Similarity Index (HPSI) & \(HPSI=l_{n}^{-1}\left(\frac{\sum_{x_{1}=-\mu_{k}^{*}H_{1/2}^{*}[x]}{\sum_{x_{1} =-\mu_{k}^{*}H_{1/2}^{*}[x]}}}{\sum_{x_{1}=-\mu_{k}^{*}H_{1/2}^{*}[x]}}\right) ^{2}\) \\ Appraises the perceptual similarity between a reference image and a distorted image. \\ \hline
5. Quality Index based on Local Variance (QILV) & \(QILV=\frac{2\mu_{k}\mu_{k}\mu_{k}}{\mu_{k}^{2}+\mu_{k}^{*}}\frac{2\mu_{k}\mu_{ k}\mu_{k}}{\mu_{k}^{2}+\mu_{k}^{*}}\frac{\mu_{k}\mu_{k}\mu_{k}}{\mu_{k}^{2}+\mu_{k}^ {*}}\) \\ Focuses on the image structure to appraise the changes on the non-stationarity behavior of images. \\ \hline
6. Universal Image Quality Index (UIQI) & \(UIQI=\frac{4\sigma_{k,n}\eta}{(\sigma_{k}^{2}+\sigma_{k}^{2})((\overline{x})^{ 2}+(\overline{y})^{*})}\) \\ Evaluates image distortion as a combination of correlation loss, luminance distortion, and contrast distortion. \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Quality metrics employed to assess the performance of GSM in a segmentation application. Figure 5: Set of images from the dataset [28].