Home > database >  Is it possible to access eye tracking data like pupil diameter on hololens 2?
Is it possible to access eye tracking data like pupil diameter on hololens 2?

Time:12-03

Is there a way to store and view eye tracking data like the size of the users pupils or the eye motion speed?

I am currently building a hololens 2 application in unity using MRTK. Now I would like to "record", store and view eye tracking data of the user.

CodePudding user response:

I don't believe you can get pupil diameter but it looks like you could estimate angular speed by measuring the change in gaze direction between frames:

Vector3 previousGazeDir;

// ...

Vector3 newGazeDir = CoreServices.InputSystem.EyeGazeProvider.GazeDirection;

if (previousGazeDir != Vector3.zero)
{
    float gazeAngle = Vector3.Angle(previousGazeDir, newGazeDir);

    float gazeAngularVelocity = gazeAngle/Time.deltaTime;

    // .. do stuff with gazeAngularVelocity
}

previousGazeDir = newGazeDir;

Depending on your exact use case you may want to account for changes in the direction the head is facing.

CodePudding user response:

Hololens 2 does appear to support eye tracking, and also appears to integrate with Unity via the Mixed Reality Toolkit. While I haven't used eye tracking tools for Hololens, I can say by tracking gaze direction frame over frame it is possible to gather "eye motion speed". Pupil size I have not seen in the eye tracking API's I've used, nor do I see it in the documentation linked.

Pretty much anything you can track in code can be "recorded".

  • Related