Open eyes / closed eyes in Opencv
Hi,
I am working on a application able to get a face from a picture and say if the eyes are open or closed. For now, with Haar cascades from Opencv, getting the face ROI and even the eyes ROI is an easy task, but I am struggling on how to distinguish between open and closed eyes.
What I have tried so far is the in-built Haar classifiers in Opencv, but is detecting eyes in general, either they are open or closed. I also tried to train my own Haar cascade, but dont have really clear the process and the results I get are not good enough.
Somebody who has gone this way? Any ideas around?
Thanks in advance!
Im sorry I don't know the answer to your problem, but I was just wondering how you went about getting the eyes ROI? I am currently making a face tracking program but I am stuck getting the mouth ROI.
PS. how many positives are you using for your training? and are you making two cascades? one for open and one for closed?
Sorry, didnt see your replies before. I am getting eyes, nose and mouth with a Haar classifiers. The one that is built-in in Opencv works fine for that. What detectMultiScale returns is the ROI (Rect in Opencv).
No worries and going back to your problem have you tried to train your own classifiers one using positive images of opened eyes an one using closed eyes? then program to say if detects eye using open classifier then eyes are open and if detects eyes using closed classifier then they are closed. Hope that makes sense.
Hi again, yes I tried doing that, but unfortunately it is not that simple and I not getting it to work as I would like. This is why I was looking for alternatives. Really appreciated your help though.
You can try this too, get some images of eyes closed and some images of open eyes... Create a CSV file, train your data and use one image as as test... http://docs.opencv.org/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.html
Hi, i want find how to detect eye closed and eye open with using android studio? is it possible?