Eye Tracking Data

1. Overview

SightLab exports eye tracking data including:

2. Coordinate System

2.1 Intersect Point Coordinates

2.2 Eye Rotation

3. Data Types

3.1 Gaze Intersection Data

3.2 Eye Rotation Data

4. Data Collection Process

The eye tracking data is collected and processed in the updateGazeObject function within the "sightlab" module. Here's a breakdown of the process:

5. Code Explanation


def updateGazeObject(self):

    self.eyeTracker = vizconnect.getTracker('eye_tracker').getRaw()    gazeMat = self.eyeTracker.getMatrix()

    gazeMat.postMult(viz.MainView.getMatrix())

    line = gazeMat.getLineForward(1000)

    info = viz.intersect(line.begin, line.end)


    if info.valid and self.gazePointObject is not None:

        self.gazePointObject.setPosition(info.point)



For Individual Eye Data

def updateTrialData(self, currentTime, point, eyeTracker, maxDistance, label):            

        leftGazeMat = eyeTracker.getMatrix(viz.LEFT_EYE)

        leftEuler = leftGazeMat.getEuler()

        leftGazeMat.postMult(viz.MainView.getMatrix())

        line = leftGazeMat.getLineForward(maxDistance)

        leftInfo = viz.intersect(line.begin, line.end)

        #leftEuler = vizmat.AngleBetweenVector(viz.MainView.getMatrix().getForward(), leftGazeMat.getForward())

        

        if leftInfo.valid:

            left_eye = leftInfo.point

        else:

            left_eye = vizmat.MoveAlongVector(line.begin, line, maxDistance)

        

        rightGazeMat = eyeTracker.getMatrix(viz.RIGHT_EYE)

        rightEuler = rightGazeMat.getEuler()

        rightGazeMat.postMult(viz.MainView.getMatrix())

        line = rightGazeMat.getLineForward(maxDistance)

        

        #rightEuler = vizmat.AngleBetweenVector(viz.MainView.getMatrix().getForward(), rightGazeMat.getForward())

        

        rightInfo = viz.intersect(line.begin, line.end)

        if leftInfo.valid:

            right_eye = rightInfo.point

        else:

            right_eye = vizmat.MoveAlongVector(line.begin, line, maxDistance)


6. Data Usage and Interpretation


7. Additional Data


For more information see the eye tracking metrics page

06-24-2024-12-02-33__trial_data_1