Skip to Content
AppliedMathAppliedMath
  • Article
  • Open Access

12 January 2026

19 Pages

Enhanced Moving Object Detection in Dynamic Video Environments Using a Truncated Mean and Stationary Wavelet Transform

,
and
Faculty of Sciences of Tunis, University of Tunis El Manar, Tunis 2033, Tunisia
*
Author to whom correspondence should be addressed.

Abstract

In this paper, we present a novel method for background estimation and updating in video sequences, utilizing an innovative approach that combines an intelligent truncated mean, the stationary wavelet transform (SWT), and advanced thresholding techniques. This method aims to significantly enhance the accuracy of moving object detection by mitigating the impact of outliers and adapting background estimation to dynamic scene conditions. The proposed approach begins with a robust initial background estimation, followed by moving object detection through frame subtraction and gamma correction. Segmentation is then performed using SWT, coupled with adaptive thresholding methods, including hard and soft thresholding. These techniques work in tandem to effectively reduce noise while preserving critical details. Finally, the background is selectively updated to integrate new information from static regions while excluding moving objects, ensuring a precise and robust detection system. Experimental evaluation on the CDnet 2014 and SBI 2015 datasets demonstrates that the proposed method improves the F1 score by 12.5 percentage points (from 0.7511 to 0.8765), reduces false positives by up to 65%, and achieves higher PSNR values compared to GMM_Zivk, SuBSENSE, and SC_SOBS. These results confirm the robustness of the hybrid approach based on truncated mean and SWT in dynamic and challenging environments.

1. Introduction

Moving object detection is a fundamental task in computer vision with applications in surveillance, autonomous navigation [1], and video analytics. Over the years, diverse methods have been proposed to address challenges such as illumination changes, dynamic backgrounds, and complex motion patterns. Among the most widely used approaches are optical flow, frame differencing, deep learning-based models [2,3], and background subtraction (BS) techniques [4].
Optical flow [5] estimates the apparent motion of objects by analyzing brightness variations between consecutive frames. Although effective in capturing detailed motion information, it remains highly sensitive to noise, illumination fluctuations, dynamic backgrounds (e.g., moving trees), and shadows, which significantly degrade its performance. Its computational complexity also limits its suitability for real-time applications [6].
Frame differencing detects motion by computing pixel-wise differences between successive frames. It adapts quickly to scene changes and offers fast processing without requiring explicit background modeling. However, it often struggles to clearly separate foreground from background when inter-frame variations are subtle. It may also produce incomplete object regions (“holes”) in situations where intensity changes are gradual or when objects move rapidly [7,8].
Deep learning-based algorithms, particularly those using convolutional neural networks (CNNs) and recurrent neural networks (RNNs), achieve strong robustness and accuracy by learning complex spatiotemporal patterns from large annotated datasets. Nevertheless, their high computational cost and dependency on extensive labeled data make them difficult to deploy in real-time or resource-constrained systems [9].
Background subtraction (BS) remains widely adopted due to its balance between precision, processing efficiency, and implementation simplicity. It typically consists of three stages: background initialization, foreground detection, and background updating. Compared to optical flow and deep learning techniques, BS requires fewer computational resources and is thus suitable for embedded platforms and devices with limited processing power [10,11]. However, classical BS approaches tend to degrade in dynamic environments or scenes involving shadows and abrupt illumination variations.
To overcome these limitations, we propose a hybrid method that combines an intelligent truncated mean with the stationary wavelet transform (SWT). The truncated mean suppresses outliers and short-lived disturbances, resulting in a more stable background estimate, while SWT provides non-decimated multi-scale decomposition that preserves spatial consistency and enhances fine motion details [12,13].
Although truncated estimators and wavelet-based segmentation have been individually explored in previous studies, their integration within a unified background subtraction framework remains largely unaddressed. The novelty of our work lies in merging these complementary techniques with a dual hard–soft adaptive thresholding mechanism and a selective background update strategy, as shown in the flowchart in Figure 1. This combination reduces noise, prevents foreground leakage, and enhances adaptation to rapid scene variations. The resulting hybrid architecture demonstrates increased resilience in scenarios involving shadows, dynamic backgrounds, and camera jitter.
Figure 1. Flowchart of the proposed algorithm.
The main contributions of this work can be summarized as follows:
−
An efficient background initialization strategy based on a truncated mean, which selectively removes high-intensity outliers while remaining sensitive to gradual illumination variations.
−
A novel SWT-based multi-scale segmentation pipeline, combining hard and soft thresholding to preserve fine motion details and remove noise, thereby improving the accuracy of object contours in dynamic scenes.
−
A selective background update mechanism that prevents foreground leakage and ensures stable adaptation to rapid scene variations.
−
A unified hybrid background subtraction framework integrating truncated mean estimation, gamma-corrected image differencing, SWT decomposition, and dual-threshold segmentation—a novel architecture in the literature.
This paper is structured as follows. Section 2 reviews the major contributions in background subtraction, wavelet-based analysis, and deep learning methods. Section 3 details the proposed hybrid method, including background initialization using the truncated mean, motion extraction via gamma-corrected frame subtraction, and SWT-based segmentation with adaptive thresholding. Section 4 presents experimental results and compares the performance of our approach with several state-of-the-art techniques across diverse video scenarios.

3. Methodology

