I am trying to fetch the data from the eye tracker using c++ code. I followed the steps used in the guidelines given it the webpage link http://dev.theeyetribe.com/cpp/.
I get some data from the eye tribe. But i get some false vales while my eyes are closed and it not detected. I compared with the values generated by the GUI of EYE Tribe, and the values i got. But are not similar.
Did any of you faced such problem, and can you please suggest me any solution for this. I need to detect the blink rate of my eye which is giving false data.
Here is the simple code i am using to get the data.
- Code: Select all
void MyGaze::on_gaze_data( gtl::GazeData const & gaze_data )
{
if( gaze_data.state & gtl::GazeData::GD_STATE_TRACKING_GAZE )
{
gtl::Point2D const & smoothedCoordinatesLeftEye = gaze_data.lefteye.avg; // smoothed data from left eye
gtl::Point2D const & smoothedCoordinatesRightEye=gaze_data.righteye.avg; // smoothed data from right eye
LeftEyeX=smoothedCoordinatesLeftEye.x;
LeftEyeY=smoothedCoordinatesLeftEye.y;
RightEyeX=smoothedCoordinatesRightEye.x;
RightEyeY=smoothedCoordinatesRightEye.y;
}
}
thank you,