Skip to content

This code uses OpenCV to detect faces and eyes in real-time video captured from the default camera, applying Haar cascade for detection and drawing rectangles around the detected features.

License

Notifications You must be signed in to change notification settings

jahnavirishikesh/real-time-face-and-eye-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Real-time Face and Eye Detection

This repository contains a Python script that uses OpenCV to perform real-time face and eye detection in video captured from the default camera. It applies Haar cascades for face and eye detection, drawing rectangles around the detected features.

Prerequisites

Before running the script, make sure you have the following dependencies installed:

  • Python 3.x
  • OpenCV
  • haarcascade_frontalface_default.xml (Haar cascade file for face detection)
  • haarcascade_eye.xml (Haar cascade file for eye detection)

Usage

  1. Clone the repository:
git clone https://github.com/your-username/real-time-face-and-eye-detection.git
  1. Navigate to the project directory:
cd real-time-face-and-eye-detection
  1. Run the script:
python face_eye_detect.py
  1. The script will open a window displaying the real-time video feed from the default camera. It will draw rectangles around the detected faces and eyes. To exit, press the letter 'q'

References

About

This code uses OpenCV to detect faces and eyes in real-time video captured from the default camera, applying Haar cascade for detection and drawing rectangles around the detected features.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages