This article is based on OpenCV Documentation with 2 additional features:
- Ability to get video source from argument
- Ability to capture video from webcam
I am using video file by ISE Lab, CVC Barcelona and MOG as the algorithm.
Source code:
Result:
Original frame sample:
BackgroundSubtractorMOG frame sample: