Detecting blink of eyes using haar cascade.
Haar feature-based cascade classifiers is an effective object detection method proposed by Paul Viola and Michael Jones in their paper, “Rapid Object Detection using a Boosted Cascade of Simple Features” in 2001. It is a machine learning-based approach where a cascade function is trained from a lot of positive and negative image.Using this cascade, I have created a eye blink detector.
- The algorithm first detects the face using the haar cascade.
- Using this face as input,the eye detection cascade detects the eyes.
- If eyes are open,after pressing "s" the detector starts its process to detect blinking of eyes.
- If the eyes are blink,it prints "Blink detected" in the console.
- Python 3.9
- Libraries used-OpenCv,Numpy
- Haar Cascade for face and eyes
Make sure following libraries are installed before execution
- openCV
pip install opencv-python
- numpy
pip install numpy