## 3 Methodology
### Sliding Window-Based Reconstruction Strategy  
To effectively mitigate the interference of dynamic objects on static background reconstruction, we propose a sliding-window-based dynamic background restoration strategy. In dynamic scenes, object motion often generates artifacts which disrupt accurate background reconstruction, particularly under motion blur. Artifacts such as incorrect depth or color information in regions affected by moving objects can severely impact the quality of static scene reconstruction. To address this, we aggregate consecutive frame data into sliding windows, with each window containing \(w\) frames. This sliding window mechanism allows for more robust identification and removal of artifacts caused by dynamic objects by leveraging the temporal and spatial relationships across frames. The use of multiframe data not only enhances the accuracy of static background restoration but also improves the continuity of the reconstruction by minimizing the impact of transient dynamic objects that might otherwise cause disruptions. In our approach, we begin by performing intraframe consistency checks within each frame of the sliding window. Specifically, we calculate the depth and color differences between adjacent pixels in each frame. If the depth or color variations within a specific region exceed preset thresholds, then this region is marked as a dynamic candidate. These thresholds (\(\tau_{d}\) for depth and \(\tau_{c}\) for color) are critical for distinguishing between static and dynamic elements in the scene. These dynamic candidate regions are then subjected to further verification to determine whether they are indeed caused by dynamic objects. After potential dynamic regions have been identified, we track their changes over multiple frames within the sliding window. This tracking is essential for distinguishing between transient changes such as those caused by dynamic objects and permanent scene elements caused by static objects. We examine changes in the position, shape, and appearance of these regions over consecutive frames, which can provide a more accurate classification of their dynamic nature. For regions confirmed to be dynamic, we apply a spatiotemporal consistency-based background restoration algorithm. This algorithm reconstructs the background occluded by dynamic objects by aggregating static information from corresponding positions in other frames within the sliding window. The weighted averaging process considers both the temporal distance (time difference) and spatial distance (distance in pixel space), with the following weight function:  
\[w(p,t)=\exp(-\alpha|t-t_{c}|)\cdot\exp(-\beta|p-p_{c}|) \tag{10}\]where \(t_{c}\) is the current frame time, \(p_{c}\) is the position of the point to be restored, and \(\alpha\) and \(\beta\) are temporal and spatial decay factors, respectively. These weights ensure that more recent and closer frames contribute more significantly to the reconstruction, making the restoration process more accurate and coherent. By aggregating data from multiple frames, this algorithm can accurately reconstruct background regions occluded by dynamic objects, allowing for enhanced scene fidelity and continuity. To ensure smooth transitions between adjacent sliding windows, we adopt a 50% overlap strategy. This strategy mitigates the potential for visible seams or discontinuities between windows by blending the overlapping regions. The linear weight fusion used in this process is described by the following formula:  
\[I_{final}=w_{1}I_{window1}+w_{2}I_{window2} \tag{11}\]  
where \(w_{1}\) and \(w_{2}\) are position-related linear weights satisfying \(w_{1}+w_{2}=1\). This overlapping and fusion strategy is vital for maintaining continuity in the reconstructed scene, which ensures that the transitions between consecutive windows are seamless and visually coherent. The overlap also helps to reduce the risk of missing or misrepresenting static regions that may occur at the boundary of sliding windows.