[Solved] Can oly track the right half of the screen

Home Forums Unity SDK [Solved] Can oly track the right half of the screen

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #13725
    Bamann
    Participant

    I created a new project within the sample CoreSDK solution and can successfully track the whole of the screen area. However when I create a new solution of my own with exactlt the same project code and controls I can only track the right half of the screen. I have got the sample version of NuGet interaction and every elements of the project are identical. See code below. Any help on this would be appreciated.
    //var dot = (Bitmap)Image.FromFile(@”C:\getrid\dot.png”);
    Graphics g = pictureBox1.CreateGraphics();
    String drawString = “x”;

    // Create font and brush.
    Font drawFont = new Font(“Arial”, 16);
    SolidBrush drawBrush = new SolidBrush(Color.Black);

    // Create point for upper-left corner of drawing.

    // Set format of string.
    StringFormat drawFormat = new StringFormat();
    drawFormat.FormatFlags = StringFormatFlags.DirectionVertical;
    //Graphics g = Graphics.FromHwnd(Process.GetCurrentProcesses.MainWindowHandle);
    var host = new Host();

    // 2. Create stream.
    var gazePointDataStream = host.Streams.CreateGazePointDataStream();

    // 3. Get the gaze data!

    gazePointDataStream.GazePoint((x, y, ts) =>g.DrawString(drawString, drawFont, drawBrush, Convert.ToInt16(x), Convert.ToInt16(y), drawFormat));

    #13727
    Grant [Tobii]
    Keymaster

    Hi @bkasmai, sorry to hear about your issues. Indeed, that is a most unusual problem. May I ask if you are tied to using the Core SDK for a particular reason? We will be deprecating this SDK in favour of the interaction API in the near future and so bug fixing is not currently prioritised for the Core SDK.

    Accordingly, it would be preferable for you to try this project setup on the interaction library which you can download @ https://developer.tobii.com/consumer-eye-trackers-interaction-library/

    Apologies for any inconvenience, but should you still get the same issue, it will be easier to assign time in looking within our code. Thanks for your understanding and awaiting your feedback.

    #13728
    Bamann
    Participant

    Thanks for the prompt reply. I will try your suggestion. I am on an early stages of a proof of concept project where we want to see how a trainee radiologist looks a xray image as against an expert radiologist. This is a non-profit/non-commercial research project.
    However I have just encountered a major problem! My Tobii tracker stopped working after the latest Windows 10 update (build 16299.192)! Do you want me to create another discussion thread for this?

    #13729
    Bamann
    Participant

    The windows update that rendered the tracker unusable was solved after uninstalling Tobii application and then reinstalling. Can you please guide me as how to use the api solution that would do the same as the coreSDK code below?
    var host = new Host();

    // 2. Create stream.
    var gazePointDataStream = host.Streams.CreateGazePointDataStream();

    // 3. Get the gaze data!

    gazePointDataStream.GazePoint((x, y, ts) =>g.DrawString(drawString, drawFont, drawBrush, Convert.ToInt16(x), Convert.ToInt16(y), drawFormat));

    #13735
    Grant [Tobii]
    Keymaster

    Hi @bkasmai, glad to hear you managed to resolve the update issue.. hopefully shouldn’t trouble you further!

    To subscribe to gaze data using the Interaction Library, we have produced a detailed tutorial in C++,C & C#:

    Assuming you are most comfortable with C#, then you can view the tutorial @ https://tobii.github.io/interaction_library/sdk/html/sample_streams_cs.html
    which demonstrates the correct syntax to use.

    Something to bear in mind however for your project is that should you intend to be using the eye tracker for analysis or research purposes (which seems to be the case) then you will be obligated to purchase an analytical use licence from Tobii as our consumer level of eye trackers (4C, EyeX) are targeted for interaction purposes principally. You can read more about this @ https://analyticaluse.tobii.com/

    I note however, you did not specify which eye tracker model you are using. This requirement is not necessary should you have a Tobii Pro Tracker.

    #13737
    Bamann
    Participant

    I have unsuccessfully tried whole day today to get the api working with my project using c# and vb2015 . Your sample console application does not work. I was wondering if you have tested the sample projects cs_sample_stream.csproj in tobii_interaction_lib_windows_x64_0.7.340_beta folder with vs 2015. It does not work for me. Sadly i have given up on this. I have got tobii Eye Tracker 4C bought from Amazon. Unfortunately unless we know this tracker meets our requirements we cannot commit ourselves to purchasing development license. As I said this is a proof of concept project.

    #13740
    Grant [Tobii]
    Keymaster

    Hi @bkasmai, sorry to hear about your issues. My setup for success operation was as follows:

    Downloading the Windows Interaction library with accompanying samples @ https://developer.tobii.com/consumer-eye-trackers-interaction-library-getting-started/

    Unzip, and run “cs_sample_streams.csproj” in Visual Studio 2019 (or Visual Studio 2017) which worked with no problem directly.

    Bear in mind you will need to download the .NET Core SDK @ https://dotnet.microsoft.com/download/dotnet-core/2.1
    It would appear that VS2015 does have this download available (SDK 2.1.507) so you should be good to go without necessarily upgrading the IDE.

    Please let us know how you get on.

    #13743
    Bamann
    Participant

    Thanks for your help. The sample codes works ok with visual studio 2019. However i am now having another problem enabling/disabling the tracker via windows settings and tobii software due to uncontrolled screen dimming issue for which i opened another discussion topic.

    #13752
    Grant [Tobii]
    Keymaster

    Great! Glad to know this issue is not present in the Interaction Library.. will mark as solved. Thanks for your patience during this incident and good luck with the future project.

    #13753
    Grant [Tobii]
    Keymaster

    Great! Glad to know this issue is not present in the Interaction Library.. will mark as solved. Thanks for your patience during this incident and good luck with the future project.

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