Closed eye detection C++

asked 2013-03-09 08:17:05 -0500

atanu gravatar image

I I need to detect closed eyes only and also both eyes separately. That means I need to tell if left eye is open or closed, also same about the right eye.

I tried few ways. One of them is to detect eyes with haarcascade_eye and haarcascade_eye_tree_eyeglasses separately and then compare the results. If both detect eye, then eye open, if one detect and another can't,then eye closed. This trick was taken from this link:

http://tech.groups.yahoo.com/group/OpenCV/messages/87666?threaded=1&m=e&var=1&tidx=1

But it doesn't work as expected.eye cascade detectors don't work as mentioned in the link. Much close results are found with those haarcascade that I mentioned above. Sometimes it gives correct result, sometimes it can't. I don't know why. Besides it can't be told with this method that which eye is open and which eye is closed.

Now can someone help me to solve this?? At least I need a way to tell that one of the eyes is closed regardless which one and need to do that accurately. Please help.......

edit retag flag offensive close merge delete

Comments

Are you only able to detect open eyes? But you can detect the left and right eye only when open?

kaipyroami gravatar imagekaipyroami ( 2013-03-10 12:58:08 -0500 )edit
2

Train a new classifier to detect closed eyes and then vote between them. Or retrain the classifier to detect open AND closed eyes, and then train another to decide whether the eye is open or closed.

awknaust gravatar imageawknaust ( 2013-03-10 16:18:53 -0500 )edit

@kaipyroami I can detect both open and closed eyes together. But can't tell whether the detected eye is open or close. And I can detect if the eye is left or right through haarcascade_mcs_lefteye & haarcascade_mcs_righteye

@awknaust I knew about the training. As a beginner I found it very heard. So I was trying to find an alternative. I will try though.

atanu gravatar imageatanu ( 2013-03-11 09:15:21 -0500 )edit