Home › Forums › Legacy SDKs › Matlab SDK – Gaze Data
- This topic has 1 reply, 2 voices, and was last updated 6 years, 3 months ago by Grant [Tobii].
- AuthorPosts
- 11/06/2018 at 20:32 #8442An NguyenParticipant
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.
11/06/2018 at 22:23 #8443Grant [Tobii]KeymasterHi @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.
- AuthorPosts
- You must be logged in to reply to this topic.