# Motion Detection Alert System with OpenCV and Telegram Bot API This Python script detects motion in a specified region of interest (ROI) from a webcam feed using OpenCV. When motion is detected, it captures a frame and sends an alert with a photo via the Telegram Bot API to a specified chat ID. This system is useful for security applications where immediate alerts are needed upon unauthorized motion detection.
- Motion Detection: Monitors a defined ROI for changes using background subtraction with OpenCV.
- Alert Notification: Sends a photo alert to a Telegram chat using the Telegram Bot API upon detecting motion.
- Adjustable Parameters: Allows customization of ROI coordinates, background subtraction method, minimum contour area, and alert interval.
- Real-time Feedback: Displays the video feed with overlaid ROI and detected contours for visual monitoring.
- Error Handling: Catches exceptions during photo capture and alert sending to ensure robust operation.
To get Chat ID visit @GetMyChatID_Bot Now you will copy the chat Id and config it.
To access the bot @SecurityAlertBot and START it.
git clone https://github.com/whitehatboy005/Motion-Detection-Alert-System-for-Webcam
cd Motion-Detection-Alert-System-for-Webcam
pip install -r requirements.txt
notepad config.env
Start it --> @SecurityAlertBot
python WEBCAM_Alert.py
Type [/check] Then check it out.
Check on this repository https://github.com/whitehatboy005/Motion-Detection-Alert-System-for-CCTV
This project is licensed under the terms of the MIT license.