## 2 Methodology
### Temporal Regional Contrast  
In infrared small target detection, the local contrast measure [16], inspired by the human visual mechanism, estimates target presence by analyzing the contrast between the target region and the background in the spatial domain. Building on this concept, we developed a temporal contrast measure to enhance and detect dim and small targets by utilizing contrast in the temporal domain. As shown in Figure 3, for an infrared image sequence at time \(t\), we select \(N\) preceding and \(N\) succeeding frames to construct the current sequence of interest:  
\[x(t)=\{x_{t-N},x_{t-N+1},\dots,x_{t},\dots,x_{t+N}\}, \tag{1}\]  
where \(x_{t}\) represents the \(t\)-th frame of the infrared image sequence \(x\). This study divides the temporal sequence into two regions: the Domain of Target (DT) and the Domain of Background (DB). A target's presence within the observed period is characterized by a distinct peak in the temporal profile, enabling its detection at the pixel level. In contrast, background edges or flashing pixels exhibit temporal continuity, resulting in consistent statistical measures between the DT and DB regions. However, for infrared small targets with varying brightness or position, the instantaneous nature of the DT disrupts this consistency, creating detectable statistical differences from the DB. Figure 3: (a) Temporal profile diagram. (b) TRC’s sequence of interest. Figure 2: The flowchart of the STFD detection process. Inspired by the contrast concept of the LCM, this study proposes a detection method based on temporal contrast:  
\[D(x)=\frac{\text{mean}\big{(}x^{DT}\big{)}}{\text{mean}(x^{DB})}\times\Big{(} \text{mean}\big{(}x^{DT}\big{)}-\text{mean}\big{(}x^{DB}\big{)}\Big{)}, \tag{2}\]  
where \(\text{mean}(x^{DT})\) and \(\text{mean}(x^{DB})\) denote the average values of the DT and DB, respectively. While the mean reflects grayscale characteristics, it is insufficient to capture complex differences between targets and backgrounds, particularly in cluttered environments where it may be skewed, leading to inaccuracies in temporal contrast computation. To address this, we incorporate the standard deviation as an additional metric to refine the calculation of temporal contrast:  
\[D(x)=\frac{\text{STD}(x^{DT})}{\text{STD}(x^{DB})}\times\frac{\text{mean}(x^ {DT})}{\text{mean}(x^{DB})}\times\Big{(}\text{mean}(x^{DT})-\text{mean}(x^{ DB})\Big{)}, \tag{3}\]  
where \(\text{STD}(x^{DT})\) and \(\text{STD}(x^{DB})\) represent the standard deviations of the target domain and the background domain, respectively. This extension incorporates the degree of grayscale dispersion, enhancing the expression of contrast. In practical imaging scenarios, multi-frame images often involve phase shifts, causing background clutter to exhibit impulse-like peaks in the temporal profile, which can result in false alarms. Additionally, when such clutter appears near the target's spatial neighborhood, the excessively large standard deviation and mean values in the background domain can lead to missed detections. To address the aforementioned issues, this study applies truncation to the statistical values of \(\text{STD}(x^{DB})\) and \(\text{mean}(x^{DB})\) in the background domain. Specifically, the truncation operation replaces pixel values exceeding a defined upper percentile threshold (e.g., the top 20% of values), with the maximum value within the retained range, while values below a defined lower percentile threshold (e.g., the bottom 20%) are adjusted to the minimum retained value. For example, in a 100 \(\times\) 100 image, pixel values at both extremes of a defined proportion range are adjusted to the corresponding percentile thresholds. By truncating excessively large or small background statistics, the method better characterizes the background changes in the target's temporal neighborhood. This approach is named Temporal Regional Contrast, abbreviated as TRC:  
\[