# Grayscale Iterative Star Spot Extraction Algorithm Based on Image Entropy
## 7 Experiment and Analysis  
To further validate the target detection capability of the IEGI algorithm under stray light interference, a series of experiments were conducted outdoors, collecting multiple real-life images containing stray light conditions. The camera parameters are shown in Table 2. The real-life star images are shown in Figure 8. In Figure 8a, there is a large area of stray light in the lower left corner. In Figure 8b, there are large areas of stray light on the left and bottom sides. In Figure 8c, there is a large area of stray light at the bottom, and there are also large cloud layers blocking the star spots. These factors make the detection of star spot targets challenging. For the purpose of facilitating a comparison of extraction effectiveness, we analyzed the right ascension and declination of the three different operational conditions' lines of sight. Based on a star catalog, the actual star image corresponding to this orientation was obtained, as shown in Figure 9. In response to the captured real-life star images, we utilized the max-mean filtering algorithm, the max-median filtering algorithm, the Top-Hat algorithm, and the IEGI algorithm for star spot extraction, with the detection results presented in Table 5. For the three types of stray light conditions in Figure 8, the number of iterations of the IEGI algorithm was 8, 9, and 13, respectively. The corresponding grayscale value distribution of the detection results is shown in Table 6, and the comparison of the correct number of star spots, the number of false star spots, and the detection rate (\(DR\)) and error rate (\(ER\)) in their extraction results are presented in Figures 10 and 11, and Table 7, respectively. The calculation formulas for the detection rate and error rate are as follows:  
\[DR=\frac{N_{l}}{N_{sum}}\times 100\% \tag{16}\]  
\[ER=\frac{N_{E}}{N_{sum}}\times 100\% \tag{17}\]  
where \(N_{l}\) is the number of correctly detected star spots, \(N_{E}\) is the number of falsely detected star spots, and \(N_{sum}\) is the total number of actual star spots. Figure 8: Real star image captured with the camera. (**a**) stray light condition 1; (**b**) stray light condition 2; (**c**) stray light condition 3. Figure 9: Real star spot distribution corresponding to the captured star images. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **(a)** & **(b)** & **(c)** \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Star spot extraction results. distribution, which poses significant challenges for subsequent sky area identification and target recognition. From the last row of Table 5, it is evident that the IEGI algorithm extracts the highest number of correct star spots and the lowest number of false star spots through multiple grayscale iterations and star spot extraction based on image entropy. It effectively extracts the target star spots in regions with stray light distribution. From Table 6, it can be visually observed that the photographed star image contains extensive background stray light with higher grayscale values compared to the true star image. This has led to some genuine star spots being submerged and unable to be accurately separated from the background. In the star spot extraction results of the max-mean filtering algorithm and the max-median filtering algorithm, only a small number of pixels have grayscale values, indicating a low number of extracted star spots. This is consistent with the analysis results in Table 5. In the background stray light regions, the Top-Hat algorithm's extraction results show a large number of pixels with higher grayscale values compared to the ground truth, indicating the presence of false star spots. From the last row of Table 6, it can be observed that the IEGI algorithm exhibits the highest similarity with the grayscale histogram of the ground truth, effectively extracting the star spots in the target celestial region.