## 4 An Improved Focusing Window Selection Method
Then, we used the Tenengrad IEF to calculate the normalized value of all sub-blocks in the auto-focus process, as shown in Figure 3h, and we chose five ROI sub-blocks with the largest change in the \(\Delta\) value, as shown in black boxes in Figure 5.  
To verify the effectiveness of the improved dynamic focusing window, for each of the images in Figure 3, we calculated the normalized values of the Tenengrad IEF for three focus window algorithms: whole-image focus window, traditional center window, and dynamic focus window. Figure 6a-h gives a comparison of the calculated results from the three methods. Table 7 shows the average slope of the IEF values around the peak value (positive focus position) under different window selection methods in the eight scenes. The larger the average slope, the more significant the change in the IEF value, which is helpful to improve the accuracy of the auto-focusing. From Figure 6 and Table 6, the curves of the whole-image focus window agree with the traditional center window very well for all scenarios, while the ES-DAFW method has sharper peaks than the other two methods. Especially in Figure 6h and Table 1, for Scene h, the improved performance of the ES-DAFW comes to a significant level when dealing with relatively sparse images like Figure 3h. In Figure 6h, the curves of the ES-DAFW method are much sharper than those calculated by the whole-image focus window and traditional center window methods, indicating a great improvement of the sensitivity of the IEF on both sides of the peak and, thereby, a fast auto-focus speed. We believe that in a telescope system with sparse imaging substance, this ES-DAFW would achieve a more accurate and much faster auto-focus process. \begin{table}
\begin{tabular}{l l l l} \hline  & **WIF** & **TCFW** & **ES-DAFW** \\ \hline Scene a & 0.183 & 0.13 & 0.316 \\ Scene b & 0.071 & 0.075 & 0.161 \\ Scene c & 0.103 & 0.054 & 0.129 \\ Scene d & 0.093 & 0.05 & 0.174 \\ Scene e & 0.053 & 0.055 & 0.146 \\ Scene f & 0.120 & 0.035 & 0.155 \\ Scene g & 0.071 & 0.075 & 0.101 \\ Scene h & 0.018 & 0.012 & 0.047 \\ \hline \end{tabular}
\end{table} 
Table 7: The average slopes of the three window selection methods around the focus position in different scenes. Figure 5: Dynamic focus window for the scene in Figure 3h. In order to compare the efficiency of different window selection methods in the auto-focusing process of the telescope EOTS system, we used whole-image focus (WIF), traditional center focus windows (TCFW), and ES-DAFW to test the auto-focus of the system ten times on the eight scenes in Figure 3, and we recorded the average time required for the completion of the auto-focus process, as shown in Table 8. It can be seen that in the case of sparse scenes, as shown in Table 8, the traditional method takes longer to complete the auto-focus process. ES-DAFW can take less time to complete the auto-focus process in all scenes, including sparse scenes, because it only uses the blocks in the image whose IEF value changes greatly. This will significantly improve the auto-focus efficiency of the telescope EOTS system. Figure 6: Comparison of three auto-focusing window selection methods: WIF (whole-image focus), TCFW (traditional center window), and ES-DAWF (even sampling–dynamic adaptive focusing window selection).