eye blinks detection from video frames
Hi
I want to detect blinks from video frames that recorded using eye glasses like the image in the attachment .
What is the best way to do this ?
Thanks
Hi
I want to detect blinks from video frames that recorded using eye glasses like the image in the attachment .
What is the best way to do this ?
Thanks
I'll try a simple approach, based on this paper [1]:
[1] Malik, K., & Smolka, B. (2014, April). Eye blink detection using Local Binary Patterns. In Multimedia Computing and Systems (ICMCS), 2014 International Conference on (pp. 385-390). IEEE.
In order to build the LBP histogram of the eyes, you can use these other posts:
Open eyes / closed eyes in Opencv
how can I align Face Images
Facial feature detection
Facial features detection using haarcascade
Are there any new ways to improve eye detection?
Just a quick try.. RESULT
When in a frame the circle cannot be detected then the eye is blinking.
What I've done in this test:
I have come up with this code , but I think it is not accurate , It can't track the eye when it moves in video
while(1)
{
Mat frame,grey,edge,draw,src_gray,dst;
cap >> frame;
cvtColor( frame, grey, CV_BGR2GRAY );
GaussianBlur( grey, src_gray, Size(9, 9), 2, 2 );
threshold(src_gray,dst, 0, 255, THRESH_BINARY);
SimpleBlobDetector detector;
std::vector<KeyPoint> keypoints;
detector.detect( dst, keypoints);
Mat im_with_keypoints;
drawKeypoints( grey, keypoints, im_with_keypoints, Scalar(0,0,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS )
Can you post the video or the frame where you can't track it? I think you're blurring the image too much, Size(3,3) will be fine..If you are missing some part of the pupil (because of the led lights reflected i suppose) you can try to erode and then dilate the image after thresholding, or adjust the radius range..that should fix the problem since the pupil is always clearly visible with a close-up image like that
Asked: 2015-09-28 06:18:27 -0600
Seen: 3,014 times
Last updated: Sep 29 '15
Area of a single pixel object in OpenCV
OpenCV DescriptorMatcher matches
Conversion between IplImage and MxArray
how to understand which functions available in python bindings?
Problems installing opencv on mac with python
Video On Label OpenCV Qt :: hide cvNamedWindows
Problems using the math.h class with OpenCV (c++, VS2012)
How to reduce false positives for face detection
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
I'd try a circle fitting on the pupil, which seems to be clear enough..