Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for android call #739

Closed
StellaSong12 opened this issue Dec 18, 2018 · 2 comments
Closed

API for android call #739

StellaSong12 opened this issue Dec 18, 2018 · 2 comments

Comments

@StellaSong12
Copy link

Hello, I'm glad for building successfully in android mobile.
Then I hope to get the position (x, y) that eye blow stare at, or the direction it move to.
Is there any existing API for android jni to call? Or is there any documents and suggestion for me to read?

Really appreciate for your reply!

@headupinclouds
Copy link
Collaborator

There is no high level gaze API, but you can monitor the low level 2D models from the eye tracking over time in the SDK callbacks for simple relative gaze measurements here:

drishti_request_t trigger(const drishti_face_tracker_result_t& faces, double timestamp)
{
m_logger->info("trigger: Received results at time {}}", timestamp);
// if(some_condition_is_true(faces)) {
return { 3, true, true, true, true }; // request last 3 images and textures
// }
}

You can register that callback to monitor estimated face + eye models in real-time, and if you find something of interest, you can optionally return a structure requesting a buffer of textures and/or frames at that point in time (grabbing textures is free, but GPU->CPU transfers are slower and should be a once-in-a-while operation). If relative gaze estimates are sufficient for your application, you can estimate them using changes in the pupil or eye center positions wrt a stable reference coordinate system. If you need some absolute gaze estimate, you will probably have to train an application specific model with an image based CNN approach.

@StellaSong12
Copy link
Author

Thank you a lot!
It really helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants