Device Not Calibrating

Forum for C#/Windows development

Device Not Calibrating

Postby djl70 » 01 Oct 2015, 07:42

Hello,

I have the following code being called from an external class: (I realize there is deprecated code, but this should not affect the calibration process, should it?)

Code: Select all
class EyeTribe : IGazeListener
...
// Toggle calibration mode
public void Calibrate ()
{
    // Test for connection
    if (!GazeManager.Instance.IsConnected)
    { return; }

    // Start calibration routine
    if (!GazeManager.Instance.IsCalibrated &&
        !GazeManager.Instance.IsCalibrating)
    {
        GazeManager.Instance.CalibrationStart(Config.CalibrationPoints, null);
    }
}

// Perform calibration for point
public void Calibrate (Point Location)
{
    // Test for connection
    if (!GazeManager.Instance.IsConnected ||
        !GazeManager.Instance.IsCalibrating)
    { return; }

    // Perform calibration for point
    GazeManager.Instance.CalibrationPointStart(Location.X, Location.Y);
    Thread.Sleep(Config.CalibrationPause);
    GazeManager.Instance.CalibrationPointEnd();
}


The class calling these functions is set up to be able to generically handle various eye trackers, and it does so--except with the EyeTribe. These functions seem to not actually calibrate the device. The first problem is that the check to "Start calibration routine" fails, because "IsCalibrated" is apparently true, even though the device should not yet be calibrated. If I ignore that check, it runs through the calibration process fine, until the results come back--and they are always the same.

Thank you in advance for your help; I have been struggling with this for a while, but I am sure the problem is not too difficult to solve.
djl70
 
Posts: 2
Joined: 09 Sep 2015, 23:14

Re: Device Not Calibrating

Postby Anders » 01 Oct 2015, 10:17

The first problem is that the check to "Start calibration routine" fails, because "IsCalibrated" is apparently true, even though the device should not yet be calibrated.


If you have calibrated the EyeTribe Server using the EyeTribe UI client, then this state is persisted even if the server is closed down and reopened. The latest calibration is saved in other words. This is why the 'isCalibrated' bool is true. Have you checked if gaze coordinates are coming through in the data stream?

Could you post the Calibration result you get when completing your own calibration routine? You can do this by having the EyeTribe UI api console running in the background.

Have you had a look at the open source examples? If not, then I suggest you take a look at the tet-csharp-samples or maybe a Unity (using C#) example.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

Re: Device Not Calibrating

Postby djl70 » 02 Oct 2015, 06:26

Hello,

First, I want to thank you very much for the swift reply!

Anders wrote:Have you checked if gaze coordinates are coming through in the data stream?


Funnily enough, I had not checked this. I just did, and every coordinate is either 0 or NaN passed a certain point in the program. After plenty of logging, I found the problem source--completely unrelated to anything, a certain check earlier in the class was causing a necessary variable to be uninitialized. I knew it had to be something simple!

Everything is working as intended, now. Thank you for getting me out of my tunnel vision!
djl70
 
Posts: 2
Joined: 09 Sep 2015, 23:14

Re: Device Not Calibrating

Postby Anders » 02 Oct 2015, 10:54

You are very welcome!

Be sure to share your work/project with the community once complete :-)
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23


Return to C#



cron