For the purpose of justifying the rationale of the hybrid model, while the truncated mean adds robustness over time with regard to mitigating outlier fluctuations and rapid variations, SWT adds robustness in space with regard to translation invariance and multi-scale analysis. Together, these two techniques address robustness issues caused by temporal outliers in the frames and spatial noise in both background and foreground regions. The proposed scheme can now be divided into three main steps. To begin with, the truncated mean-based model for the background can reduce noise while preserving gradual variations caused by light source movement or other gradual effects. Second, motion can then be isolated using gamma correction and frame differencing to increase distinction between foreground and backgrounds corresponding to movement and non-motions, respectively. Lastly, SWT offers translation invariance with multi-scale analysis that separates true motion and suppresses noise using dual-hard/soft thresholding techniques.

3.1. Background Initialization

In video sequence processing, background initialization is a critical phase as it establishes the basis for reliable motion detection. A rigorous strategy is required for this step to ensure that the estimated background at the start of the sequence is stable and representative of the static scene. Our approach involves constructing the initial background using a truncated mean, which significantly reduces the impact of outliers such as moving objects in the early stages, sudden variations in illumination, or noise peaks.
At the beginning of the sequence, a set of N initial frames is collected to construct the preliminary background model. For each pixel location   ( x ,   y ) , the intensity values are extracted across the N reference frames and sorted in ascending order. To suppress outliers, the highest r % values are discarded, leaving N′ retained samples. Here, N′ (1 − r)  N denotes the number of samples remaining after truncation. The initial background model is then computed using the truncated mean.
b g M o d e l x , y = 1 N ′ ∑ i ϵ S f i x , y  
where   S denotes the set of retained samples after truncation. This ensures that the initial background estimation is not contaminated by early moving objects or abrupt fluctuations.
Once the preliminary background has been computed, the absolute difference between the current frame and the estimated background model is calculated.
d i f f x , y = c u r F r a m e x , y − b g M o d e l x , y
This difference highlights local variations that may correspond to motion or illumination changes, forming the basis for subsequent truncation and background update processes. Relying on a truncated mean strategy enables the proposed initialization method to provide a robust and reliable background estimate, ensuring stable performance throughout the remainder of the detection process.

3.2. Application of Truncation

To reduce the influence of temporal variations and suppress transient foreground pixels, a truncation operation is applied to the absolute difference matrix. Unlike the median, which selects the central value of a distribution, the truncated mean removes a controlled proportion of the highest pixel intensities before calculating the average. This makes it more robust to outliers than the classical mean, while remaining more sensitive to gradual illumination changes than the median, which can be overly rigid in dynamic scenes. The choice of the truncated mean, therefore, provides a balanced estimator that efficiently attenuates noise spikes, reflections, and short-lived moving objects while preserving relevant background information.
Operationally, the absolute difference values are sorted in ascending order to form s o r t e d V a l s . The truncation threshold is then calculated as
T h r e s h = s o r t e d V a l s n · r
where n is the total number of pixels and r = t r u n c R a t i o 100 represents the proportion of high-intensity values to be discarded. All difference values exceeding this threshold are set to zero according to the following:
d i f f d i f f > T h r e s h = 0
which effectively suppresses outliers before computing the truncated mean in the background update stage.

3.3. Background Update

Our background update strategy relies on a truncated mean, which offers a robust compromise between the classical mean and the median. Unlike the median, which completely discards distribution information and may become overly insensitive in dynamic environments, the truncated mean removes only a controlled proportion of extreme values before averaging. This makes it more resilient to transient foreground artifacts while maintaining higher adaptability to gradual illumination changes. After applying truncation, the background model is updated using a cumulative mean defined by
b g M o d e l ( x , y ) = c u r F r a m e ( x , y ) + ( i − 1 ) · b g M o d e l ( x , y ) i
where i denotes the index of the current initialization frame. This iterative formulation ensures a progressively refined background estimate, allowing the model to smoothly adapt to scene variations while preventing unstable or short-lived pixel fluctuations from influencing the final background model.

3.4. Detection of Moving Objects

3.4.1. Frame Subtraction

To detect motion, the first step consists of computing the pixel-wise absolute difference between the current frame and the previously estimated background model. This operation captures local variations caused by moving objects, illumination fluctuations, or noise. For each pixel location (x, y), the difference is defined as
D x , y = c u r F r a m e x , y − b g M o d e l x , y
where c u r F r a m e ( x , y ) denotes the intensity of the current frame and b g M o d e l ( x , y ) the corresponding background estimate. The resulting matrix D highlights temporal changes in the scene and serves as the basis for subsequent enhancement and segmentation steps.

3.4.2. Gamma Correction

To further enhance the contrast between foreground and background regions, a gamma correction is applied to the difference matrix. This operation adjusts pixel intensities nonlinearly, improving the separability of moving objects, especially under challenging lighting conditions. The corrected frame is computed as
A d j F r a m e ( x , y ) = D ( x , y ) γ
where D ( x , y ) is the difference value at pixel ( x , y ) , A d j F r a m e ( x , y ) the resulting gamma-adjusted value, and γ a contrast control parameter. Values γ > 1 amplify darker regions, whereas γ < 1 enhances brighter areas. This adaptive enhancement improves the visual distinction between motion and background, thereby increasing the robustness and accuracy of the subsequent segmentation process.

3.5. Stationary Wavelet Transform-Based Segmentation

