How to recalibrate a certain point

Place to discuss eye tracking and related topics

How to recalibrate a certain point

Postby jhbong84 » 16 Jul 2015, 05:07

Hi i am making a custom automatic calibration program in Unity, this is how it works

However, i need to be able to recalibrate a point, not abort the whole calibration. Here is what i mean

> StartCalibrationPoint

> wait for 800ms

>>>>>>>>>during this 800ms the user looked away, i need to void this calibration, and only recalibrate this point again.


to do this should i call CalibrationPointEnd? and StartCalibrationPoint on the same Point again? or can i just call StartCalibrationPoint on the same point without ending it. Because if i end it, then the API will go on to the next point, which i don't want.


Thx for help
jhbong84
 
Posts: 1
Joined: 05 May 2015, 10:50

Re: How to recalibrate a certain point

Postby Martin » 16 Jul 2015, 16:45

The Server will let you know which points should be re-calibrated at the end. Consider the calibration sample on Github.

First your class should implement the ICalibrationProcessHandler interface, you then have the method OnCalibrationResult(CalibrationResult res). Here we find the points that should be shown again.

Code: Select all
            // Success, check results for bad points
            foreach (CalibrationPoint cp in res.Calibpoints)
            {
                // Tracker tells us to resample this point, enque it
                if (cp.State == CalibrationPoint.STATE_RESAMPLE || cp.State == CalibrationPoint.STATE_NO_DATA)
                    points.Enqueue(new Point2D(cp.Coordinates.X, cp.Coordinates.Y));
            }


Overall, points with no data should always be re-sampled but you can define your own threshold for accuracy, mean error or standard deviation (spread). The variables are outlined in the API documentation.

Simply add the bad points to a queue and run the display sequence again. The server automatically will replace the data for each point based on the X/Y location. Note that calling CalibrationStart will clear the previous calibration.
Martin
 
Posts: 567
Joined: 29 Oct 2013, 15:20

Re: How to recalibrate a certain point

Postby pf » 31 Aug 2015, 17:34

but after resubmitting the points with start/end the server does not respond with anything.
How do I get it to respond with the calibresult?
Code: Select all
{"category":"calibration","request":"pointend","statuscode":200,"values":{"calibresult":{"calibpoints":[ ..

is the trick in ICalibrationResultListener, GazeManager.Instance.AddCalibrationStateListener and OnCalibrationChanged?
I can't quite seem to get that to work, will test more tomorrow
pf
 
Posts: 7
Joined: 10 Feb 2014, 11:22

Re: How to recalibrate a certain point

Postby pf » 04 Sep 2015, 15:42

the tracker says

Request FAILED
Category: calibration
Request: pointend
StatusCode: 403
StatusMessage: Another client initiated calibration

are the points overritten behind the scenes?
pf
 
Posts: 7
Joined: 10 Feb 2014, 11:22


Return to General Discussion



cron