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.












Download Code Read More
Explore More Topics
Browse the site's subject areas to find related tutorials and projects.
Popular Posts
- Eye blink detection using OpenCV in Ubuntu
- How to easily install OpenCV on Raspberry Pi
- Cubieboard: A threat to Raspberry Pi
- mbed: An embedded board based on ARM
- Published a Book: "Learning Robotics using Python"
- Configuring XAMPP and Setting Wordpress, Drupal, Joomla and sNews
- How to program Kinect Sensor using Python in Ubuntu Linux
- How to convert RGB to HSV using OpenCV
- New ROS book for Robotics Projects | Introduction to Robot Operating System | Programming robots using ROS | ROS Tutorials
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
- 3D Modelling (1)
- Android Programming (8)
- Arduino (8)
- ARToolkit (3)
- Boost (1)
- C++ (3)
- Camera calibration (1)
- CMS (1)
- Computer (6)
- Computer Graphics (1)
- Computer Projects (2)
- cvblob in window7 (2)
- cvbloblib (1)
- Doxygen on Linux (1)
- eclipse (1)
- Electronics Projects (9)
- Embedded Systems (6)
- Gadgets (1)
- Gaming (1)
- Git (1)
- GNU/Linux (9)
- Hacking (3)
- Image Processing (1)
- Internet (5)
- Kinect (8)
- Kinect 3D Coordinate with OpenNI (1)
- Kinect SDK 1.5 samples (2)
- Linux Kernel (1)
- Maple board (1)
- Mobile Phones (3)
- Mobile Programming (1)
- MPI (1)
- OpenCV (23)
- OpenCV 2.3.1 (2)
- OpenCV 2.3.1 on Windows (1)
- Opencv and HSV (1)
- OpenCV conversion (1)
- OpenCV haar detection (1)
- opencv video tutorials (1)
- OpenNI (5)
- OpenNI in Windows 7 (1)
- OpenNI installation (1)
- PCB Designer (2)
- Programming (13)
- Python (5)
- Raspberry Pi (3)
- Robotics (16)
- Robotics; Arduino (1)
- ROS (12)
- ROS and Arduino (1)
- ROS electric with Laptop Webcam (1)
- ROS Face tracking (1)
- ROS on Android (1)
- ROS Turtlebot (1)
- ROS Tutorials (3)
- ROSConn (1)
- ScreenRecorder (1)
- Speech Recognition (1)
- Tech News (2)
- Techno-Humour (1)
- Tips and Tricks (7)
- Touch User Interface (1)
- V-REP (1)
- WIfi module (1)
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.
