21 lines
864 B
Matlab
21 lines
864 B
Matlab
function [frame_index, gaze_x, gaze_y, marker, eye_found] = load_eye_tracking_data(filename)
|
|
% [frame_index, gaze_x, gaze_y, marker, eye_found] = load_eye_tracking_data(filename)
|
|
%
|
|
% Loads the eyetracking data stored in the specified file. Raises an error,
|
|
% if the file was not found.
|
|
%
|
|
% Arguments:
|
|
% filename: string, the path to the data file
|
|
%
|
|
% Returns:
|
|
% frame_index: vector, the recorded frame numbers
|
|
% gaze_x, gaze_y: vector, the recorded x and y eye positions
|
|
% marker: vector, the recorded event marker
|
|
% eye_found: vector, 1, or zero values indicating whether or not
|
|
% the eye was actually detected by the tracker.
|
|
|
|
if exist(filename, "file") ~= 2
|
|
error("file %s does not exist or is no mat file", filename);
|
|
end
|
|
|
|
load(filename, "gaze_x", "gaze_y", "frame_index", "marker", "eye_found") |