Home › Forums › Software Development › gaze coordinate
Tagged: eyetracker gazeposition
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by Grant [Tobii].
- 17/04/2018 at 16:53 #8126MinaParticipant
Hi, I am using tobii eyetracker for creating an interactive book, but I can not get the gaze coordinate, I tried the minimal samples but I didnt have any success,
I am using c#
I appriciate so much if you can help me,
I have two methods, one drawMehtod() which draw a rectangle at the given points
and a gazePos() method that pass the X,Y coordinations to the drawMethod
then I call the gazePos() by clicking the button1
I dont get any errors but also no respons
private void gazePos()
var eyeXHost = new EyeXHost();
var lightlyFilteredGazeDataStream = eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);
lightlyFilteredGazeDataStream.Next += (s, e) =>drawMethod(e.X, e.Y);
var eyePositionDataStream = eyeXHost.CreateEyePositionDataStream();
public void drawMethod(double w, double h)
g = CreateGraphics();
p = new Pen(Brushes.DarkBlue);
r = new Rectangle(Convert.ToInt32(w+button1.Width), Convert.ToInt32(h), 20, 20);
private void button1_Click(object sender, EventArgs e)
please send me your suggestions,
Thank you18/04/2018 at 15:51 #8136Grant [Tobii]Keymaster
Hi @minoo, thanks for getting in touch. You initially mentioned you had no success with the minimal samples?
Perhaps you are unaware we have produced a separate suite of sample programs dedicated especially for Interaction purposes which contain all the necessary code and steps required to implement your project (based upon your initial description)
You can check them out for free @ https://github.com/Tobii/interaction-samples
I believe the ‘forms samples’ should be exactly what you are looking for and thus save you the hassle of starting your own application from scratch. Please check it out and kindly let us know if you are still experiencing difficulty in getting started.19/04/2018 at 07:02 #8141MinaParticipant
Hi, Thank you for the response,
Im using these samples already,
The problem is that the eyegaze position minimal sample has been written for console,and it works well there,
But Im creating my program of interactive book on windows forms,
I need to know where the reader is looking, and I should have gaze position information,
But I m not able to write it in a method it,
Thank you again for your kind attention19/04/2018 at 10:06 #8144Grant [Tobii]Keymaster
Hi @minoo, yes indeed the *minimal* samples are written for the console output, but we have included in the aforementioned
links several WPF examples for Windows Forms that include interactive buttons, menus, etc….
Did you get a chance to try running these? I think it should be greatly helpful for you in this regard.
- You must be logged in to reply to this topic.