Hi,
I am looking for some example apps that detect eye blinks in IOS. I am fairly new to SWIFT and trying to learn more about this. Any pointers would be awesome!
-Bruce
Hi,
I am looking for some example apps that detect eye blinks in IOS. I am fairly new to SWIFT and trying to learn more about this. Any pointers would be awesome!
-Bruce
I don't know of any example apps that do this out of the box, but this is the approach I would use (although I haven't tried it out!):
Use the Vision framework to detect face landmarks from camera stream in real time (like in this Apple Example Code)
Every frame, you'll get a VNFaceObservation whose landmark
property will have leftEye
and rightEye
properties which are a set a points representing the outline of the eye.
Calculate the aspect ratio of the eye using those points. If aspect ratio is close to zero, user has blinked.