1. Introduction
A continuous gaze stream from a webcam-based tracker is not directly interpretable as a sequence of meaningful eye movements: it must first be segmented into blinks (the eye is closed and no fixation can be occurring), fixations (the gaze is held, within tolerance, at one location), and saccades (the gaze is moving rapidly between fixations, too fast for visual processing to occur). This paper documents the two real-time classifiers the platform applies to this end — a gap-based blink detector and a dispersion-threshold (I-DT) fixation classifier — and the specific adaptations each required to operate on a calibrated webcam gaze stream rather than the raw, uncalibrated pupil signal such algorithms are more commonly described against in the literature.
2. Blink Detection
2.1 Why gap-based rather than Eye-Aspect-Ratio-based
A widely used blink-detection technique computes the Eye Aspect Ratio (EAR) — the ratio of eyelid height to eye width from facial landmarks — and flags a blink when EAR drops below a threshold (the platform uses 0.20, against an open-eye EAR typically in the 0.40–0.60 range and a closed-eye EAR typically 0.03–0.12). This technique requires the face mesh to be tracking reliably enough to localise eyelid landmarks even as the eye closes, which holds during the calibration phase, where the calibration engine's fallback gaze estimate can in fact return null when the iris becomes untrackable. Once a calibration model exists and gaze is being read from the platform's main pipeline, however, the corrected gaze point is by design never null — the calibrated-output contract guarantees a screen coordinate on every accepted frame, since the model interpolates across momentary tracking gaps rather than surfacing them as missing data. This guarantee makes the EAR threshold the wrong tool downstream of calibration: a more direct gap-based detector, working on data-availability gaps in the raw iris signal feeding the calibrated output, is used instead.
2.2 Gap-based detection
The platform tracks the time elapsed since the last frame in which a trackable iris signal was present. A gap of less than 100 ms is treated as normal inter-frame variation, not a blink; a gap between 100 ms and 450 ms is classified as a blink, matching the typical physiological duration of a voluntary blink; a gap exceeding 450 ms is treated as a tracking-loss event (the subject looked away, occluded their face, or the camera momentarily failed) rather than a blink, since involuntary blink duration rarely approaches half a second. A cooldown period of 400 ms after a detected blink suppresses double-counting a single blink as two events if the iris signal flickers briefly available-then-unavailable again during eye reopening.
3. Fixation Detection: Identification by Dispersion Threshold (I-DT)
3.1 Algorithm
Following Salvucci and Goldberg's (2000) Identification by Dispersion Threshold algorithm, the platform maintains a sliding window of recent gaze points and computes the window's spatial dispersion as the sum of its horizontal and vertical extent ((max_x − min_x) + (max_y − min_y)). While dispersion remains within threshold and the window duration exceeds a minimum, the points are accepted as belonging to an ongoing fixation; when a new point would push dispersion over threshold, the current fixation — if it has lasted at least the minimum duration — is committed, and the window slides forward (the oldest point is dropped, not the whole window cleared) to allow a new fixation to begin accumulating without an artificial reset delay.
3.2 Production parameters
The platform uses a dispersion threshold of 120 pixels (roughly ±60 pixels per axis around a fixation's centroid — generous enough to tolerate the residual noise of webcam-based iris tracking even after calibration) and a minimum fixation duration of 150 ms, below the typical 200–250 ms minimum duration assumed in laboratory infrared eye-tracking literature, reflecting the platform's deliberately permissive stance toward shorter apparent fixations given that webcam tracking noise can itself truncate a genuine fixation's measured duration.
3.3 Capping the sliding window
A naive I-DT implementation's sliding window can grow without bound while a subject holds an unusually long, genuine fixation, and a window that has grown very large takes correspondingly long to "forget" the fixation once gaze actually moves — the next several genuinely new fixation points are still compared against a dispersion baseline dominated by the long-since-ended fixation, delaying detection of the saccade that ended it. The platform caps the I-DT window at 600 ms specifically to bound this effect: reading studies rarely produce single fixations meaningfully longer than this, so capping the window at a duration unlikely to be exceeded by a genuine single fixation, while still well above the 150 ms minimum-duration threshold, prevents one unusually long fixation from absorbing the saccade that follows it without materially affecting the classification of ordinary, shorter fixations.
4. Saccade Classification
A movement between two consecutive accepted gaze samples is classified as a saccade when its velocity (Euclidean pixel distance divided by elapsed time) exceeds 5 px/ms, evaluated only when the inter-sample gap is itself below 200 ms (beyond which velocity computed across the gap would conflate true saccade speed with an unrelated tracking interruption). This saccade classification is reported as a count rather than feeding directly into a separate state machine: in this platform's pipeline, fixation detection (§3) and saccade detection operate as parallel classifiers over the same gaze stream rather than mutually exclusive states of one combined automaton, simplifying the production implementation at the cost of not formally guaranteeing that every inter-fixation interval is itself classified as exactly one saccade — an acceptable trade-off given that saccade count, not precise saccade boundary timing, is the quantity consumed downstream.
5. Discussion
The central methodological point of this paper is that established gaze-classification algorithms (EAR-based blink detection, I-DT fixation detection) are typically described and validated against either raw pupil/eyelid signals or laboratory infrared-tracker output, and porting them to a calibrated webcam pipeline requires re-examining which assumptions the algorithm depends on. The EAR-versus-gap-based blink detector choice in §2.1 is the clearest example: the standard EAR approach is not wrong, but it depends on an iris-trackability signal that the platform's own calibrated-output contract removes once a calibration model is active, making a different signal (data-availability gaps) the correct one to key the detector on at that pipeline stage.
6. Conclusion
A gap-based blink detector, parameterised to the physiological duration of voluntary blinks, and an Identification-by-Dispersion-Threshold fixation classifier, parameterised more permissively than laboratory infrared-tracker defaults and capped to prevent long fixations from absorbing the saccades that follow them, together segment the platform's calibrated webcam gaze stream into the blink/fixation/saccade primitives that every higher-level reading-behaviour metric in this platform (regression detection, dwell time, word-bias ratio) is built from.
References
- Salvucci, D. D., & Goldberg, J. H. (2000). Identifying fixations and saccades in eye-tracking protocols. Proceedings of the 2000 Symposium on Eye Tracking Research & Applications, 71–78.
- Soukupová, T., & Čech, J. (2016). Real-time eye blink detection using facial landmarks. 21st Computer Vision Winter Workshop. [Eye Aspect Ratio]
- Holmqvist, K. et al. (2011). Eye Tracking: A Comprehensive Guide to Methods and Measures. Oxford University Press. [Fixation/saccade classification survey]
Appendix A — Parameter Reference
| Parameter | Value | Purpose |
|---|---|---|
| Blink gap minimum | 100 ms | Below this, treat as normal jitter |
| Blink gap maximum | 450 ms | Above this, treat as tracking loss |
| Blink cooldown | 400 ms | Prevent double-counting one blink |
| EAR blink threshold (pre-calibration only) | 0.20 | Open ≈0.40–0.60, closed ≈0.03–0.12 |
| I-DT dispersion threshold | 120 px | Sum of x-span + y-span |
| I-DT minimum fixation duration | 150 ms | |
| I-DT maximum window | 600 ms | Caps long-fixation saccade-absorption |
| Saccade velocity threshold | 5 px/ms | |
| Saccade max valid gap | 200 ms | Avoids velocity-across-dropout artefacts |
Appendix B — I-DT Pseudocode
window = []
for point in gazeStream:
window.append(point)
while window.duration() > MAX_WINDOW_MS:
window.popOldest()
dispersion = (max(window.x) - min(window.x)) + (max(window.y) - min(window.y))
if dispersion <= DISPERSION_THRESHOLD:
if not inFixation:
fixationStart = window.oldest().t
inFixation = true
else:
if inFixation and (now - fixationStart) >= MIN_DURATION:
commitFixation(fixationStart, now)
inFixation = false
window.popOldest()