Abstract
Robust foreground detection in dynamic environments remains a significant challenge in computer vision. This paper proposes a background modeling technique that integrates optical flow velocity fields to distinguish between background motion, such as swaying trees, and actual objects of interest. By analyzing the distribution of pixel velocities and employing a dual-queue update strategy, the proposed method achieves high detection accuracy and robustness to illumination changes and stationary objects. Experimental results on the Vssn06 dataset show a True Positive rate of 94.50% in complex scenes, significantly outperforming traditional Gaussian Mixture Models.
Introduction
Accurate foreground detection is a fundamental task in video surveillance. While background subtraction is widely used, its performance degrades in complex real-world scenarios. Swaying trees, flickering lights, and objects that stop moving (creating "ghosts") are persistent challenges for pixel-intensity-based models. This research proposes leveraging motion vectors—specifically optical flow—to create a more resilient background model that treats motion as a signature of the background itself.
Methodology
The proposed system moves beyond simple color or intensity modeling by incorporating an Optical Flow Velocity Field Background Model.
1. Optical Flow Estimation
The system utilizes a gradient-based method, derived from the Horn-Schunck algorithm, to calculate horizontal ($u$) and vertical ($v$) velocity components for each pixel.
2. Feature Extraction and Modeling
For every pixel, the model tracks intensity along with spatial and temporal information. A distribution of velocities ($u, v$) and their magnitude ($w$) is maintained over a window of $N$ frames. The background is defined by the range of observed velocities ($u_{min}, u_{max}$, etc.) and the inter-frame velocity differences.
3. Dual-Queue Update Strategy
To address the "ghosting" effect caused by stationary foreground objects, the model employs a dual-queue update mechanism. One queue monitors the frequency of foreground flags, while the other tracks velocity statistics. This allows the system to intelligently integrate stationary objects into the background model over time without immediate detection errors.
Experimental Evaluation
The method was evaluated using the Vssn06 dataset, focusing on three specific challenges:
- Dynamic Backgrounds (Video4): Scenes with heavy swaying of trees.
- Illumination Changes (Video8): Sudden shifts in lighting conditions.
- Stationary Objects (Tunnelvideo): Vehicles stopping in a tunnel.
Results and Discussion
The proposed method demonstrated superior performance over standard Mean Shift and Gaussian Mixture Models (GMM).
- Accuracy in Dynamic Scenes: In the swaying tree scenario, the proposed method achieved a True Positive (TP) rate of 94.50% and a False Positive (FP) rate of 1.25%. In contrast, GMM produced significantly noisier results with a higher FP rate.
- Robustness to Illumination: The velocity-based model maintained an error rate of 4.12% during sudden lighting changes, whereas traditional models often failed completely (100% error) until re-learning the scene.
- Stationary Object Handling: In tunnel tests, parked cars were correctly identified as background with only a 3.65% error rate, outperforming competing algorithms which averaged 10-13% error.
Conclusion
By treating motion as a consistent background property rather than a foreground indicator, the optical flow velocity field model provides a robust solution for complex surveillance environments. While computationally more intensive than simple subtraction, the method offers significant gains in detection accuracy and resilience to environmental noise. Future work will focus on optimizing computational efficiency and handling cases where foreground and background motion fields overlap.
Summary updated