Eliminating stray light in images using two-dimensional anisotropic Gaussian function fitting
Background Introduction
Stray light elimination is a crucial issue in optical imaging system research. Stray lights typically manifest as high-intensity specks with a spatial coverage much larger than the details of the effective target, significantly impacting image contrast, uniformity, and subsequent radiometric calibration and quantitative analysis. This paper employs a two-dimensional anisotropic Gaussian function to model stray light specks, achieving image stray light correction.
Theoretical Methods
Figure 1 shows the stray light phenomenon that occurs during panchromatic camera imaging. Its main characteristics are: a bright diffuse spot in the central region; a large coverage area, reaching thousands of pixels in scale, exhibiting obvious low-frequency distribution characteristics; and differences in the degree of diffusion in different directions. Given its spatial morphological characteristics, this paper uses a two-dimensional anisotropic Gaussian function to model the stray light diffuse spot.

Figure 1. Stray light image
The two-dimensional anisotropic Gaussian model can be represented as:

Where A represents the amplitude of the speckle, x0 and y0 are the center positions of the speckle, σx and σy represent its diffusion scale in the x and y directions, respectively, and B is the background bias term. For stray light distributions with more complex spatial morphology, multiple two-dimensional anisotropic Gaussian functions can be superimposed to describe the distribution, thereby improving the fitting accuracy of the actual speckle shape.
Experimental Results and Analysis
The experimental data used were panchromatic camera images acquired under laboratory conditions using an integrating sphere as a uniform light source. The original images contained a noticeable central speckle, leading to a decrease in overall image uniformity. Figure 2 shows the original stray light image and the stray light estimation results obtained based on two-dimensional anisotropic Gaussian fitting. The results indicate that the model can effectively characterize the overall spatial morphology and intensity distribution of the speckle.

Figure 2 Comparison before and after stray light elimination
After stray light removal, statistical analysis was performed on various image metrics (as shown in Table 1). The results show that after stray light correction, the background undulation of the image is significantly reduced, the overbrightness in the central region is effectively suppressed, and the overall uniformity is significantly improved. This indicates that the proposed method based on two-dimensional anisotropic Gaussian fitting can effectively eliminate large-scale, smooth stray light without relying on a deep learning model.

Table 1. Changes in various parameters before and after stray light elimination

