This project implements a human face detection system using Python's OpenCV library. When a human face is detected by a live camera feed, the system sends a notification to a Telegram bot. It serves as an IoT-based project designed to demonstrate integration between image processing and real-time notifications.
- A computer with Python installed (for development and running the code)
- USB or built-in webcam
- Telegram bot account for sending notifications
- Create a new Telegram bot using BotFather.
- Save the bot token provided by BotFather.
- Obtain the
chat_id
using Telegram API by sending a message to the bot and retrieving updates.
- The Haar Cascade Classifier is used for detecting faces in a live video feed.
- Real-time detection is implemented using OpenCV's
cv2.CascadeClassifier
.
- A notification is sent to the Telegram bot when a face is detected.
- The system ensures a delay of 5 seconds before sending another notification.
The project integrates image processing and Telegram bot notifications into a unified system.
The project demonstrates the effective integration of real-time image processing and IoT notification systems. It highlights the potential of combining OpenCV and Telegram for practical applications.
- OpenCV
- Requests
- Install the required libraries:
pip install opencv-python requests
- Replace
YOUR_BOT_TOKEN
andYOUR_CHAT_ID
in the code with your Telegram bot details. - Run the
image_processing.py
script. - Ensure the webcam is connected and functioning.
- Monitor the Telegram bot for notifications.