Reputation: 157
Tutorial : http://romanhosek.cz/android-eye-detection-and-tracking-with-opencv/
I used this tutorial to detect eyes and face of a person. But my question is, how to use this given sample code to detect eye closure. For example, to detect open and closed state of a eye. Can anyone give me some codes to do this.
Thanks in advance :)
Upvotes: 1
Views: 1274
Reputation: 3222
Once you have the eye position in the frame, you can use a binary classifier (such as SVM) to classify whether the image region containing the eye is considered open or shut.
In order to train this classifier, you will need to collect a set of images, manually provide ground truth (supervised learning) and then train the classifier.
Upvotes: 2