Dual-EMA Real-Time Perimeter Intrusion Detection Pipeline
Classical computer vision perimeter security pipeline utilizing dual-EMA background subtraction, contour tracking, and global lighting change suppression on live CCTV feeds.
01. Problem & Operational Context
Perimeter security CCTV feeds experience continuous false alarms triggered by sudden cloud cover, wind-blown foliage, shadows, and camera auto-exposure adjustments when using standard motion detection.
02. Technical Approach
Designed a resilient classical CV intrusion and unattended-object detection pipeline utilizing dual Exponential Moving Average (EMA) background models with diff-mask visualization and global illumination change suppression.
03. System Architecture & Pipeline
End-to-End System Pipeline & Computation Flow
Two-speed background modeling framework separating fast illumination fluctuations from slow physical scene modifications.
Stream Preprocessing & Grayscale Normalization
CCTV frame decimation, Gaussian smoothing, and local contrast normalization.
Dual-EMA Background Modeling
Simultaneous fast and slow background update rate modeling to distinguish moving intrusions from stationary objects.
Global Lighting Shift Suppression
Histogram variance analysis detecting whole-frame illumination shifts and suppressing false alarm triggers.
Contour Analysis & Intrusion Alerting
Connected component contour extraction, spatial perimeter boundary checking, and diff-mask generation.
04. Key Implementation Details
- Engineered a dual Exponential Moving Average background subtraction model maintaining dual temporal reference frames $(alpha_{ ext{fast}}, alpha_{ ext{slow}})$.
- Developed global illumination change detection to suppress false alarms during sudden sunlight/cloud transitions.
- Created diff-mask visualization pipeline for operator surveillance review on live CCTV channels.
- Constructed contour tracking logic calculating bounding boxes and persistence metrics for unattended objects.
05. Architectural Tradeoffs & Decisions
Runs with near-zero CPU/GPU utilization across dozens of parallel video streams simultaneously while maintaining deterministic response.
Heavy deep learning video segmentation models requiring dedicated high-end GPUs per stream.
06. Engineering Challenges & Failures
07. Evaluation & Observations
Benchmarked on operational CCTV perimeter security streams under varying weather, cloud cover, and night-vision modes.
Dual-EMA temporal separation accurately flagged unattended objects while ignoring transient environmental noise.
Mathematical flow of fast/slow exponential moving averages and global lighting suppression filter.