Wavelet-based segmentation is a powerful technique in image processing that allows for noise suppression while preserving essential details. In our approach, we utilize the Stationary Wavelet Transform (SWT), an extension of the Discrete Wavelet Transform (DWT), which ensures scale invariance and precise temporal localization. Unlike DWT, which applies downsampling at each level, SWT uses stationary (non-decimated) filters, making it particularly suitable for analyzing non-stationary signals such as video frames and preserving spatial alignment between coefficients.
In our method, SWT is applied to the difference image after gamma correction, decomposing it into approximation coefficients c A and detail coefficients ( c H ,   c V ,   c D ) , corresponding respectively to horizontal, vertical, and diagonal variations. These detail coefficients capture fine spatial variations in the scene, allowing moving objects to be highlighted while minimizing noise effects in static regions.
To suppress noise while retaining essential features, the detail coefficients c D are subjected to adaptive thresholding. The threshold τ is defined as:
τ = μ + k × σ
where μ is the mean of the absolute values of c D , calculated as
μ = 1 n ∑ i = 1 n c D i
and σ is the standard deviation of the detail coefficients, defined as
σ = 1 n ∑ i = 1 n ( c D i − μ ) 2      
Here, n represents the total number of coefficients, and k is a multiplicative factor that adjusts the sensitivity of the threshold. After some initial exploratory testing, the parameters γ , α , and k were chosen to improve the separation of the foreground and background. In particular, k controls how aggressive the adaptive threshold τ is, and α controls the balance between strict noise suppression (hard thresholding) and detail preservation (soft thresholding). By employing this approach, SWT highlights significant variations in the scene, effectively detecting moving objects while minimizing noise artifacts. This ensures precise and reliable segmentation.
The choice of SWT is motivated by its ability to provide translation-invariant, multi-scale, and non-decimated feature representation, which is crucial for detecting subtle variations caused by slowly moving or partially occluded objects. Unlike classical spatial filtering or downsampled wavelet transforms, SWT preserves the spatial alignment of coefficients across scales, ensuring that foreground regions remain correctly localized even under dynamic illumination or background motion. This property makes SWT particularly suitable for video surveillance scenarios, where maintaining structural consistency across frames is essential for accurate foreground segmentation.
The thresholding process in our method is carried out in two complementary steps to reduce noise while preserving essential details of moving objects. First, hard thresholding is applied, where each detail coefficient
c D ( x , y ) is compared to the adaptive threshold τ . Coefficients with magnitudes smaller than τ are eliminated, while those above the threshold are kept unchanged. This operation is defined as:
c D h a r d ( x , y ) = c D ( x , y ) ,         i f   ∣ c D ( x , y ) ∣   ≥ τ 0   ,                     O t h e r w i s e  
where c D h a r d ( x , y ) denotes the hard thresholded detail coefficient at pixel position ( x , y ) .
Next, soft thresholding is applied to provide smoother shrinkage of the coefficients. Instead of removing all values below the threshold, soft thresholding gradually reduces their magnitude based on their distance from τ , defined by:
c D s o f t ( x , y ) = s i g n ( c D ( x , y ) ) · m a x   0 , | c D ( x , y ) | − τ
where c D s o f t x , y represents the soft thresholded coefficient at ( x , y ) .
To combine the advantages of both thresholding techniques, the final detail coefficients are obtained using a weighted combination:
c D c o m b ( x , y ) = α ⋅ c D h a r d ( x , y ) + 1 − α ⋅ c D s o f t   ( x , y )
where the final composite coefficient c D c o m b ( x , y ) is obtained by merging the hard and soft thresholded values, and α ∈ [ 0 , 1 ] is an adjustable parameter that controls the relative importance of the two approaches by balancing strict noise suppression (hard threshold) and detail preservation (soft threshold). This combined strategy removes unwanted noise components while retaining important edge and texture information necessary for accurate segmentation of moving objects. Finally, the modified coefficients are integrated with the c A approximation coefficients using the inverse stationary wavelet transform (ISWT) to reconstruct the segmented image.
s e g F r a m e = I S W T   ( c A , c H   c o m b   , c V c o m b   , c D c o m b   )
This process ensures effective noise suppression while preserving critical details, enabling precise and robust segmentation of moving objects.

3.6. SelectiveBackground Update

