## 2 Background and Basic Principle
### Analysis of Background Characteristics in Complex Scenes  
Interference elements from various scenes reduce the visibility of targets and increase the difficulty of detecting weak and small targets. The main challenges associated with scenes arise from their irregularity, dynamics, and potential visual similarity to the objects of interest. Given an optical image \(I\) of size \(M\times N\), the variance of its grayscale values measures the severity of changes in the grayscale distribution. This variance is defined as follows:  
\[\sigma^{2}=\frac{1}{M\times N}\sum_{i=1}^{M}\sum_{j=1}^{N}|I(i,j)-\mu|^{2} \tag{4}\]  
The smoothness (R) of an image measures the smoothness and coherence of the image background. A higher value of R indicates a smoother image. The smoothness is defined as follows:  
\[\mathrm{R}=1-\frac{1}{1+\sigma^{2}} \tag{5}\]  
Entropy can effectively measure the average information content in an image. A larger entropy value indicates a more complex image, which is more likely to contain complex background components. In contrast, a smaller value suggests a more uniform background. Assuming the given image has a total of \(N_{g}\) gray levels, and the probability of the gray level value \(x\) appearing is \(p_{x}\), the image entropy is defined as follows:  
\[\mathrm{E}=-\sum_{x=0}^{N_{g}-1}p_{x}\log p_{x} \tag{6}\]  
Additionally, an image consistency metric can be computed to measure the smoothness of the image. A lower consistency value indicates greater complexity and irregularity in the image. The consistency is defined as follows:  
\[\mathrm{U}=\sum_{x=0}^{N-1}(p_{x})^{2} \tag{7}\]  
The rank of an image can represent the richness of information, redundancy, and noise present in the image. To quantitatively perceive the complexity of an image from a global perspective, we introduce a method based on the rank-deficiency ratio of the image matrix. For image data \(I\) of dimensions \(M\times N\), the Rank-Deficiency Rate (RDR) is defined as follows:  
\[\mathrm{RDR}=\frac{\#(Q>\mathit{ltro})}{\min(M,N)} \tag{8}\]  
Here, \(Q\) represents the singular values of matrix \(I\) and \(\mathit{ltro}\) denotes the tolerance value for determining the rank of the matrix. \(\#(Q>\mathit{ltro})\) represents the count of singular values in matrix \(I\) that are greater than \(\mathrm{thro}\). The RDR quantifies the complexity of the image on a global scale. However, the inherent difficulties in searching for or extracting objects  
Figure 1: Example diagram of image spot of weak and small moving target. of interest from the image background are influenced by many local factors [15]. Local edges, contours, and other texture information in images significantly affect target-detection results. Therefore, it is necessary to consider multiple descriptive factors when qualitatively and quantitatively analyzing image complexity [16]. Utilizing research on image complexity analysis, the Gray-Level Co-occurrence Matrix (GLCM) can provide texture features and multi-dimensional parameters that describe scene complexity. However, these feature parameters may overlap and be redundant. In this study, four easily calculable and less correlated texture parameters--energy, contrast, Inverse Difference Moment (IDM), and correlation--are selected to assess the complexity of local scenes. Considering an \(M\times N\) scene \(I\) with \(N_{g}\) gray levels, let \((i_{1},j_{1})\) and \((i_{2},j_{2})\) be two pixels in scene \(I\), where they are located at a distance \(d\) along direction \(\theta\). The GLCM of the scene is calculated as follows:  
\[P(x,y,d,\theta)=\#\{(i_{1},j_{1}),(i_{2},j_{2})\in M\times N|I(i_{1},j_{1})=x,I(i_{2},j_{2})=y\} \tag{9}\]  
The Angular Second Moment (ASM) is used to describe the uniformity of the background distribution. A lower ASM value indicates that the elements are concentrated near the diagonal of the GLCM, suggesting a more uniform gray-level distribution and finer texture.