Skip to content

Real-time face and eye detection with optional sunglasses overlay using OpenCV.

License

Notifications You must be signed in to change notification settings

ssloth1/face-and-eye-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Face & Eye Detection with Sunglasses Overlay

This project provides a real-time face and eye detection application using OpenCV. It includes an optional feature to overlay sunglasses on detected faces, adding a fun twist to the traditional face detection.

Features

  • Real-time face detection using Haar cascades.
  • Eye detection within detected faces.
  • Optional sunglasses overlay on detected faces.
  • Trackbar to enable or disable the sunglasses overlay.

Prerequisites

Ensure you have the following installed:

  • Python 3.12
  • OpenCV
  • NumPy

Code Structure

  • face_eye_detection.py: The main script containing the FaceDetector class and the main function to run the application.
  • dealwithit.png: The sunglasses image used for the overlay.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Special thanks to the OpenCV community for providing the Haar cascades for face and eye detection.

About

Real-time face and eye detection with optional sunglasses overlay using OpenCV.

Topics

Resources

License

Stars

Watchers

Forks

Languages