To detect moving objects, the segmented image s e g F r a m e is binarized to generate a mask b i n M a s k that identifies areas of movement and static regions. Each pixel is compared to the threshold τ to determine its classification, as defined by the following equation:
b i n M a s k x , y = 1 ,     i f   s e g F r a m e x , y ≥ τ 0 ,     O t h e r w i s e  
Once the mask is generated, the background is updated exclusively in regions classified as static b i n M a s k = 0 , ensuring that moving objects are not integrated into the background model. The selective update is defined as:
b g M o d e l N e w ( x , y ) = c u r F r a m e x , y   ,           i f     b i n M a s k   x , y = 0 b g M o d e l x , y   ,           O t h e r w i s e                                            
This selective update strategy maintains background stability by adapting only to static areas while preventing contamination by foreground objects, thus improving the robustness and consistency of the detection process.
In rare cases, the entire image may be classified as moving, meaning that no pixel satisfies the condition b i n M a s k x , y = 0 . When this occurs, the background model is not updated for that image to avoid foreground absorption. However, if this situation persists for M consecutive images, the background may stagnate. To address this, a cautious exponential update is applied.
b g M o d e l x , y = β . b g M o d e l x , y + 1 − β c u r F r a m e x , y
where β ≈ 0.95 ensures a slow and careful adaptation. This mechanism prevents moving objects from being integrated into the background model while allowing gradual adaptation in fully dynamic scenes.
The complete background estimation and updating procedure, combining an intelligent truncated mean with a stationary wavelet transform (SWT) and advanced thresholding techniques, is outlined in Algorithm 1.
Algorithm 1: A Novel Method for Video Moving Object Detection
▪
Step 1: Background Initialization
  • Reference Image Collection
    ▪
    Using the first N frames, each pixel ( x ,   y ) collects its intensity values. After sorting them, the highest r % outliers are removed, leaving N ′ samples. The initial background is then estimated using the truncated mean:
                                              b g M o d e l x , y = 1 N ′ ∑ i ϵ S f i x , y                                          
  • Absolute Difference Calculation
    ▪
    Compute the absolute difference:
    d i f f ( x , y ) = c u r F r a m e ( x , y ) − b g M o d e l ( x , y )
  • Truncation Operation
    ▪
    Sort pixel values in d i f f to obtain s o r t e d V a l s
    ▪
    Calculate the truncation threshold:
    T h r e s h = s o r t e d V a l s t r u n c R a t i o 100 · n u m P i x e l s                                          
    ▪
    Set pixel differences exceeding the threshold to zero:
    d i f f d i f f ( x , y ) > T h r e s h = 0
  • Initial Background Update
    ▪
    Update the background using a cumulative mean:
    b g M o d e l ( x , y ) = c u r F r a m e ( x , y ) + i − 1 · b g M o d e l ( x , y ) i
▪
Step 2: Moving Object Detection (Motion Extraction)
  • Background Subtraction
    ▪
    Compute the pixel-wise difference for each pixel i :
    D i ( x , y ) = c u r F r a m e ( x , y ) − b g M o d e l ( x , y )
  • Gamma Correction
    ▪
    Adjust pixel intensity to enhance contrast:
    A d j F r a m e ( x , y ) = d i f f γ ( x , y ) ,
    where γ controls contrast adjustment (e.g., γ > 1 enhances dark areas).
  • Segmentation using SWT
    ▪
    Apply SWT to decompose the difference image into c A ,   c H ,   c V   e t   c D
    ▪
    Calculate adaptive threshold:
    τ = μ + k × σ ,
    where μ is the mean and σ is the standard deviation of c D
    ▪
    Apply mixed thresholding:
    • Hard Thresholding:
      c D h a r d ( x , y , j ) = c D ( x , y , j ) ,         i f   ∣ c D ( x , y , j ) ∣ ≥ τ   0 ,                               o t h e r w i s e                                                                                        
    • Soft Thresholding:
      c D s o f ( x , y , j ) = s i g n ( c D ( x , y , j ) ) · m a x   0 , | c D ( x , y , j ) | − τ
    • Combination:
      c D c o m b = α ⋅ c D h a r d + 1 − α ⋅ c D s o f t  
  • Segmented Image Reconstruction
    s e g F r a m e =   I S W T   ( c A , c H   c o m b   , c V c o m b   , c D c o m b   )
▪
Step 3: Background Update (Selective Update)
  • Binarization
    ▪
    Binarize the segmented image:
    b i n M a s k x , y = 1 ,     i f   s e g F r a m e x , y ≥ τ 0 ,     O t h e r w i s e                                            
  • Selective Background Updat
    ▪
    Update the background model only for static regions
    b g M o d e l N e w ( x , y ) = c u r F r a m e ( x , y ) ,     i f           b i n M a s k ( x , y ) = 0             b g M o d e l ( x , y )                         ,           o t h e r w i s e                              
  • Frames with No Static Pixels
    ▪
    If no pixel satisfies b i n M a s k   x , y = 0 , for M consecutive frames:
    b g M o d e l x , y = β . b g M o d e l x , y + 1 − β c u r F r a m e x , y ,     β ≈ 0.95  

4. Experimental Results

This section presents the experimental results of our moving object detection method, which combines intelligent truncated mean (Truncated Mean) and stationary wavelet transform (SWT). The evaluation, conducted both quantitatively and qualitatively using sequences from CDnet [35] and SBI 2015 [36], encompasses various surveillance scenarios. To demonstrate the robustness and effectiveness of our approach, we compare it to several well-established detection methods, including DeepBS [37], BSUV-Net [38], SC_SOBS [39], SuBSENSE [21] and GMM_Zivk [16]. Experiments were carried out on diverse video sequences, covering urban scenes, outdoor, and indoor environments, enabling performance assessment in dynamic and complex contexts.

4.1. Quantitative Assessment

The quantitative evaluation relies on standard computer vision metrics to measure the accuracy and efficiency of object detection. We use the following indicators:
Recall ( R e ): Measures the model’s ability to detect moving objects. It is defined by the formula:
R e   = T P T P   +   F N
where:
  • TP (True Positives): Pixels of moving objects correctly detected.
  • FN (False Negatives): Pixels of moving objects not detected.
Precision ( P r ) : Indicates the proportion of correctly detected pixels relative to the total number of detections. It is expressed by:
P r   = T P T P   +   F P
  • FP (False Positives): Areas mistakenly classified as moving objects.
F-measure (F1-Score): Represents the balance between precision and recall, providing a comprehensive evaluation of detection performance. The formula is given by:
F 1 − S c o r e   =   2 x ( P r   x   R e ) ( P r   +   R e )
PSNR (Peak Signal-to-Noise Ratio): Used to evaluate the overall quality of detection by comparing the segmented image to the ground truth. It is defined by the following equation:
P S N R = 10 log 10 M A X 2 M S E
where:
  • MAX: Maximum possible pixel value (255 for an 8-bit grayscale image).
  • MSE (Mean Squared Error): Defined as:
M S E = 1 N ∑ i = 1 N I i − K i 2
With:
  • I i : Pixel value of the segmented image.
  • K i : Pixel value of the ground truth.
  • N : Total number of pixels.
The results of different methods are compared using these metrics to highlight the superiority of one approach in terms of accuracy and robustness against lighting variations, shadows, and dynamic backgrounds. The formulas provided allow for in-depth analysis of each method to ensure an objective and reproducible evaluation.

4.1.1. Impact of Truncation on Detection Performance

The performance comparison table (Table 1) demonstrates the effectiveness of the proposed truncated mean technique in improving moving object detection across various scenarios. Significant enhancements in precision, recall, and F1-score are observed, particularly in challenging environments such as bad weather, dynamic backgrounds, and shadowed areas. The application of truncation reduces false positive rates by up to 65%, highlighting its robustness in minimizing misclassifications. Notably, the F1-score improves from 0.7511 to 0.8765 on average, reflecting the method’s adaptability to real-world conditions. This approach excels in camera jitter scenarios and environments with fluctuating lighting, ensuring more reliable detection. The method effectively balances accuracy and computational efficiency, making it suitable for real-time surveillance and video analytics
Table 1. Performance Comparison of Object Detection with and without Truncated Mean Across Various Scenarios (Category).

4.1.2. Comparative Study

Table 2 highlights that the proposed approach achieves excellent results under normal conditions (Baseline) with an F1-Score of 93.92% and a low false positive rate (0.14%). In challenging scenarios such as Camera Jitter and Bad Weather, the method maintains high performance with a Recall above 83%. Shadow detection is effectively handled, achieving an F-measure of 91.34%, despite a slight increase in false alarms (0.41%). On average, the method records an overall Recall of 84.94% and a Precision of 83.86%, demonstrating its robustness. The approach is particularly efficient in dynamic environments, as reflected by a low misclassification rate (average PWC of 0.99%).
Table 2. Performance Metrics for Moving Object Detection Across Different Scenarios.
Table 3 shows that BSUV-Net stands out as the best-performing method with an average Recall of 85.83% and an F-measure of 82.35%, outperforming other approaches. The proposed method demonstrates competitive results with an F-measure of 83.25% and a lower PWC (0.99%) compared to SuBSENSE (1.24%). DeepBS offers high precision (85.63%) but suffers from lower Recall (79.44%), limiting its ability to detect all moving objects. GMM-Zivk exhibits the lowest overall performance (Recall of 69.15%), highlighting its limitations in complex scenes. The hybrid approach (SWT + truncated mean) achieves an optimal balance between precision and robustness, effectively reducing false alarms while maintaining high detection performance.
Table 3. Comparison of Overall Performance Metrics Across Different Object Detection Methods.
The findings in Table 1, Table 2 and Table 3 collectively illustrate the superiority of the proposed method over current methodologies. Table 1 shows that the truncated mean makes detection much better by lowering the number of false positives by as much as 65%. Table 2 shows that the hybrid approach works well even in difficult situations, with high recall and low misclassification rates. Table 3 shows even more clearly that our method strikes a better balance between precision, recall, and PWC than classical and deep-learning-based methods. The consistent improvements across many evaluation metrics show that our approach works better.
Table 4 compares the Peak Signal-to-Noise Ratio (PSNR) values of three different object detection methods, SC_SOBS, GMM_Zivk, and the Proposed approach—across three video sequences: Candela_m1.10, Hall & Monitor, and HumanBody2. The Proposed approach consistently achieves the highest PSNR values in two out of the three scenarios (Candela_m1.10 and Hall & Monitor), indicating better image quality and less noise in the detected object regions. Notably, for the Hall & Monitor sequence, the Proposed approach achieves a PSNR of 36.0123, outperforming both SC_SOBS (34.3943) and GMM_Zivk (33.1795). Although GMM_Zivk performs slightly better on the HumanBody2 sequence, the Proposed approach still demonstrates competitive performance, highlighting its robustness across various scenarios. These results suggest that the Proposed approach offers enhanced detection accuracy and noise reduction compared to traditional methods.
Table 4. PSNR Comparison of Object Detection Methods Across Different Video Sequences.
Figure 2 shows the PSNR performance over 100 frames for three video sequences: Candela_m1.10, Hall & Monitor, and HumanBody2. The Hall & Monitor sequence achieves the highest PSNR, indicating excellent reconstruction quality and minimal noise, suggesting that the proposed method performs well in stable environments. Candela_m1.10 follows closely with slightly lower PSNR values, reflecting good performance but highlighting minor challenges with dynamic backgrounds. In contrast, the HumanBody2 sequence consistently yields the lowest PSNR values, indicating that the method struggles with scenes involving significant human motion, leading to increased noise and reduced accuracy. This suggests that while the approach is effective in static and moderately dynamic environments, further enhancements are necessary to handle complex motion scenarios. PSNR is used as an additional measure of reconstruction quality rather than as the primary evaluation metric. The chosen sequences align with those frequently utilized in SC_SOBS and GMM_Zivk benchmarks, guaranteeing adherence to established evaluation protocols in the background subtraction literature.
Figure 2. PSNR Comparison for Different Video Sequences Over 100 Frames.

