Tagged: Tobii interaction CoreSDK
- This topic has 9 replies, 2 voices, and was last updated 4 years, 9 months ago by Grant [Tobii].
- AuthorPosts
- 01/01/2020 at 15:53 #13725BamannParticipant
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));
01/01/2020 at 16:36 #13727Grant [Tobii]KeymasterHi @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.
01/01/2020 at 18:41 #13728BamannParticipantThanks 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?01/01/2020 at 22:47 #13729BamannParticipantThe 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));
02/01/2020 at 15:00 #13735Grant [Tobii]KeymasterHi @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.
02/01/2020 at 15:58 #13737BamannParticipantI 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.
02/01/2020 at 22:37 #13740Grant [Tobii]KeymasterHi @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.
03/01/2020 at 11:23 #13743BamannParticipantThanks 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.
05/01/2020 at 17:04 #13752Grant [Tobii]KeymasterGreat! 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.
05/01/2020 at 17:04 #13753Grant [Tobii]KeymasterGreat! 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.
- AuthorPosts
- You must be logged in to reply to this topic.