Skip to main content

Skills demonstration

Instruction and application
In Progress

Eye detection with OpenCV demo​

Building on face detection — expanding from face detection to detecting eyes.Why this matters:

✨

Gaze tracking

for accessibility tools and AR/VR applications.

✨

Emotion analysis

for sentiment detection.

✨

Biometric authentication

in security systems.

Demo steps​

Load Haar Cascades​

Load the Haar Cascade classifiers for detecting faces and eyes.

Preprocess image​

Use a new SAMPLE_IMAGE_EYE to load a higher resolution image and convert it to greyscale.

Detect faces​

Use the face Haar Cascade to detect faces in the image and draw bounding boxes around them.

Detect eyes within detected faces​

For each detected face, crop the face region and apply the eye detector.

Key takeaways​

  • Greyscale simplifies processing.
  • Gaussian blur reduces noise.
  • Edge detection finds intensity changes.
  • Haar Cascade classifiers are pre-trained models that work best on greyscale images.
  • Zoom in on the Region of Interest (ROI) to apply eye detection within the detected face.
In progress