4.1.3. Real-Time Evaluation

In this section, we evaluate the real-time performance of several background subtraction techniques by comparing their average frame rates (FPS) across three different video resolutions: 320 × 240, 352 × 288 and 144 × 144. The video sequences are taken from the SBI 2015 and CDnet 2014 datasets [35,36], and each method is executed on a computer equipped with an Intel (R) Core (TM) i7-4700MQ processor running at 2.40 GHz, with implementations coded in C++. All videos were captured at 25 FPS, and the frames were converted to grayscale prior to analysis. Table 5 reports the average FPS achieved by each algorithm for the evaluated resolutions
Table 5. Evaluation of Average Processing Frame Rates (FPS) over Video Sequences from CDnet 2014 and SBI 2015 [35,36].
From the results, the GMM method exhibits the highest execution speed; however, it often fails to accurately and consistently detect moving objects in many challenging scenarios. In contrast, our proposed method achieves a higher frame processing efficiency than both ViBe and SuBSENSE. This improvement can be attributed to the fact that these approaches require additional time to build or adapt their background models before effective foreground extraction. Overall, the average processing speed achieved by the proposed truncated mean + SWT framework is sufficient to meet real-time detection requirements.

4.2. Qualitative Assessment

The Figure 3 compares several moving object detection methods on video sequences from the CDnet 2014 and SBI 2015 datasets [35,36], covering diverse scenarios (weather conditions, dynamic backgrounds, shadows, etc.).
Figure 3. Comparative Analysis of Moving Object Detection Methods Across Diverse Scenarios.
The proposed approach stands out for its accuracy, outperforming classical approaches like GMM_Zivk and SC_SOBS, which exhibit artifacts and false positives, especially in dynamic backgrounds and shadowed scenes. DeepBS and BSUV-Net also show strong performance, but the proposed approach demonstrates superior robustness in complex environments such as Camera Jitter and Bad Weather. Compared to other techniques, the proposed approach significantly reduces false positives and tracks intermittent objects more accurately while producing results that closely match the ground truth. This method emerges as an effective and reliable solution for moving object detection in challenging environments.

4.3. Limitations

Although the proposed method offers excellent overall performance, it does have some minor limitations. First, its effectiveness depends on parameters such as the truncation rate and wavelet thresholding, which may need to be adjusted for certain video sequences. Second, a slight degradation in performance may occur in highly dynamic scenes with rapid background changes or many interacting objects. Finally, although the method runs in near real time on standard hardware, further optimization would be necessary for deployment on very low-power embedded systems.

5. Conclusions

In this paper, we introduced a novel hybrid approach for moving object detection that combines truncated mean estimation, gamma-corrected frame differencing, and stationary wavelet transform (SWT)-based multi-scale segmentation. This unified framework effectively addresses key challenges in dynamic video environments, including illumination variations, shadows, intermittent motion, and background instability.
Experimental results obtained on the CDnet 2014 and SBI 2015 datasets [35,36] demonstrate the superior performance of the proposed method compared to traditional and modern background subtraction techniques. The hybrid truncated mean + SWT architecture improves the F1 score by 12.5%, reduces false positives by up to 65%, and achieves higher PSNR values in several scenarios. Qualitative analysis confirms its robustness in challenging environments, such as adverse weather conditions, dynamic backgrounds, shadows, and camera motion.
Furthermore, the execution speed of the proposed method is close to that of GMM, while offering superior detection accuracy compared to SuBSENSE, ViBe, and SC_SOBS. This indicates that the computational complexity is optimized, enabling real-time performance without compromising segmentation quality. Consequently, the method offers an excellent balance between efficiency and robustness, making it suitable for embedded and real-time video surveillance applications.
Although the proposed system exhibits strong overall performance, slight losses in accuracy may occur in highly dynamic or cluttered scenes, and parameter adjustments may be necessary for optimal results. Future work will focus on automatic parameter adjustment, hardware optimization, and extending the method to multi-object tracking in complex real-world scenarios.
Overall, this hybrid approach provides an efficient, accurate, and robust solution for moving object detection and represents a significant advancement in background subtraction for dynamic video environments.

Author Contributions

