## 2 Principles of the Formation and Elimination of Stray Light Backgrounds
According to the radiative transfer theory, between two media surfaces, light energy propagates as follows [28]:  
\[\mathrm{d}\Phi_{\mathrm{C}}=\frac{L_{\mathrm{S}}\mathrm{d}\mathrm{A}_{\mathrm{S} }\mathrm{d}\mathrm{A}_{\mathrm{C}}\cos\theta_{\mathrm{C}}\cos\theta_{\mathrm{S} }}{R_{\mathrm{SC}}{}^{2}} \tag{1}\]  
where \(\mathrm{A}_{\mathrm{C}}\) and \(\mathrm{A}_{\mathrm{S}}\) are the areas of the receiving and the source surfaces, respectively, \(R_{\mathrm{SC}}\) refers to the center length between the source and receiving surfaces, \(L_{\mathrm{S}}\) is the radiance of the source surface, \(\Phi_{\mathrm{C}}\) represents the receiving surface flux, and \(\theta_{\mathrm{C}}\) and \(\theta_{S}\) are the angles between the center line and the normal line of the respective surfaces. Equation (1) can be simplified by breaking it into three parts, as follows [29]:  
\[\mathrm{d}\Phi_{\mathrm{C}}=\left(\frac{L_{\mathrm{S}}}{E_{S}}\right)(E_{S} \cdot\mathrm{d}\mathrm{A}_{\mathrm{S}})\bigg{(}\frac{\cos\theta_{\mathrm{S}} \cdot\cos\theta_{\mathrm{C}}\cdot\mathrm{d}\mathrm{A}_{\mathrm{C}}}{R_{ \mathrm{SC}}{}^{2}}\bigg{)} \tag{2}\]  
\[\mathrm{d}\Phi_{\mathrm{C}}=\mathrm{BRDF}\cdot\mathrm{d}\Phi_{\mathrm{S}}\cdot \mathrm{d}\Omega_{\mathrm{sc}} \tag{3}\]  
where \(E_{S}\) represents the incident irradiance, \(\mathrm{d}\Phi_{\mathrm{S}}\) is the output flux, and BRDF is the bidirectional reflectance distribution function, which refers to the scattering properties of the material surface and defines the ratio of the scattering radiance to the incident irradiance of a rough surface, and \(\mathrm{d}\Omega_{\mathrm{SC}}\) represents the projected solid angle between the source and receiving surfaces. In terms of the differential form of Equations (2) and (3), we are roughly aware that the distribution of a nonuniform background affected by stray light exhibits a gradual form rather than an abrupt change. In general, for space-based wide-field surveillance systems, the influence of stray light can be suppressed by optomechanical structures such as the hood and light-blocking ring [30]. However, the absorption rates of baffles and blades are always between 95% and 97%. At this time, the rest of the stray light will still be received by the detector, resulting in a nonuniform background. We still need to eliminate the background through image processing. The surveillance image is described in the following way:  
\[F(i,j)=T(i,j)+S(i,j)+B(i,j)+N(i,j) \tag{4}\]  
where \((i,j)\) denotes the pixel coordinates, \(F\) is an original surveillance image, \(T\) refers to the space target, \(S\) is the star, the light from stars is the cause of the second type of stray light background, and \(B\) represents the background and \(N\) refers to the noise. The fundamental principle of nonuniform background elimination is to estimate \(B\) accurately and robustly while preserving \(S\) and \(T\). Based on the above analysis, an original surveillance image \(F\) has the following two features: (1) Most of the pixels in \(F\) are occupied by background-region pixels, whose gray values are different from those of target-region pixels, and (2) the nonuniform background caused by stray light exhibits a gradual rather than an abrupt change. Based on the first feature of the original surveillance image, we define two structural operators to take advantage of this difference. Based on the second feature, a morphology-based method can be used to eliminate the nonuniform background, since it features a slow change.