Home Forums Software Development how to get the gaze coordinate? Reply To: how to get the gaze coordinate?

#2957
Dolores Joya
Participant

I was able to successfully get a Gaze coordinate data stream to successfully build with Microsoft Visual Studio Community 2013 after going through these:

These 2 tutorials got me started:
http://developer.tobii.com/walkthrough-setting-cc-project-eyex-c-api/
http://developer.tobii.com/c-sample-walk-minimalgazedatastream/

The data steam from the MinimalGazeDataStream Visual Studio project output looks like this:

Gaze Data: (384.5, 161.9) timestamp 605378864 ms
Gaze Data: (385.1, 163.0) timestamp 605378880 ms
Gaze Data: (390.3, 182.0) timestamp 605378895 ms
Gaze Data: (392.9, 188.2) timestamp 605378927 ms
Gaze Data: (402.1, 198.5) timestamp 605378937 ms
Gaze Data: (404.4, 202.6) timestamp 605378954 ms
Gaze Data: (402.4, 186.8) timestamp 605378970 ms
Gaze Data: (402.6, 178.0) timestamp 605378981 ms
Gaze Data: (402.6, 164.8) timestamp 605378998 ms
Gaze Data: (401.6, 159.5) timestamp 605379013 ms

Coming from:
/*
* Handles an event from the Gaze Point data stream.
*/
void OnGazeDataEvent(TX_HANDLE hGazeDataBehavior)
{
TX_GAZEPOINTDATAEVENTPARAMS eventParams;
if (txGetGazePointDataEventParams(hGazeDataBehavior, &eventParams) == TX_RESULT_OK) {
printf(“Gaze Data: (%.1f, %.1f) timestamp %.0f ms\n”, eventParams.X, eventParams.Y, eventParams.Timestamp);
} else {
printf(“Failed to interpret gaze data event packet.\n”);
}
}