03-30-2022, 04:56 AM
Why calibration is important
Calibration is a critical step in all eye tracking research, but it is often poorly understood. Many researchers have questions such as "How often should I calibrate?" and "What makes a calibration "good"? The aim of this post is to explain how the calibration process works, and its critical role in determining the spatial accuracy of your data.
How does calibration work?
Pupil-CR Tracking
Many modern eye trackers employ a "Pupil-CR" approach (that is Pupil minus CR). For each sample, the eye tracker determines the center of the pupil and corneal reflection (CR) in the camera image (e.g. in camera sensor pixel coordinates) and subtracts the CR location from the pupil location. The rationale for this approach, and how it allows rotations of the eye to be distinguished from head movements, is covered briefly in our "How EyeLinks Work" webinar. As far as the calibration process is concerned, the key point to understand is that this Pupil-CR data (also known as "raw" data) is one of the inputs to the calibration process. The other input is the location of the calibration targets in screen pixel coordinates. Both of the inputs are actually shown in the Host PC software during the calibration process:
The "D" symbol that represents the eye location during the calibration process (and the + symbols it leaves behind for each target location) is a representation of the P-CR data in camera sensor coordinate space, This is why their location on the calibration screen can appear somewhat arbitrary. What is critical (as we will see later) is that the pattern of +s reflects the pattern of the calibration targets.
Mapping Functions
The key purpose of the calibration process is to define a “mapping function” that allows the eye tracker to turn information about the location of the centers of the pupil and corneal reflection (in camera sensor pixel co-ordinates) into the location of gaze (e.g. where the participant is looking) in display screen pixel co-ordinates. At its heart this involves building a regression model that allows one to be predicted from the other.
Most researchers are familiar with the basic linear regression equation of y=mx+c – an equation that, for example, would allow us to predict a person’s height (y) from their shoe size (x) by multiplying shoe size by one parameter (m) and adding an offset (c ). We may only have height data from people with shoe sizes of 5,7,9 and 11, but from the equation describing the best fit line through the data, we can clearly predict the height of someone with a shoe size of 8 - as illustrated in the image below.
Similarly, whilst we only calibrate a limited number of known screen locations (typically 3,5,9 or 13 points), building a calibration model allows us to predict gaze location across the whole screen - just as we can predict height for all shoe sizes despite only a sampling a limited number of them.
As an example, if we just take the horizontal dimension, imagine placing calibration targets at x= 80, 960, and 1840 (eg the left, middle and right of a 1920 pixel wide screen. If we record the raw Pupil-CR data while the participant attempts to fixate the three targets, we may get (average) P_CR values of -8000, -2000 and 4000. So we have screen pixel (x) coordinates of 80,960 and 1840, and camera sensor (x) coordinates of -8000, -2000 and 4000. From these values its very straightforward to build a simple regression equation that allows us to predict the x coordinate of gaze in screen pixels from any camera sensor x coordinate:
screen pixel (x) = Raw (x) * 0.147 + 1253.
So a raw P-CR value of 1000 would give a screen pixel value of (1000*.147)+1253 = 1107.
Of course the actual maths for creating a two dimensional regression model is a lot more complicated (and non-linear) than the basic regression equation used here, but the same basic principles apply. When you calibrate an EyeLink eye tracker, you are essentially building a mathematical model that allows gaze location in screen pixel co-ordinates to be predicted from the Pupil-CR data in camera sensor co-ordinates.
This is why calibration is so important - one of the most important properties of your gaze data (where on the screen the eye tracker says the person is looking at any given point in time) is entirely the product of the calibration model. In short, poor calibration models can give inaccurate estimates of gaze location.
What makes a good calibration model?
In brief, a good calibration model is one that provides an accurate prediction of the location of gaze in screen pixel coordinates across the entire calibrated space. In other words if you placed a target at a known (non calibrated location) such as 712,384 and asked the participant to look at it, the eye tracker should give gaze values that are close to 712,384. One of the key determinants of a good calibration model is the symmetricality of the P-CR input. Examples of good (symmetrical) and bad (asymmetrical) calibration grids are illustrated below.
Symmetricality in the P-CR data is important because it reduces the impact of non-linearities in the calibration model. The calibration model can cope with small non-linearities in the P-CR data, but large ones can result in unwanted distortions in the calibrated space.
By far the most common cause of asymmetrical calibration grids is a suboptimal physical setup - the geometrical relationship between the camera, screen and participant. Most often the screen is placed too close to the participant, forcing them to rotate their eyes beyond the trackable range of the camera. This can distort the shape of the corneal reflection, resulting in inappropriate P-CR values and "outliers" in the calibration grid - most commonly for one or both of the top corners. The issue is illustrated below - the screen shot shows a participant trying to fixate the top right calibration target. Note the location of the "D" symbol that reflects the P-CR data and potential for CR smearing.
For further information about optimal physical set ups, and the importance of making sure that the calibrated area does not exceed the trackable range, please see the following posts:
EyeLink 1000 Plus Setup / Usage Video Tutorials
EyeLink Portable Duo Setup / Usage Video Tutorials
What is the "trackable range" and why is it important?
Calibration Tips
Beyond having an optimal physical set up, the following tips and tricks can all help to ensure good calibrations:
Calibration is a critical step in all eye tracking research, but it is often poorly understood. Many researchers have questions such as "How often should I calibrate?" and "What makes a calibration "good"? The aim of this post is to explain how the calibration process works, and its critical role in determining the spatial accuracy of your data.
How does calibration work?
Pupil-CR Tracking
Many modern eye trackers employ a "Pupil-CR" approach (that is Pupil minus CR). For each sample, the eye tracker determines the center of the pupil and corneal reflection (CR) in the camera image (e.g. in camera sensor pixel coordinates) and subtracts the CR location from the pupil location. The rationale for this approach, and how it allows rotations of the eye to be distinguished from head movements, is covered briefly in our "How EyeLinks Work" webinar. As far as the calibration process is concerned, the key point to understand is that this Pupil-CR data (also known as "raw" data) is one of the inputs to the calibration process. The other input is the location of the calibration targets in screen pixel coordinates. Both of the inputs are actually shown in the Host PC software during the calibration process:
The "D" symbol that represents the eye location during the calibration process (and the + symbols it leaves behind for each target location) is a representation of the P-CR data in camera sensor coordinate space, This is why their location on the calibration screen can appear somewhat arbitrary. What is critical (as we will see later) is that the pattern of +s reflects the pattern of the calibration targets.
Mapping Functions
The key purpose of the calibration process is to define a “mapping function” that allows the eye tracker to turn information about the location of the centers of the pupil and corneal reflection (in camera sensor pixel co-ordinates) into the location of gaze (e.g. where the participant is looking) in display screen pixel co-ordinates. At its heart this involves building a regression model that allows one to be predicted from the other.
Most researchers are familiar with the basic linear regression equation of y=mx+c – an equation that, for example, would allow us to predict a person’s height (y) from their shoe size (x) by multiplying shoe size by one parameter (m) and adding an offset (c ). We may only have height data from people with shoe sizes of 5,7,9 and 11, but from the equation describing the best fit line through the data, we can clearly predict the height of someone with a shoe size of 8 - as illustrated in the image below.
Similarly, whilst we only calibrate a limited number of known screen locations (typically 3,5,9 or 13 points), building a calibration model allows us to predict gaze location across the whole screen - just as we can predict height for all shoe sizes despite only a sampling a limited number of them.
As an example, if we just take the horizontal dimension, imagine placing calibration targets at x= 80, 960, and 1840 (eg the left, middle and right of a 1920 pixel wide screen. If we record the raw Pupil-CR data while the participant attempts to fixate the three targets, we may get (average) P_CR values of -8000, -2000 and 4000. So we have screen pixel (x) coordinates of 80,960 and 1840, and camera sensor (x) coordinates of -8000, -2000 and 4000. From these values its very straightforward to build a simple regression equation that allows us to predict the x coordinate of gaze in screen pixels from any camera sensor x coordinate:
screen pixel (x) = Raw (x) * 0.147 + 1253.
So a raw P-CR value of 1000 would give a screen pixel value of (1000*.147)+1253 = 1107.
Of course the actual maths for creating a two dimensional regression model is a lot more complicated (and non-linear) than the basic regression equation used here, but the same basic principles apply. When you calibrate an EyeLink eye tracker, you are essentially building a mathematical model that allows gaze location in screen pixel co-ordinates to be predicted from the Pupil-CR data in camera sensor co-ordinates.
This is why calibration is so important - one of the most important properties of your gaze data (where on the screen the eye tracker says the person is looking at any given point in time) is entirely the product of the calibration model. In short, poor calibration models can give inaccurate estimates of gaze location.
What makes a good calibration model?
In brief, a good calibration model is one that provides an accurate prediction of the location of gaze in screen pixel coordinates across the entire calibrated space. In other words if you placed a target at a known (non calibrated location) such as 712,384 and asked the participant to look at it, the eye tracker should give gaze values that are close to 712,384. One of the key determinants of a good calibration model is the symmetricality of the P-CR input. Examples of good (symmetrical) and bad (asymmetrical) calibration grids are illustrated below.
Symmetricality in the P-CR data is important because it reduces the impact of non-linearities in the calibration model. The calibration model can cope with small non-linearities in the P-CR data, but large ones can result in unwanted distortions in the calibrated space.
By far the most common cause of asymmetrical calibration grids is a suboptimal physical setup - the geometrical relationship between the camera, screen and participant. Most often the screen is placed too close to the participant, forcing them to rotate their eyes beyond the trackable range of the camera. This can distort the shape of the corneal reflection, resulting in inappropriate P-CR values and "outliers" in the calibration grid - most commonly for one or both of the top corners. The issue is illustrated below - the screen shot shows a participant trying to fixate the top right calibration target. Note the location of the "D" symbol that reflects the P-CR data and potential for CR smearing.
For further information about optimal physical set ups, and the importance of making sure that the calibrated area does not exceed the trackable range, please see the following posts:
EyeLink 1000 Plus Setup / Usage Video Tutorials
EyeLink Portable Duo Setup / Usage Video Tutorials
What is the "trackable range" and why is it important?
Calibration Tips
Beyond having an optimal physical set up, the following tips and tricks can all help to ensure good calibrations:
- Choose the appropriate calibration model for your task: For example for single line text reading H3 is perfect. For tasks in which single central stimuli are presented, or for horizontal / vertical saccade and pursuit tasks HV5 is ideal. HV3 or HV5 are perfect for infants / toddlers. For paragraph reading or other scenarios in which maximum accuracy across the entire screen is desired, use the HV9 or HV13 models. This thread has further advice.
- Only recalibrate if you need to: Recalibrating without any evidence that the current calibration model is inadequate simply risks replacing a perfectly good calibration model with a potentially inferior one. The following thread provides further guidance on how often to recalibrate and the use of drift checks. How often should I calibrate?
- Motivate your participant to make accurate fixations: If using the default targets tell them to look at the dot in the middle of the target.
- Do a Manual Calibration instead of an Automatic one: The Host PC defaults to automatic (the next calibration target is drawn as soon as the Host PC registers a stable fixation). This is fine when testing yourself or experienced participants, but research has shown that the manual approach (in which the spacebar is pressed for each calibration target) can deliver better results.
- Work on your timing: Don‘t press the spacebar too soon because the particpant may not have a chance to make a corrective saccade. Don‘t press the spacebar too late as the eye may begin to drift. A press every second is about right for most participants, but practice makes perfect.
- Press backspace to “undo” calibration points that aren't optimal: Backspace can be pressed repeatedly to "unwind" the calibration.
- Use animated calibration targets if working with infants / toddlers: Looming targets with a clear "center of gravity" work best. There are some good examples in this post:
Animated Calibration Targets