Home Forums Legacy SDKs Matlab SDK – Gaze Data

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8442
    An Nguyen
    Participant

    Hi,

    I had an experiment in Matlab and was trying to get the Tobii Gaze Data. In the experiment I ran this code:

      gaze_data = eyetracker.get_gaze_data();
       eyetracker.stop_gaze_data();
    
       latest_gaze_data = gaze_data(end);
       tobiitemp = [latest_gaze_data.SystemTimeStamp,',',latest_gaze_data.DeviceTimeStamp,',', latest_gaze_data.LeftEye.GazePoint.OnDisplayArea,',',latest_gaze_data.LeftEye.GazePoint.InUserCoordinateSystem,',',char(latest_gaze_data.LeftEye.GazePoint.Validity),',',latest_gaze_data.LeftEye.GazeOrigin.InUserCoordinateSystem,',', latest_gaze_data.LeftEye.GazeOrigin.InTrackBoxCoordinateSystem,',',char(latest_gaze_data.LeftEye.GazeOrigin.Validity),',',latest_gaze_data.LeftEye.Pupil.Diameter,',',char(latest_gaze_data.LeftEye.Pupil.Validity),',',latest_gaze_data.RightEye.GazePoint.OnDisplayArea,',',latest_gaze_data.RightEye.GazePoint.InUserCoordinateSystem,',',char(latest_gaze_data.RightEye.GazePoint.Validity),',',latest_gaze_data.RightEye.GazeOrigin.InUserCoordinateSystem,',', latest_gaze_data.RightEye.GazeOrigin.InTrackBoxCoordinateSystem,',', char(latest_gaze_data.RightEye.GazeOrigin.Validity),',',latest_gaze_data.RightEye.Pupil.Diameter,',',char(latest_gaze_data.RightEye.Pupil.Validity)];
       dlmwrite(eye,tobiitemp,'delimiter','','-append');

    to get a .txt output file of the gaze data but nothing was saved in the file and all the Validity returned as Invalid.

    I tried printing the output:

       fprintf('SystemRequestTimeStamp: %d\n',latest_gaze_data.SystemTimeStamp);
        fprintf('DeviceTimeStamp: %d\n',latest_gaze_data.DeviceTimeStamp);
    
        disp('Left Eye');
    
        fprintf('GazePoint.OnDisplayArea: %.2f %.2f\n',latest_gaze_data.LeftEye.GazePoint.OnDisplayArea);
        fprintf('GazePoint.InUserCoordinateSystem: %.2f %.2f %.2f\n',latest_gaze_data.LeftEye.GazePoint.InUserCoordinateSystem);
        fprintf('GazePoint.Validity: %s\n',char(latest_gaze_data.LeftEye.GazePoint.Validity));

    and the TimeStamp returned correct value. However all the Left Eyes data was NaN and Invalid.

    Do you know why this happens? The Eyetracker was set up correctly and calibration runs well.

    #8443
    Grant [Tobii]
    Keymaster

    Hi @anguyen, thanks for your query. The Tobii Pro SDK and Matlab Bindings are part of the Tobii Pro business department.

    This forum is intended for support with the Tobii EyeX and C4 Eye Tracker and associated SDK’s.

    Please get in touch with Tobii Pro Support department directly @ http://www.tobiipro.com/contact/contact-support/ for a prompt answer to your query.

    Apologies for the inconvenience.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.