Turns a phone video of the eyes into a nystagmus and saccade recording.
Research prototype. Not a medical device and not for diagnosis.
1Load a video of the eyes
Record with the phone camera or pick a clip you already have. The video is read in this page and never uploaded.
No calibration: degrees use the population average iris and eye size. Record the gaze holding task to calibrate this person.
2Mark the eye
Tap the center of one iris, then a fixed point on the face such as a sticker on the nose bridge. The other eye is optional.
Synthetic eye
Marking both eyes adds the adducting to abducting velocity ratio used for internuclear ophthalmoplegia.
3Read the recording
Synthetic eye with right-beating nystagmus built in at 6°/s and 2.5 beats/s.
Tracking the sample...
Horizontal, up is the patient's rightVertical, up is upFast phase or saccadeTarget, dashed
Measure
Value
Basis
Recording check
Trials
Fast events
Time (s)
Type
Direction
Size (°)
Peak (°/s)
How these numbers are computed
Each frame, the iris is found as the darkest disk against a brighter surround, then refined to sub-pixel accuracy from the centroid of its dark pixels. Frames where iris contrast drops below 45% of the first frame count as blinks.
When a fixed point is marked, it is followed by template matching and subtracted, which removes head movement.
Pixels become degrees by assuming an 11.7 mm iris and a 12 mm eye radius. Treat degrees as approximate until checked against a lab tracker.
A fast event is any stretch where speed exceeds the larger of 20°/s and the median speed plus six robust standard deviations.
Nystagmus is called when at least three fast phases go one way (70% agreement) and the median slow phase velocity between them is at least 2°/s the other way.
Square wave jerks are opposite horizontal saccade pairs of 0.5° to 5°, similar in size, 150 to 500 ms apart.
Timed tasks are lined up with the stimulus by its three start beeps, found in the clip's sound. Each saccade is fitted with a smooth S-shaped (tanh) curve, after Lai et al. (IEEE JBHI 2020). Latency runs from the target step to where the curve has covered 3% of its jump, which places onset between frames, and includes the stimulus screen's display delay. Responses under 80 ms count as anticipatory.
The fit is each trial's quality score: trials with R² under 0.9, or a fit error over 10% of the saccade, are left out and listed as rejected. Saccade gain is the fitted amplitude divided by the target step. An antisaccade error is a first saccade toward the cue.
The recording check grades lighting (grey level of the eye region), reflections and glasses glare (saturated pixels), iris size, iris contrast, frame timing and the share of frames tracked.
The gaze holding task measures how far the eye turns for each target. Applied as a calibration, those horizontal and vertical gains rescale this person's other clips to their own eye.
The BIDS export follows Eye-Tracking-BIDS (BIDS 1.11): one physio file per eye with its sidecar, an events file with saccades, tracking loss and stimulus steps, and the measures as a derivative.
Pursuit gain is the amplitude of eye velocity at the target frequency, fitted with catch-up saccades removed, divided by target velocity. Catch-up saccades are found on eye velocity minus that fit.
Optokinetic gain is slow phase velocity divided by stripe speed; asymmetry is (right − left) ÷ (right + left).
Positional nystagmus is followed in 2 s windows every 0.5 s; onset, duration, peak slow phase velocity and time to half the peak are reported for each position.
With both eyes marked, the adducting to abducting ratio is the median ratio of each eye's peak horizontal velocity across saccades of 2° or more.
Torsional nystagmus is not measured. Below about 240 fps, peak speeds read low and brief saccades can be missed.
Algorithm version . It is written into every saved file so a study can lock one version.
Stimulus screen
Run this on a laptop or tablet at eye level, 50 to 70 cm from the patient, while a phone records their eyes with sound on. Each task starts with three beeps that let the analysis line the clip up with the targets.
Ready
Recording a clip that tracks well
Light the face evenly from the front. A window or lamp behind the patient hides the iris edge.
Put the phone on a stand 15 to 25 cm from the face, just below the line of sight, with both eyes filling most of the frame.
Put a small dark dot sticker on the bridge of the nose and mark it as the fixed point, so head movement cancels out.
For every task except free recording, run the Stimulus tab on a second device 50 to 70 cm away. Enter its screen width and distance so targets land at known angles, and note the target amplitude it shows.
Start the phone recording with sound on, then press Start task. The three beeps mark the start; keep the room quiet for them.
Use slow motion (120 or 240 fps) when saccade speed matters, and set Capture speed to match. Normal video is enough for nystagmus, fixation, gaze holding, pursuit and optokinetic tasks.
In Analyze, choose the same task, check the amplitude, and press Find the start beep. If the beep cannot be found, type the time it sounds in the clip.
The battery
Fixation, 15 s
Square wave jerks per minute, drift, fixation stability, primary position nystagmus.
Gaze holding, 10 s each way
Drift toward center, beat direction and frequency in each position, and an eye position gain that checks the degree scale for this person.
Prosaccades
Latency, gain and peak velocity per trial. Peak velocity needs 240 fps.
Antisaccades
Look away from the dot, the same distance on the other side. Direction error rate, corrected errors, latency of correct responses.
Smooth pursuit, 0.4 Hz
Velocity gain, lag behind the target, catch-up saccades per second.
Optokinetic, right then left
Slow phase velocity, gain and asymmetry between directions.
Positional
The screen guides the examiner through Dix-Hallpike and supine roll tests with a beep at each step. Onset, direction, duration, peak slow phase velocity and fading for each position.
What the measures mean
Slow phase velocity
Speed of the drift between beats, in degrees per second. The 2°/s cutoff for calling nystagmus follows the threshold used to validate the Johns Hopkins EyePhone app against video goggles.
Beat frequency
Fast phases per second in the dominant direction. The fast phase direction names the nystagmus.
Square wave jerks
Small paired saccades away from and back to the target during fixation. Rates rise in some cerebellar and basal ganglia disorders, so read them only from fixation recordings.
Frames tracked
Share of frames where the iris was found. Blinks and glare lower it.