TechnoLabsz: May 2013

Eye Blink Detection with OpenCV on Ubuntu

This walkthrough covers a compact computer-vision experiment I built not long ago. Its goal is straightforward: recognise when a person's eyes blink. A practical use case is monitoring a driver behind the wheel to spot signs of drowsiness. The program locates the user's eyes and keeps tracking them across frames.

By applying a template-matching approach, the code determines whether the eyes are currently shut. When a closed-eye state is detected, a message is printed to the terminal and a Python script is triggered so the event can be forwarded to external hardware such as an Arduino or another controller board.

Source Code and Download

The OpenCV implementation is provided as blink_detection.cpp. Grab the code package below to try it yourself.

RSS feed icon for TechnoLabsz
Subscribe via RSS
Twitter icon for TechnoLabsz
Follow on Twitter
Facebook icon for TechnoLabsz
Connect on Facebook
TechnoLabsz profile thumbnail
TechnoLabsz profile
Cubieboard development board
Cubieboard
mbed NXP LPC1768 embedded board
mbed NXP LPC1768
Learning Robotics using Python book cover
Learning Robotics using Python
Diagram explaining how AI works
How AI works
Screenshot of a Linux desktop session
Desktop screenshot
Screenshot of a software configuration
Configuration capture
Social robot final year project
Social robot project
Email icon
Email
Mastering ROS for Robotics Programming book cover
Mastering ROS for Robotics Programming
Facebook profile image
Facebook profile
TechnoLabsz author photo
Author

Download Code Read More

Explore More Topics

Browse the site's subject areas to find related tutorials and projects.

Popular Posts

About the Author

Lentin Joseph, based in Kochi, Kerala, India, is deeply curious about emerging technology. View my complete profile

Books: Mastering ROS for Robotics Programming and Learning Robotics using Python

Labels

Blog Archive

  • 2017 (1) — March (1)
  • 2016 (1) — July (1)
  • 2015 (2) — December (1), May (1)
  • 2013 (9) — September (1), July (2), June (1), May (1), March (3), January (1)
  • 2012 (77) — November (3), September (10), August (21), July (20), June (3), May (3), April (7), March (6), February (4)
  • 2011 (49) — October (8), September (10), August (31)

Stay Connected

Follow TechnoLabsz and subscribe for updates.

Home Twitter Facebook Subscribe