Conceptualization, O.B. and N.A.; Methodology, O.B. and M.B.; Software, O.B. and M.B.; Validation, O.B. and N.A.; Formal analysis, O.B. and M.B.; Investigation, O.B.; Data curation, O.B. and M.B.; Writing—original draft preparation, O.B.; Writing—review and editing, N.A. and M.B.; Visualization, O.B. and M.B.; Supervision, N.A.; Project administration, O.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The datasets presented in this article are not readily available because no permission for public data has been obtained. Requests to access the datasets should be directed to ATSSEE.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Lv, Z.; Poiesi, F.; Dong, Q.; Lloret, J.; Song, H. Deep learning for intelligent human–computer interaction. Appl. Sci. 2022, 12, 11457. [Google Scholar] [CrossRef] [Scilit]
  2. Rahmon, G.; Palaniappan, K.; Toubal, I.E.; Bunyak, F.; Rao, R.; Seetharaman, G. DeepFTSG: Multi-stream asymmetric USE-Net trellis encoders with shared decoder feature fusion architecture for video motion segmentation. Int. J. Comput. Vis. 2023, 132, 776–804. [Google Scholar] [CrossRef] [Scilit]
  3. Khlifi, A.; Othmani, M.; Kherallah, M. A novel approach to autonomous driving using double deep Q-network-based deep reinforcement learning. World Electr. Veh. J. 2025, 16, 138. [Google Scholar] [CrossRef] [Scilit]
  4. Boufares, O.; Boussif, M.; Saadaoui, W.; Miraoui, I. Moving object detection: A new method combining background subtraction, fuzzy entropy thresholding and differential evolution optimization. Acta Mech. Autom. 2025, 19, 106–116. [Google Scholar] [CrossRef] [Scilit]
  5. Ding, J.; Zhang, Z.; Yu, X.; Zhao, X.; Yan, Z. A Novel Moving Object Detection Algorithm Based on Robust Image Feature Threshold Segmentation with Improved Optical Flow Estimation. Appl. Sci. 2023, 13, 4854. [Google Scholar] [CrossRef] [Scilit]
  6. Denman, S.; Fookes, C.B.; Sridharan, S. Improved simultaneous computation of motion detection and optical flow for object tracking. In Proceedings of the Digital Image Computing: Techniques and Applications (DICTA), Melbourne, Australia, 1–3 December 2009; pp. 175–180. [Google Scholar]
  7. Collins, R.T.; Lipton, A.J.; Kanade, T.; Fujiyoshi, H.; Duggins, D.; Tsin, Y.; Tolliver, D.; Enomoto, N.; Hasegawa, O.; Burt, P.; et al. A system for video surveillance and monitoring. In VSAM Final Report; Technical Report CMU-RI-TR-00-12; Carnegie Mellon University: Pittsburgh, PA, USA, 2000. [Google Scholar]
  8. Zhan, C.; Duan, X.; Xu, S.; Song, Z.; Luo, M. An improved moving object detection algorithm based on frame difference and edge detection. In Proceedings of the 4th IEEE International Conference on Image and Graphics (ICIG), Chengdu, China, 22–24 August 2007; pp. 519–523. [Google Scholar]
  9. Long, J.; Shelhamer, E.; Darrell, T. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 3431–3440. [Google Scholar]
  10. Haritaoglu, D.; Nascimento, J.; Ribeiro, P. Comparison of target detection algorithms using adaptive background models. In Proceedings of the 2nd Joint IEEE International Workshop on Visual Surveillance and Performance Evaluation of Tracking and Surveillance (VS-PETS), Beijing, China, 10–15 October 2005; pp. 113–120. [Google Scholar]
  11. Park, D.; Byun, H. Object-wise multilayer background ordering for public area surveillance. In Proceedings of the IEEE International Conference on Advanced Video and Signal-Based Surveillance (AVSS), Genoa, Italy, 2–4 September 2009; pp. 484–489. [Google Scholar]
  12. Mallat, S. A theory for multiresolution signal decomposition: The wavelet representation. IEEE Trans. Pattern Anal. Mach. Intell. 1989, 11, 674–693. [Google Scholar] [CrossRef] [Scilit]
  13. Unser, M. Texture classification and segmentation using wavelet frames. IEEE Trans. Image Process. 1995, 4, 1549–1560. [Google Scholar] [CrossRef] [Scilit]
  14. Lee, Y.J.; Jung, H.G.; Suhr, J.K. BGI-YOLO: Background Image-Assisted Object Detection for Stationary Cameras. Electronics 2025, 14, 60. [Google Scholar] [CrossRef] [Scilit]
  15. Stauffer, C.; Grimson, W.E.L. Adaptive background mixture models for real-time tracking. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), Fort Collins, CO, USA, 23–25 June 1999; Volume 2, pp. 246–252. [Google Scholar]
  16. Zivkovic, Z. Improved adaptive Gaussian mixture model for background subtraction. In Proceedings of the 17th International Conference on Pattern Recognition (ICPR), Cambridge, UK, 23–26 August 2004; Volume 2, pp. 28–31. [Google Scholar]
  17. Rakesh, S.; Hegde, N.P.; Gopalachari, M.V.; Jayaram, D.; Madhu, B.; Hameed, M.A.; Vankdothu, R.; Kumar, L.S. Moving object detection using modified GMM-based background subtraction. Meas. Sens. 2023, 30, 100898. [Google Scholar] [CrossRef] [Scilit]
  18. Barnich, O.; Van Droogenbroeck, M. ViBe: A universal background subtraction algorithm for video sequences. IEEE Trans. Image Process. 2011, 20, 1709–1724. [Google Scholar] [CrossRef] [Scilit]
  19. Bou, X.; Ehret, T.; Facciolo, G.; Morel, J.-M.; Grompone von Gioi, R. Reviewing ViBe, a popular background subtraction algorithm for real-time applications. Image Process. Line 2022, 12, 527–549. [Google Scholar] [CrossRef] [Scilit]
  20. Houhou, I.; Zitouni, A.; Ruichek, Y.; Bekhouche, S.E.; Taleb-Ahmed, A. Improving ViBe-based background subtraction techniques using RGBD information. In Proceedings of the 2022 7th International Conference on Image and Signal Processing and Their Applications (ISPA), Mostaganem, Algeria, 8–9 May 2022; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  21. St-Charles, P.L.; Bilodeau, G.A.; Bergevin, R. SuBSENSE: A universal change detection method with local adaptive sensitivity. IEEE Trans. Image Process. 2015, 24, 359–373. [Google Scholar] [CrossRef] [Scilit]
  22. St-Charles, P.L.; Bilodeau, G.A.; Bergevin, R. A self-adjusting approach to change detection based on background word consensus. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV), Waikoloa, HI, USA, 6–9 January 2015; pp. 990–997. [Google Scholar]
  23. Zhang, J.; Zhang, X.; Zhang, Y.; Duan, Y.; Li, Y.; Pan, Z. Meta-knowledge learning and domain adaptation for unseen background subtraction. IEEE Trans. Image Process. 2021, 30, 9058–9068. [Google Scholar] [CrossRef] [Scilit]
  24. Boufares, O.; Aloui, N.; Cherif, A. Adaptive threshold for background subtraction using stationary wavelet transforms 2D. Int. J. Adv. Comput. Sci. Appl. 2016, 7, 312–319. [Google Scholar]
  25. Sengar, S.S.; Mukhopadhyay, S. Moving object detection using statistical background subtraction in wavelet compressed domain. Multimed. Tools Appl. 2020, 79, 5919–5940. [Google Scholar] [CrossRef] [Scilit]
  26. Nagarathinam, K.; Kathavarayan, R. Moving shadow detection based on stationary wavelet transform and Zernike moments. IET Comput. Vis. 2018, 12, 405–414. [Google Scholar] [CrossRef] [Scilit]
  27. Chen, L.C.; Papandreou, G.; Kokkinos, I.; Murphy, K.; Yuille, A.L. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs. IEEE Trans. Pattern Anal. Mach. Intell. 2018, 40, 834–848. [Google Scholar]
  28. Ullah, A.; Ahmad, J.; Muhammad, K.; Sajjad, M.; Baik, S.W. Action recognition in video sequences using deep bi-directional LSTM with CNN features. IEEE Access 2018, 6, 1155–1166. [Google Scholar] [CrossRef] [Scilit]
  29. Rahmon, G.; Bunyak, F.; Seetharaman, G.; Palaniappan, K. Motion U-Net: Multi-cue encoder–decoder network for motion segmentation. In Proceedings of the 2020 25th International Conference on Pattern Recognition (ICPR), Milan, Italy, 10–15 January 2021; pp. 8125–8132. [Google Scholar] [CrossRef] [Scilit]
  30. Zheng, W.; Wang, K.; Wang, F.Y. A novel background subtraction algorithm based on parallel vision and Bayesian GANs. Neurocomputing 2020, 397, 320–329. [Google Scholar] [CrossRef] [Scilit]
  31. Goyette, N.; Jodoin, P.M.; Porikli, F.; Konrad, J.; Ishwar, P. Changedetection.net: A new change detection benchmark dataset. In Proceedings of the IEEE Workshop on Change Detection (CDW-2012) at CVPR-2012, Providence, RI, USA, 16 June 2012; pp. 1–8. [Google Scholar]
  32. Wang, Y.; Luo, Z.; Jodoin, P.M. Interactive deep learning method for segmenting moving objects. Pattern Recognit. Lett. 2017, 96, 66–75. [Google Scholar] [CrossRef] [Scilit]
  33. Yang, Y.; Xia, T.; Li, D.; Zhang, Z.; Xie, G. A multi-scale feature fusion spatial–channel attention model for background subtraction. Multimed. Syst. 2023, 29, 3609–3623. [Google Scholar] [CrossRef] [Scilit]
  34. Yang, Y.; Li, D.; Li, X.; Zhang, Z.; Xie, G. A multi-scale inputs and labels model for background subtraction. Signal Image Video Process. 2023, 17, 4133–4141. [Google Scholar] [CrossRef] [Scilit]
  35. Bouwmans, T.; Javed, S.; Sultana, M.; Jung, S. Deep neural network concepts for background subtraction: A systematic review and comparative evaluation. arXiv 2018, arXiv:1811.05255. [Google Scholar] [CrossRef] [Scilit]
  36. Tezcan, M.O.; Ishwar, P.; Konrad, J. BSUV-Net 2.0: Spatio-temporal data augmentations for video-agnostic supervised background subtraction. IEEE Access 2021, 9, 53849–53860. [Google Scholar] [CrossRef] [Scilit]
  37. Maddalena, L.; Petrosino, A. The SOBS algorithm: What are the limits? In Proceedings of the IEEE Workshop on Change Detection (CDW) at CVPR, Providence, RI, USA, 16–21 June 2012; pp. 1–8. [Google Scholar]
  38. Wang, Y.; Jodoin, P.M.; Porikli, F.; Konrad, J.; Benezeth, Y.; Ishwar, P. CDnet 2014: An expanded change detection benchmark dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Columbus, OH, USA, 23–28 June 2014; pp. 387–394. [Google Scholar]
  39. Maddalena, L.; Petrosino, A. Towards benchmarking scene background initialization. In New Trends in Image Analysis and Processing—ICIAP 2015 Workshops; Murino, V., Puppo, E., Sona, D., Cristani, M., Sansone, C., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9281, pp. 469–476. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.