## 4 Experiments and Discussion
### Real Image Experimental Results and Discussion
#### 4.2.1 Accuracy of Nonuniform Background Elimination  
To quantitatively compare the accuracy of the above four methods, we adopt residual analysis. In the residual image, since the majority of pixels are background pixels, the greater the mean, the higher the image's overall gray value, so the residual background of the first type of stray light is greater. The greater the standard deviation, the higher the degree of gray-value fluctuation, so that more of the second type of stray light background remains. In a word, the smaller the mean and standard deviation, the higher the accuracy of the correction algorithm.  
In the residual image, we applied an exclusion domain to remove the interference of targets before calculating the mean and standard deviation. Specifically, the threshold \(Th\) is obtained by adaptive threshold segmentation. We then establish the exclusion domain \(e_{B}\) as:  
\[e_{B}(i,j)=\begin{cases}0,&f_{B}(i,j)\geq Th\\ 1,&f_{B}(i,j)<Th\end{cases} \tag{16}\]  
where \(f_{B}\) refers to the processed surveillance image. Finally, we obtain the residual image \(R\) as shown in Equation (17):  
\[R(i,j)=f_{B}(i,j)e_{B}(i,j) \tag{17}\]  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Stray Light Background** & **THT** & **MIF** & **INTHT** & **IBSGM** \\ \hline First type & 8.4982 & 12.4052 & 5.0044 & 4.8320 \\ Second type & 4.7121 & 7.2477 & 3.1371 & 2.6711 \\ \hline \hline \end{tabular}
\end{table}
Table 1: RMSEs of the surveillance images by different algorithms.  
The results of the residual image means and standard deviations obtained by different algorithms are shown in Table 2.  
Figure 11: Nonuniform background elimination results. (**a–c**) Original real surveillance images; background elimination results of (**d–f**) THT; (**g–i**) MIF; (**j–i**) INTHT; and (**m–o**) IBSGM.  
In the THT method, all pixels (target and background regions) covered by the fixed structural operator participate in the calculation to eliminate the background, which leaves a great deal of nonuniform background noise in the residual image. Therefore, the accuracy of THT is relatively low. In the MIF method (five iterations), as in the THT method, the size of the filter is fixed and the pixels (including target and background) participate in the calculation, making it difficult to further improve the accuracy in complex environments even by increasing the number of iterations. The INTHT method, in contrast to the above two methods, uses structural operators with different domains to decrease the target regions involved in the calculation. However, it uses a fixed-size structural operator to distinguish target and background pixels, which does not work well for smaller-sized targets and does not consider the sensitivity of the structural operator. The IBSGM method defines two structural operators with a size that constantly self-adapts to the size of the target. The optimum structural operators are used to perform morphological operations in each image block. Thereby, the accuracy of nonuniform background elimination is greatly improved. We can see that IBSGM has substantially greater accuracy in eliminating stray light nonuniform backgrounds compared with the other methods.