The Face Detection with OpenCV script is a Python application that utilizes the OpenCV library for real-time face detection through a computer's webcam. The script captures video from the default camera, converts frames to grayscale, and applies a Haar cascade classifier to identify faces. Detected faces are highlighted with rectangles in the live video stream. With adjustable parameters for detection, the script provides a simple and interactive way to explore basic face recognition techniques. This lightweight and easy-to-understand tool serves as a starting point for understanding computer vision concepts and experimenting with facial detection in real-time scenarios.
- Real-time face detection
- Adjustable parameters for face detection
- Simple and easy-to-understand Python script
- Python 3.7 or higher
- OpenCV 4.5.3 or compatible version
- A simple camera
-
Clone the repository:
git clone https://github.com/yourusername/face-detection.git cd face-detection
-
Install cv2:
pip install opencv-python
- Press the 'Esc' key to exit the program.
If you'd like to contribute to the project, feel free to open an issue, suggest enhancements, or submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Have fun experimenting with this program! Happy Coding!