# Grayscale Iterative Star Spot Extraction Algorithm Based on Image Entropy
## 6 Numerical Simulation and Analysis
As can be seen from Table 3, for uniformly distributed stray light, the max-mean filter algorithm effectively extracts the star spots from the star images without any false star spots. However, for linearly distributed stray light and Gaussian-distributed stray light, the max-mean filter algorithm results in a significant number of missing star spots in the areas with higher grayscale values on the left side, and there are a few false star spots. For all three types of stray light, the max-median filter algorithm results in the extraction of star spots with a significant number of missing star spots and a considerable number of false star spots. For the uniformly distributed stray light star images, the Top-Hat algorithm effectively extracts the star spots. However, for the linearly distributed and Gaussian distributed stray light star images, the Top-Hat algorithm results in missing star spots in the areas with higher grayscale values on the left side. Additionally, there are a few false star spots present in the extraction results for all three types of stray light. As shown in the fifth row of Table 3, for the three types of simulated star images with stray light in Figure 5, the IEGI algorithm successfully extracts most of the star spots from the original star images without any false star spots. From Table 3, it can be qualitatively observed that, compared to the other three small target detection algorithms, the IEGI algorithm has the greatest number of green circles and the fewest red squares in its extraction results. This indicates that it has the highest number of correctly extracted star spots and the lowest number of false star spots. From Figure 6, it can be quantitatively observed that the IEGI algorithm achieves the highest number of correctly extracted star spots for three types of stray light simulated star images, with values of 132, 130, and 131, respectively, which are closest to the actual number of star spots. For uniformly distributed stray light, the max-mean filtering algorithm and the Top-Hat algorithm show star spot detection results that are close to the IEGI algorithm. However, for star images with the linear distribution and Gaussian distribution of stray light, these two algorithms yield a smaller number of correctly extracted star spots, resulting in the omission of many star spots. For the three types of star images with different types of stray light, the max-median filtering algorithm has the lowest number of correctly extracted star spots. From Figure 7, it can be observed that for the three types of simulated star images with different types of stray light, the IEGI algorithm shows no false star spots in the extraction results, while the other three detection algorithms have a significant number of false star spots. From Table 4, we observe that the IEGI algorithm requires implementing multiple iterations before obtaining a satisfactory solution, and the reconstruction time is the longest \begin{table}
\begin{tabular}{c c c c c} \hline  & **Max–Mean** & **Max–Median** & **Top-Hat** & **IEGI** \\ \hline Uniformly distributed stray light & 0.12 & 0.18 & 0.23 & 0.69 \\ Linearly distributed stray light & 0.19 & 0.17 & 0.24 & 1.04 \\ Gaussian-distributed stray light & 0.18 & 0.18 & 0.26 & 0.98 \\ \hline \end{tabular}
\end{table} 
Table 4: Running time(s). among the competing algorithms. In the future, the proposed star point extraction algorithm should be further studied to improve the computing efficiency. In conclusion, from the perspective of removing stray light backgrounds and accurately extracting star spots, the IEGI algorithm proposed in this paper demonstrates the effective removal of stray light backgrounds with three different distribution models, yielding consistent extraction results. The algorithm is capable of accurately extracting star spots with maximum grayscale values greater than the maximum grayscale values of the stray light. The IEGI algorithm outperforms the other three traditional detection algorithms.