HMDBasedCalibration
Provides methods and properties for managing calibrations for HMD based eye trackers.
calib = HMDBasedCalibration(tracker)
Contents
Enter Calibration Mode
Enters the Calibration Mode and the Eye Tracker is made ready for collecting data and calculating new calibrations.
calib.enter_calibration_mode()
Leave Calibration Mode
Leaves the Calibration Mode.
calib.leave_calibration_mode()
Collect Data
Starts collecting data for a calibration point. The argument used is the point the calibration user is assumed to be looking at and is given in the HMD coordinate system. Parameters: coordinates (x, y, x) of the calibration point.
calib.collect_data(coordinates)
Compute and Apply Calibration
Uses the collected data and tries to compute calibration parameters. If the calculation is successful, the result is applied to the eye tracker. If there is insufficient data to compute a new calibration or if the collected data is not good enough then calibration is failed and will not be applied.
Returns: an instance of the class HMDCalibrationResult
calib.compute_and_apply()
Code Example
%% HMD Calibration Sample Tobii = EyeTrackingOperations(); eyetracker_address = 'Address of the desired device'; % Example: % eyetracker_address = 'tobii-ttp://VRG02-010107022072'; try eyetracker = Tobii.get_eyetracker(eyetracker_address); catch ME if (strcmp(ME.identifier,'EyeTrackerGet:error204')) fprintf('Unable to connect eye tracker.\n'); return end end try calib = HMDBasedCalibration(eyetracker); catch ME fprintf(ME.message) return; end calib.enter_calibration_mode() points_to_collect = [[0,0,100];[0,20,100];[20,0,100]]; % When collecting data a point should be presented on the HMD in the % appropriate position. for i=1:size(points_to_collect,1) collect_result = calib.collect_data(points_to_collect(i,:)); fprintf('Point [%.2f,%.2f,%2f] Collect Result: %s\n',points_to_collect(i,:),string(collect_result)); end calibration_result = calib.compute_and_apply(); fprintf('Calibration Status: %s\n',char(calibration_result.Status)); if calibration_result.Status == CalibrationStatus.Success % Add when we have a calibration result. end calib.leave_calibration_mode()
See Also
Eyetracker, HMDCalibrationResult, CalibrationStatus
Version
1.10.1.24
COPYRIGHT 2022 - PROPERTY OF TOBII PRO AB Copyright 2022 TOBII PRO AB - KARLSROVAGEN 2D, DANDERYD 182 53, SWEDEN - All Rights Reserved.
Copyright NOTICE: All information contained herein is, and remains, the property of Tobii Pro AB and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to Tobii Pro AB and its suppliers and may be covered by U.S.and Foreign Patents, patent applications, and are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from Tobii Pro AB.