fyordan / AndroidGaze

Project for Smartphone Vision. Android app that tracks your gaze.
16 stars 7 forks source link

Predicting gaze coordinates #2

Open sirtsik opened 4 years ago

sirtsik commented 4 years ago

Hey!

Thanks for sharing this project. I'm not sure if this project is complete abandoned, but I hope you can still answer my question.

In readme you stated that "A more complex project would use the x,y values of the Iris Pixel and fit it into a cubic equation to calculate the X,Y values in screen coordinates that the user is looking at. However, that requires a calibration step ...".

How would you use calibration and how would the cubic equation look like?

fyordan commented 4 years ago

Hello,

Yes this is an abandoned piece of work, it was originally for a university class and I am no longer working on it. The idea of the cubic equation is to find some transformation between the x coordinates of where the iris is locations and the X coordinates that the user is actually looking at.

The equation would look something like: ax^3 + bx^2 + cx + d = X, and something similar with the y coordinate. (An even more complex equation would incorporate x and y: a x^3 + b x^2 y + c x y^2 + d y^3 + e = X). The calibration step would involve recording a lot of different x,y -> X, Y pairs (by telling the user to look at specific points in the screen), and then using a cube fitting algorithm for finding the right coefficients.