This project uses OpenCV to detect motion levels in real-time through a webcam. The program categorizes the motion into three levels and displays the current level on the video feed.
Β»OpenCV to capture the video
- Video Capture: Captures video from the webcam.
- Background Subtraction: Uses
cv2.createBackgroundSubtractorMOG2to detect moving objects. - Motion Detection: Calculates the sum of detected pixels to determine the level of motion:
- Stable: No significant motion detected.
- 1st level motion detected!: Low level of motion.
- 2nd level motion detected!: Medium level of motion.
- 3rd level motion detected!: High level of motion.
