i made application eye detecting by following this link link and it work
how can i detect the eye is opened or closed ?
is there library in android to detect closed or opened
I've no idea whether there is any library for that, but using technique descirbed in article Eye-blink detection system for human–computer interaction
by Aleksandra Królak and Paweł Strumiłło
(you can download it here and here and here is some simplified version) in my opinion is a good option. Generally this technique is quite simple:
- Find eye (or both eyes). Remember this part of image as a template.
- In next frame use some kind of corellation (authors used normalized cross correlation method, but you can try with other types - OpenCV has few types of correlation methods implemented) to find region similar to your template. Place with highest correlation value (most likely) will be eye.
- If correlation value > some_threshold_value than eye is open, otherwise it is closed.
Threshold value used by authors is in the article, but when i was using this technique i've used other value so most likely you will need to find value for your case on your own.
来源:https://stackoverflow.com/questions/28809132/open-eye-and-closed-eye-in-android-by-android-eye-detection-and-tracking-with-op