Home Forums Software Development Stream Engine Gaze point values

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23684
    Zalo
    Participant

    Hello,

    I am creating a C# program with StreamEngine library and using interop calls.

    Currently, I am trying to match the gaze point values received (tobii_gaze_point_t) from the eye tracker to the pixels on the screen. However, the gaze point values range from (0-1000, 0-1000) and that does not match the x,y coordinates of the screen.

    Is calibration in my program needed to solve this issue of offset values or how others have dealt with this?

    #23686
    Jonas Högström
    Participant

    the gaze point values should be normalized over your screen area (0,0) represents top left corner and (1,1) is the bottom right corner. To get correct values you need to have done a correct screen setup. You typically don’t have to do this yourself if the tracker is a consumer tracker such as 4C or ET5. Once you get correct coordinates you need to multiply the values with the screen width/height in pixels if that is what you need. With the defailt license I acutally think you can’t change the screen setup. Use the tools that comes with the eye tracker for this.

    User calibration is not really related to this problem, but to get correct gaze data you also need to make sure your user is correctly calibrated. Again, this isn’t something you have to (or can) implement yourself for consumer devices.

    #23687
    Zalo
    Participant

    I understand. Thank you for your input 🙂

    #23737
    Christophe Zimmer
    Participant

    Hi,

    I also created a program in C# and I would like to have the coordinates of the gaze and apply your method, namely multiply x by the width resolution of the screen and the y value by the resolution of the height of the screen.
    I do not obtain consistent values : ​​I have a resolution of 1920X1080 and yet I obtain coordinates greater than 2200 pixels in x value. Can you give me an example of code in C#? Here is a snippet of my code :

    private static void OnGazePoint(ref tobii_gaze_point_t gazePoint, IntPtr userData)
    {
    // Check that the data is valid before using it
    if (gazePoint.validity == tobii_validity_t.TOBII_VALIDITY_VALID)
    {
    Console.WriteLine($”Gaze point: {gazePoint.position.x*1920}, {gazePoint.position.y*1080}”);
    }
    }

    Thanks you very much for your help,
    Best regards,

    Christophe

    #23738
    Jonas Högström
    Participant

    The code is not wrong. There are several reasons that you might get coordinates outside of the pixels of the screen:
    * You are looking outside of the screen – look on the screen
    * The user calibration is incorrect – perform a new user calibration
    * the screen setup is incorrect – perform a new screen setup

    The eye tracking signal isn’t perfect. typically the error is larger near the edges of the screen too, and there will always be occasional samples with significantly incorrect coordinates (due to some edge case during the image processing or computation in the eye tracker).

    If you plot the computed coordinate on the screen, does it typically match where you are looking? Is there a constant offset? is there a scale issue? Either of these indicate that your personal calibration or screen setup is off. Very noisy signals could indicate problems with eye tracking for that particular person. Glasses and contact lenses, heavy make up, long eye lashes and partially closed eyes all lead to a degradation in signal quality.

    #23739
    Christophe Zimmer
    Participant

    Hi Jonas,
    Thank you very much for your quick response, indeed I think it is because I am looking outside the screen.
    I will try to program a visual cursor which would be displayed according to the coordinates returned by the API.
    It should be easier to test if I look in the right place.
    Have a good day,
    Christophe

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