Thank you for you reply.
I have to describe my problem I faced since I got my eye tracker last night.
This eye tracker looks so cool and run well.
No, I want to use eye tracker into my project. The code I made using C plus plus.
However, I am not sure how to use the API to extract the data. In addition, no C++ samples are provided from website, it is a little pity, although the C# has.
The code I have read in the C++ Tutorials web-page. It looks easily, but I do not know well how it work. Maybe MY c++ is not well, I think.
Currently, I created a console application using C++.
the goal I want to reach is to capture the eye gaze data.
1. I click and run the EyeTribe UI software, then I calibrated my eye tracker. I found the EyeTribe Server also has been run with EyeTribe UI.
2. I shut down the EyeTribe UI software, the EyeTribe Server software still run.
3. I run my code, the easy code like this:
- Code: Select all
gtl::GazeApi m_api;
if (m_api.connect(true))
{
printf("Connected Successful");
}
return this connection is successful. It is cool, I found the near IR lights has been on. Then I have no idea to how to handle it next step.
The above steps I operate is right or wrong?
I want to understand some questions:
1. After calibration I made using your provided software and keep the Server run, I can run my software to capture calibrated eye gaze data, is that right?
2. The MyGaze class provided in this website. Can you tell me how to work in my code using console application program in the VS2010 environment?
3. If I do not want to use the MyGaze class, how to capture calibrated or right eye gaze data? In other words, like below code:
- Code: Select all
#include "gazeapi.h"
#include "gazeapi_interfaces.h"
#include "gazeapi_types.h"
int main(int argc, char **argv)
{
gtl::GazeApi m_api;
gtl::GazeData m_point;
gtl::Point2D m_point2d;
if (m_api.connect(true))
{
m_api.add_listener(* this);
printf("Connected Successful");
}
while (1)
{
int x=m_point.lefteye.raw.x;
printf("%d\n",x);
}
return 0;
}
However, after running this code, two errors were provided to me. one is m_api.add_listener(* this) (this is not used in this function?), another is int x=m_point.lefteye.raw.x,(need initialization for m_point?);
Whatever, I hope and better to give me a easily sample me how to use for capture gaze data. I am very looking forward to receive your message.
Thank you so much!