07-19-2010 01:16 PM
Hello,
I have a Tobii Eye Tracker X120 that I've interfaced with LV using a .dll file created with the .NET application TlbImp.exe. Attached are the main VI, callback VI, and the .dll I'm using.
Previously, the OnGazeData event would not fire. This was resolved by creating a new .dll file via TlbImp.exe. Now, the event fires, but with data we don't believe to be correct.
While tracking, the indicator labeled simply Boolean should follow the subject's gaze. x_gazepos_lefteye and y_gazepos_lefteye are floating point numbers from 0 to 1, 0 being the left or top of the screen. In the final version we'll likely find the mean of the left and right eyes' data, but for now we're just trying to get something usable back from the device.
We had one of my coworkers act as a test subject today. While he would gaze into the top-left corner of the monitor, the Boolean indicator would hover in the bottom-right of the screen, or beyond the screen, or occasionally up to the middle of the screen. The device shipped with a sample program in C++ that we use to verify that it's working properly, and it is. The default program displays a square on the screen where you gaze, and that square has been found roughly accurate.
So we're unsure what the problem is, but convinced it has something to do with our LV implementation. In particular, we're wondering of the while loop is appropriate versus an event structure or something similar. My apologies for the block of text, but I feel the situation merits an in-depth explanation. Thank you so much for your time looking all of this over.
- EDC
07-20-2010 06:00 PM
Hi Evan,
Shooting from the hip it looks like you might want to invert the coordinant system and do some running averaging to smooth out your data and correct the inversion you're seeing. DLLs are a bit of a black box and your system looks to simply be reading back what the DLL is generating. Have you contacted Tobii or examined the c++ program to look for behaviors like this? It might be a useful exploration.
Also, I'd examine the coordinants and how they trend. You find patterns, you can always implement some math to do correction or autoscaling if needed. The way LabVIEW calls into .NET assemblies is pretty simple and shouldn't behave much different than a c++ call, it will just look different. Does software processing not handle the problems you're encountering?