Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV eye tracking on Android

Tags:

android

opencv

I'm looking to do basic eye tracking in android using the OpenCV api. I've found that there seem to be two ways to use opencv in Andriod, either by using their c++ wrapper or by using JavaCV api. I'm willing to do either but I'm looking for some idea or sample code as to how i would track basic eye movement with either platform. I'm leaning toward the JavaCV api because it looks easier to use but I could really use some sort of tutorial on the basics of using it with android.

like image 248
Peter Avatar asked Jan 22 '12 06:01

Peter


1 Answers

Assuming you already looked into JNI (Java Native interface), JavaCV is exactly the same thing as OpenCV. As per eye tracking, you will need to get the live video feed from the camera and locate the participant's eyes in the frames using template matching and blink detection. You will just have to make your View implements Camera.PreviewCallback in order to get a hold on the camera feed.

The OpenCV Site on eye tracking provides some sample codes that will help you track the eyes.

If you want to see an example of opencv on android, click on this open source code.

Hope it helps

like image 93
fabricemarcelin Avatar answered Sep 21 '22 02:09

fabricemarcelin