## 2 Methodology
### Gradient-Enhanced Local Contrast Measure  
Spatial information complements temporal information to improve target detection. However, the spatial texture of infrared small targets is often blurred and challenging to utilize directly. To address this, this study proposes the Gradient-Enhanced Local Contrast Measure (GELCM), which leverages local directional contrast and gradient characteristics. The GELCM captures grayscale differences between the target and background while considering directional trends in grayscale variation. As observed in Figure 5, most gradients in the vicinity of the small and weak target point toward the target region, with relatively high gradient magnitudes near the target. In contrast, edges and other clutter in the image lack this characteristic, a pattern commonly  
Figure 4: Comparison test of TRC and RIA in a simple background dim target scenario. As demonstrated in the figure under clean background conditions with low\(-\)contrast targets, the RIA method demonstrates superior detection capability over TRC across all evaluation metrics, including ROC curves, Background Suppression Factor (BSF), and Signal-to-Clutter Ratio Gain (SCRG). observed in infrared imagery [40, 41]. This suggests that a higher number of gradients converging toward the center increases the likelihood of the region containing a small and weak target. Additionally, gradient magnitudes near the target are typically more pronounced. Directly computing the direction and magnitude of gradient vectors in the image neighborhood is complex, prone to interference, and ineffective for slightly larger targets. To address these challenges, this study employs multi-directional contrast to characterize gradient distributions in specific directions, offering a more robust representation. This study calculates multi-directional contrast for each pixel using the mean differences within sliding window image patches. As illustrated in Figure 5, each sliding patch window is divided into nine \(l\times l\) cells. The central cell, denoted as \(T\), serves as the focal area where a candidate target is likely to appear at its center. The surrounding cells, labeled \(B_{1}\) to \(B_{8}\), represent the background regions. This study defines the difference between the central cell and the corresponding surrounding background cell in a specific direction as follows:  
\[G_{i}= \begin{cases}m_{T}-m_{B_{i}},&\text{if }m_{T}-m_{B_{i}}>0,\\ 0,&\text{otherwise}.\end{cases}  \tag{6}\]  
Here, \(m_{T}\) and \(m_{B_{i}}\) represent the grayscale mean values of the central region and the \(i\)-th corresponding background region in Figure 5, respectively. Negative values of \(G_{i}\) are set to zero. To further characterize the property that gradient magnitudes near the target are relatively large, this study comprehensively considers the multi-directional contrast magnitudes across all directions:  
\[\text{Gmap}(T)=\sum_{i=1}^{8}G_{i}^{2}, \tag{7}\]  
Building on this, the study considers gradient directionality as a key criterion for determining target presence. Based on the previous analysis, a higher number of gradients in the vicinity of a candidate region converging toward that region increases the likelihood of it containing a target. Correspondingly, in the calculation of multi-directional contrast, the greater the number of \(G_{i}\) values larger than 0 there are, the higher is the likelihood of  
Figure 5: Gradient image and multi–directional contrast diagram. the central region containing a target. Based on the above analysis, this study proposes the GELCM:  
\[\text{GELCM}(T)=\text{Gmap}(T)\cdot\beta^{\sum_{-1}^{6}H(G_{i})}, \tag{8}\]  
\[H(G)= \begin{cases}1,&\text{if }G>0,\\ 0,&\text{otherwise}.\end{cases}  \tag{9}\]  
Here, \(H(G)\) is a binarized mask of positive gradients based on the gradient directions \(G_{1}\) to \(G_{8}\). By counting the number of local gradient directions pointing toward the target, this mask enhances the saliency of the target region.