Functionality for implementing calibration.
More...
Go to the source code of this file.
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_calibration_enter_calibration_mode (TobiiResearchEyeTracker *eyetracker) |
| Enters the screen based calibration mode and the eye tracker is made ready for collecting data and calculating new calibrations. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_calibration_leave_calibration_mode (TobiiResearchEyeTracker *eyetracker) |
| Leaves the screen based calibration mode. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_calibration_collect_data (TobiiResearchEyeTracker *eyetracker, float x, float y) |
| Starts collecting data for a calibration point. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_calibration_discard_data (TobiiResearchEyeTracker *eyetracker, float x, float y) |
| Removes the collected data associated with a specific calibration point. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_calibration_compute_and_apply (TobiiResearchEyeTracker *eyetracker, TobiiResearchCalibrationResult **result) |
| Uses the collected data and tries to compute calibration parameters. More...
|
|
TOBII_RESEARCH_API void TOBII_RESEARCH_CALL | tobii_research_free_screen_based_calibration_result (TobiiResearchCalibrationResult *result) |
| Free memory allocation for the calibration result received via tobii_research_screen_based_calibration_compute_and_apply. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_monocular_calibration_collect_data (TobiiResearchEyeTracker *eyetracker, float x, float y, TobiiResearchSelectedEye eye_to_calibrate, TobiiResearchSelectedEye *collected_eyes) |
| Starts collecting data for a calibration point. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_monocular_calibration_discard_data (TobiiResearchEyeTracker *eyetracker, float x, float y, TobiiResearchSelectedEye eye_to_calibrate) |
| Removes the collected data associated with a specific calibration point. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_screen_based_monocular_calibration_compute_and_apply (TobiiResearchEyeTracker *eyetracker, TobiiResearchCalibrationResult **result) |
| Uses the collected data and tries to compute calibration parameters. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_hmd_based_calibration_enter_calibration_mode (TobiiResearchEyeTracker *eyetracker) |
| Enters the hmd based calibration mode and the eye tracker is made ready for collecting data and calculating new calibrations. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_hmd_based_calibration_leave_calibration_mode (TobiiResearchEyeTracker *eyetracker) |
| Leaves the hmd based calibration mode. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_hmd_based_calibration_collect_data (TobiiResearchEyeTracker *eyetracker, float x, float y, float z) |
| Starts collecting data for a calibration point. More...
|
|
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL | tobii_research_hmd_based_calibration_compute_and_apply (TobiiResearchEyeTracker *eyetracker, TobiiResearchHMDCalibrationResult *result) |
| Uses the collected data and tries to compute calibration parameters. More...
|
|
Functionality for implementing calibration.
- Copyright
- COPYRIGHT 2019 - PROPERTY OF TOBII PRO AB
-
2019 TOBII PRO AB - KARLSROVAGEN 2D, DANDERYD 182 53, SWEDEN - All Rights Reserved.
-
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.
◆ TobiiResearchSelectedEye
Defines the selected eye.
◆ TobiiResearchCalibrationEyeValidity
Defines the validity of calibration eye data.
Enumerator |
---|
TOBII_RESEARCH_CALIBRATION_EYE_VALIDITY_INVALID_AND_NOT_USED | The eye tracking failed or the calibration eye data is invalid.
|
TOBII_RESEARCH_CALIBRATION_EYE_VALIDITY_VALID_BUT_NOT_USED | Eye Tracking was successful, but the calibration eye data was not used in calibration e.g. gaze was too far away.
|
TOBII_RESEARCH_CALIBRATION_EYE_VALIDITY_VALID_AND_USED | The calibration eye data was valid and used in calibration.
|
TOBII_RESEARCH_CALIBRATION_EYE_VALIDITY_UNKNOWN | The calibration eye data has an unexpected validity.
|
◆ TobiiResearchCalibrationStatus
"Defines the overall status of a calibration process.
Enumerator |
---|
TOBII_RESEARCH_CALIBRATION_FAILURE | Indicates that the calibration process failed.
|
TOBII_RESEARCH_CALIBRATION_SUCCESS | Indicates that the calibration process succeeded for both eyes.
|
TOBII_RESEARCH_CALIBRATION_SUCCESS_LEFT_EYE | Indicates that the left eye calibration process succeeded.
|
TOBII_RESEARCH_CALIBRATION_SUCCESS_RIGHT_EYE | Indicates that the right eye calibration process succeeded.
|
◆ TobiiResearchSelectedEye
Defines the selected eye.
Enumerator |
---|
TOBII_RESEARCH_SELECTED_EYE_LEFT | Left Eye
|
TOBII_RESEARCH_SELECTED_EYE_RIGHT | Right Eye
|
TOBII_RESEARCH_SELECTED_EYE_BOTH | Both Eyes
|
◆ tobii_research_free_screen_based_calibration_result()
◆ tobii_research_hmd_based_calibration_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.
You must call tobii_research_screen_based_calibration_enter_calibration_mode before calling this function. This function is blocking while collecting data and may take up to 10 seconds.
- Parameters
-
eyetracker | Eye tracker object. |
x | x coordinate in the HMD coordinate system where the user is looking. |
y | y coordinate in the HMD coordinate system where the user is looking. |
z | z coordinate in the HMD coordinate system where the user is looking. |
- Returns
- A TobiiResearchStatus code.
- Examples
- hmd_calibration.c.
◆ tobii_research_hmd_based_calibration_compute_and_apply()
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.
{
#define NUM_OF_POINTS 3U
{{0.0f, 0.0f, 1000.0f}, {20.0f, 0.0f, 1000.0f}, {0.0f, 20.0f, 1000.0f}};
size_t i = 0;
for(; i < NUM_OF_POINTS; i++) {
printf(
"Show a point on screen at (%f,%f).\n", point->
x, point->
y);
sleep_ms(700);
printf(
"Collecting data at (%f,%f,%f).\n", point->
x, point->
y, point->
z);
}
}
printf("Computing and applying calibration.\n");
printf("Calibration was successful!\n");
printf("Calibration failed!\n");
}
- Parameters
-
eyetracker | Eye tracker object. |
result | Represents the result of the calculated HMD calibration. |
- Returns
- A TobiiResearchStatus code.
- Examples
- hmd_calibration.c.
◆ tobii_research_hmd_based_calibration_enter_calibration_mode()
Enters the hmd based calibration mode and the eye tracker is made ready for collecting data and calculating new calibrations.
char* serial_number = NULL;
printf("Entered calibration mode for eye tracker with serial number %s \n.", serial_number);
- Parameters
-
eyetracker | Eye tracker object. |
- Returns
- A TobiiResearchStatus code.
- Examples
- hmd_calibration.c.
◆ tobii_research_hmd_based_calibration_leave_calibration_mode()
◆ tobii_research_screen_based_calibration_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 active display area coordinate system.
You must call tobii_research_calibration_enter_calibration_mode before calling this function. This function is blocking while collecting data and may take up to 10 seconds.
{
#define NUM_OF_POINTS 5U
{{0.5f, 0.5f}, {0.1f, 0.1f}, {0.1f, 0.9f}, {0.9f, 0.1f}, {0.9f, 0.9f}};
size_t i = 0;
for(; i < NUM_OF_POINTS; i++) {
printf(
"Show a point on screen at (%f,%f).\n", point->
x, point->
y);
sleep_ms(700);
printf(
"Collecting data at (%f,%f).\n", point->
x, point->
y);
}
}
printf("Computing and applying calibration.\n");
printf(
"Compute and apply returned %i and collected at %zu points.\n", status, calibration_result->
calibration_point_count);
} else {
printf("Calibration failed!\n");
}
- Parameters
-
eyetracker | Eye tracker object. |
x | Normalized x coordinate on active display area where the user is looking. |
y | Normalized y coordinate on active display area where the user is looking. |
- Returns
- A TobiiResearchStatus code.
- Examples
- calibration.c.
◆ tobii_research_screen_based_calibration_compute_and_apply()
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.
{
#define NUM_OF_POINTS 5U
{{0.5f, 0.5f}, {0.1f, 0.1f}, {0.1f, 0.9f}, {0.9f, 0.1f}, {0.9f, 0.9f}};
size_t i = 0;
for(; i < NUM_OF_POINTS; i++) {
printf(
"Show a point on screen at (%f,%f).\n", point->
x, point->
y);
sleep_ms(700);
printf(
"Collecting data at (%f,%f).\n", point->
x, point->
y);
}
}
printf("Computing and applying calibration.\n");
printf(
"Compute and apply returned %i and collected at %zu points.\n", status, calibration_result->
calibration_point_count);
} else {
printf("Calibration failed!\n");
}
- Parameters
-
eyetracker | Eye tracker object. |
result | Represents the result of the calculated calibration. |
- Returns
- A TobiiResearchStatus code.
- Examples
- calibration.c.
◆ tobii_research_screen_based_calibration_discard_data()
Removes the collected data associated with a specific calibration point.
printf(
"Removing calibration point at (%f,%f).\n", recalibrate_point->
x, recalibrate_point->
y);
printf(
"Show a point on screen at (%f,%f).\n", recalibrate_point->
x, recalibrate_point->
y);
printf("Computing and applying calibration.\n");
printf(
"Compute and apply returned %i and collected at %zu points.\n", status, calibration_result->
calibration_point_count);
} else {
printf("Calibration failed!\n");
}
- Parameters
-
eyetracker | Eye tracker object. |
x | Normalized x coordinate of point to discard. |
y | Normalized y coordinate of point to discard. |
- Returns
- A TobiiResearchStatus code.
- Examples
- calibration.c.
◆ tobii_research_screen_based_calibration_enter_calibration_mode()
Enters the screen based calibration mode and the eye tracker is made ready for collecting data and calculating new calibrations.
char* serial_number = NULL;
printf("Entered calibration mode for eye tracker with serial number %s \n.", serial_number);
- Parameters
-
eyetracker | Eye tracker object. |
- Returns
- A TobiiResearchStatus code.
- Examples
- calibration.c, and notifications.c.
◆ tobii_research_screen_based_calibration_leave_calibration_mode()
◆ tobii_research_screen_based_monocular_calibration_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 active display area coordinate system.
You must call tobii_research_calibration_enter_calibration_mode before calling this function. This function is blocking while collecting data and may take up to 10 seconds.
- Parameters
-
eyetracker | Eye tracker object. |
x | Normalized x coordinate on active display area where the user is looking. |
y | Normalized y coordinate on active display area where the user is looking. |
eye_to_calibrate | TobiiResearchSelectedEye instance that selects for which eye to collect data for the monocular calibration. |
collected_eyes | TobiiResearchSelectedEye instance that indicates for which eyes data was collected for the monocular calibration. |
- Returns
- A TobiiResearchStatus code.
◆ tobii_research_screen_based_monocular_calibration_compute_and_apply()
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.
- Parameters
-
- Returns
- A TobiiResearchStatus code.
◆ tobii_research_screen_based_monocular_calibration_discard_data()
Removes the collected data associated with a specific calibration point.
- Parameters
-
eyetracker | Eye tracker object. |
x | Normalized x coordinate of point to discard. |
y | Normalized y coordinate of point to discard. |
eye_to_calibrate | TobiiResearchSelectedEye instance that selects for which eye to discard data for the monocular calibration. |
- Returns
- A TobiiResearchStatus code.
float y
Definition: tobii_research.h:387
TobiiResearchCalibrationStatus status
Definition: tobii_research_calibration.h:162
Definition: tobii_research.h:379
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_hmd_based_calibration_leave_calibration_mode(TobiiResearchEyeTracker *eyetracker)
Leaves the hmd based calibration mode.
float y
Definition: tobii_research.h:402
Definition: tobii_research_calibration.h:158
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_screen_based_calibration_compute_and_apply(TobiiResearchEyeTracker *eyetracker, TobiiResearchCalibrationResult **result)
Uses the collected data and tries to compute calibration parameters.
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_get_serial_number(TobiiResearchEyeTracker *eyetracker, char **serial_number)
Gets the serial number of the eye tracker. All physical eye trackers have a unique serial number.
Definition: tobii_research.h:394
float x
Definition: tobii_research.h:398
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_hmd_based_calibration_collect_data(TobiiResearchEyeTracker *eyetracker, float x, float y, float z)
Starts collecting data for a calibration point.
TOBII_RESEARCH_API void TOBII_RESEARCH_CALL tobii_research_free_string(char *str)
Free memory allocation for a string allocated by the SDK.
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_hmd_based_calibration_enter_calibration_mode(TobiiResearchEyeTracker *eyetracker)
Enters the hmd based calibration mode and the eye tracker is made ready for collecting data and calcu...
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_screen_based_calibration_collect_data(TobiiResearchEyeTracker *eyetracker, float x, float y)
Starts collecting data for a calibration point.
@ TOBII_RESEARCH_CALIBRATION_SUCCESS
Definition: tobii_research_calibration.h:34
Definition: tobii_research_calibration.h:139
float x
Definition: tobii_research.h:383
TobiiResearchCalibrationStatus status
Definition: tobii_research_calibration.h:151
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_screen_based_calibration_enter_calibration_mode(TobiiResearchEyeTracker *eyetracker)
Enters the screen based calibration mode and the eye tracker is made ready for collecting data and ca...
@ TOBII_RESEARCH_CALIBRATION_FAILURE
Definition: tobii_research_calibration.h:30
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_screen_based_calibration_leave_calibration_mode(TobiiResearchEyeTracker *eyetracker)
Leaves the screen based calibration mode.
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_screen_based_calibration_discard_data(TobiiResearchEyeTracker *eyetracker, float x, float y)
Removes the collected data associated with a specific calibration point.
TOBII_RESEARCH_API void TOBII_RESEARCH_CALL tobii_research_free_screen_based_calibration_result(TobiiResearchCalibrationResult *result)
Free memory allocation for the calibration result received via tobii_research_screen_based_calibratio...
size_t calibration_point_count
Definition: tobii_research_calibration.h:147
float z
Definition: tobii_research.h:406
@ TOBII_RESEARCH_STATUS_OK
Definition: tobii_research.h:49
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_hmd_based_calibration_compute_and_apply(TobiiResearchEyeTracker *eyetracker, TobiiResearchHMDCalibrationResult *result)
Uses the collected data and tries to compute calibration parameters.
TobiiResearchStatus
Definition: tobii_research.h:45