Page 1 of 1

How to recalibrate a certain point

PostPosted: 16 Jul 2015, 05:07
by jhbong84
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

Re: How to recalibrate a certain point

PostPosted: 16 Jul 2015, 16:45
by Martin
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.

Re: How to recalibrate a certain point

PostPosted: 31 Aug 2015, 17:34
by pf
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

Re: How to recalibrate a certain point

PostPosted: 04 Sep 2015, 15:42
by pf
the tracker says

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

are the points overritten behind the scenes?