Home Forums Software Development How to get only one gaze point?

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18616
    H. Moon
    Participant

    Hi. I’m new in C#.

    In my case, I want to analyze gaze point using C# DLL file.
    And I am trying to get only one gaze point (x, y).

    For instance, in the GUI, if I click a button, the current gaze point shows in the edit box.

    using Tobii.Interaction;
    public class Program
    {
        public static double Main()
        {
            var host = new Host();
            var fixationDataStream = host.Streams.CreateFixationDataStream();
            
            var fixationPointX = 0.0 // initialization
            var fixationPointY = 0.0 
    
            fixationDataStream.Next += (o, fixation) =>
            {
                // fixationPointX = fixation.Data.X;
                fixationPointX = 1.0
                fixationPointY = fixation.Data.Y;
            }
    
            return fixationPointX; (or fixationPointY)
        }
    }

    Above code returns 0.0 (I guess this result is the initialize value).
    As I expected it should be 1.0.
    And I know that fixationDataStream.Next += (o, fixation) => this loop(?) doesn’t work when it export as DLL.

    I already checked the github samples, but it doesn’t helpful to me.

    please help me..

    #18617
    Grant [Tobii]
    Keymaster

    Hi @h-moon and thanks for your query. It looks like you are using the older Tobii Core SDK C# SDK for your project? This software has been deprecated quite some time and has now been replaced with the Tobii Interaction Library, which also supports the C# language.

    We provide a very detailed tutorial and several samples of this new API available @ https://developer.tobii.com/consumer-eye-trackers-interaction-library-getting-started/

    If you kindly go through the C# section on this page and get back to us if you still are experiencing issues. Best Wishes.

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