OcuTrace

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 right Vertical, up is up Fast phase or saccade
MeasureValueBasis
Recording check

    Fast events
    Time (s)TypeDirectionSize (°)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.