Tobii XR Devzone > Develop > Tobii Ocumen > Ocumen Filters > Unity/C# >

Ocumen Filters - C# API

This page outlines the C# API for Tobii Ocumen Filters.

API Overview

Functions

Freestanding callables inside the module.

Enums

Groups of related constants.

  • Aggregation - Aggregation type for calculating values within a window.
  • BlinkStatePerEye - Describes the openness of an eye in discrete steps. What exactly constitues
  • Eye - Which eye(s) to invalidate.
  • FilterError - Error type returned from filter functions.
  • LogLevel - Log level for Ocumen functions.
  • MissingValueStrategy - How to treat invalid data. Specific values can be provided in handle missing value field.
  • ResampleMethod - Method used when resampling data.
  • Scaling - Scaling for the results of the STFT with windowing functions.
  • SmoothGazeData - Which component of the gaze ray to apply smoothing to.
  • WindowingFunction - Windowing function to use for STFT calculation.

Data Structs

Composite data used by functions and methods.

Extension Methods

The SpectralRFFIPerEye and SpectralRFFIPerEyeExtended structs have extension methods to make accessing the results of FFT easier.

  • FFTLocalAngularSpeed - Returns the values of local angular speed FFT as an enumerable.
  • FFTMagnitudeLocalAngularSpeed - Returns the values of local angular speed FFT magnitude as an enumerable.

Data Structs

BinocularGaze

Gaze rays for the left and right eye.

Coordinates in here are local space of the eye tracker, relative to a fictional reference point between the eyes. To transform them to world space you need to use the CameraPose struct.

Fields

  • left - Gaze origin and direction of the left eye.
  • right - Gaze origin and direction of the right eye.

Definition

public partial struct BinocularGaze
{
    public Rayf32 left;
    public Rayf32 right;
}

BlinkState

Encodes blink states for each eye.

Fields

  • left - Left eye blink state.
  • right - Right eye blink state.

Definition

public partial struct BlinkState
{
    public BlinkStatePerEye left;
    public BlinkStatePerEye right;
}

CameraPose

View matrices of the combined camera sitting between both eyes.

Fields

  • cameraToWorldMatrix - The (assumed by non-existent) place where the camera that sits between both eyes would be. this is local-to-world, use case is to describe where head is; we expect a left-handed coordinate system; with z-axis facing forward (away) from user.

Definition

public partial struct CameraPose
{
    public Matrix4f32 cameraToWorldMatrix;
}

CatmullRomResamplingConfig

Config for resampling using a Catmull-Rom spline.

Fields

  • outputIntervalUs - The output rate of interpolated samples. Output rate = 1 / output interval. Interval is given in microseconds (µs)
  • singleEyeResampling - Allow to resample just one eye if there is not enough data for both eyes.

Definition

public partial struct CatmullRomResamplingConfig
{
    public long outputIntervalUs;
    public bool singleEyeResampling;
}

Complexf32

A complex number in Cartesian form.

Fields

  • re - Real portion of the complex number
  • im - Imaginary portion of the complex number

Definition

public partial struct Complexf32
{
    public float re;
    public float im;
}

DispersionAnglesFilterConfig

Configuration for the dispersion angle filter.

Fields

  • maxAngleForFixationsDeg - How close subsequent gaze direction vectors have to be to detect a fixation.
  • minDurationForFixationUs - How long gaze has to be within a certain direction to consider it a fixation. Duration is given in microseconds (µs)
  • maxOutliers - Maximum number of outliers allowed before a fixation is aborted.

Definition

public partial struct DispersionAnglesFilterConfig
{
    public float maxAngleForFixationsDeg;
    public long minDurationForFixationUs;
    public ulong maxOutliers;
}

EntrancePupilData

Entrance pupil data.

Fields

  • left - Left eye data.
  • right - Right eye data.

Definition

public partial struct EntrancePupilData
{
    public Vector3f32 left;
    public Vector3f32 right;
}

FixationOutput

Output for left and right eye produced by a fixation filter.

Fields

  • isFixationLeft - Whether a fixation was detected for the left eye. A value of none means that there was insufficient data to determine if a fixation happened.
  • isFixationRight - Whether a fixation was detected for the right eye. A value of none means that there was insufficient data to determine if a fixation happened.

Definition

public partial struct FixationOutput
{
    public Optionbool isFixationLeft;
    public Optionbool isFixationRight;
}

InvalidateEyeConfig

The configuration for the invalidate eyes filter.

Fields

  • eye - Which eye(s) to invalidate.

Definition

public partial struct InvalidateEyeConfig
{
    public Eye eye;
}

InvalidateNearBlinkConfig

Configuration for the invalidate near blink filter.

Fields

  • beforeUs - Inclusive time before blink to invalidate data.
  • afterUs - Inclusive time after blink to invalidate data.
  • minBlinkDurationUs - Inclusive minimum time for a blink.

Definition

public partial struct InvalidateNearBlinkConfig
{
    public long beforeUs;
    public long afterUs;
    public long minBlinkDurationUs;
}

LamThompsonCorbett1987FilterConfig

Configuration for the Lam Thompson Corbett 1987 filter.

Fields

  • loewenfeldCriterionMm - The Loewenfeld criterion to use, minimum difference in mm to consider for anisocoria.
  • ltcCriterionRatio - The Lam, Thompson & Corbett criterion to use, minimum difference in relative area to consider for anisocoria.

Definition

public partial struct LamThompsonCorbett1987FilterConfig
{
    public float loewenfeldCriterionMm;
    public float ltcCriterionRatio;
}

LogMessage

A single message recorded by our library.

Fields

  • level - The level of the message.
  • message - ASCII encoded actual message.
  • file - Our source file where this message originated from.
  • line - Line number where this message originated from.

Definition

public partial struct LogMessage
{
    public LogLevel level;
    public string message;
    public string file;
    public uint line;
}

LoggerConfiguration

Configures how logging should be handled.

Fields

  • logLevel - The minimal log level to log.
  • maxLogWaitMs - When initializing the logger, with a previous logger present, how long shall we try to wait replacing the previous logger if it is locked.

Definition

public partial struct LoggerConfiguration
{
    public LogLevel logLevel;
    public uint maxLogWaitMs;
}

Matrix4f32

A 4x4 transformation matrix.

Fields

  • m - Array member elements in column major order.

Definition

public partial struct Matrix4f32
{
    public float m0;
    public float m1;
    public float m2;
    public float m3;
    public float m4;
    public float m5;
    public float m6;
    public float m7;
    public float m8;
    public float m9;
    public float m10;
    public float m11;
    public float m12;
    public float m13;
    public float m14;
    public float m15;
}

NearBlinkOutput

Value indicating blink or near blink.

Fields

  • left - Value indicating if the left eye is a blink or near blink.
  • right - Value indicating if the right eye is a blink or near blink.

Definition

public partial struct NearBlinkOutput
{
    bool left;
    bool right;
}

NoiseConfig

Configuration for noise filter.

Fields

  • seed - The seed to use for predictable results. If set to 0 a random seed will be generated instead.
  • meanOrigin - The mean of the normal distribution for the origin of the ray.
  • meanDirection - The mean of the normal distribution for the direction of the ray.
  • stdDevOrigin - The standard deviation of the normal distribution for the origin of the ray. Recommended value is 0.02
  • stdDevDirection - The standard deviation of the normal distribution for the direction of the ray. Recommended value is 0.05

Definition

public partial struct NoiseConfig
{
    public ulong seed;
    public float meanOrigin;
    public float meanDirection;
    public float stdDevOrigin;
    public float stdDevDirection;
}

Point2f32

A point in 2D space.

Fields

  • x - x component.
  • y - y component.

Definition

public partial struct Point2f32
{
    public float x;
    public float y;
}

Point3f32

A point in 3D space.

Fields

  • x - x component.
  • y - y component.
  • z - z component.

Definition

public partial struct Point3f32
{
    public float x;
    public float y;
    public float z;
}

PositionGuide

The 2D position of the eyes in the headset.

Fields

  • left - X and Y position of left eye.
  • right - X and Y position of right eye.

Definition

public partial struct PositionGuide
{
    public Point2f32 left;
    public Point2f32 right;
}

PupilOutput

Output for Lam Thompson Corbett pupil filter.

Fields

  • differenceMm - The observed size difference in mm. A value of none means that the value couldn’t be calculated due to one or both eyes not having valid data.
  • loewenfeldAnisocoria - Was a pupillary inequality of at least “loewenfeld criterion” mm observed? A value of none means that the value couldn’t be calculated due to one or both eyes not having valid data.
  • ltcAnisocoria - Was an inequality of “ltc criterion ratio” % surface area observed? A value of none means that the value couldn’t be calculated due to one or both eyes not having valid data.
  • left - Left eye. A value of none means that the value couldn’t be calculated due to one or both eyes not having valid data.
  • right - Right eye. A value of none means that the value couldn’t be calculated due to one or both eyes not having valid data.

Definition

public partial struct PupilOutput
{
    public Optionf32 differenceMm;
    public Optionbool loewenfeldAnisocoria;
    public Optionbool ltcAnisocoria;
    public OptionPupilPerEye left;
    public OptionPupilPerEye right;
}

PupilPerEye

Per eye data for pupil filter output.

Fields

  • pupilAreaMm2 - Computed pupil area.

Definition

public partial struct PupilPerEye
{
    public float pupilAreaMm2;
}

PupilSizeAbsolute

Pupil diameter in millimeters for both eyes.

Fields

  • left - Left eye pupil diameter.
  • right - Right eye pupil diameter.

Definition

public partial struct PupilSizeAbsolute
{
    public PupilSizePerEye left;
    public PupilSizePerEye right;
}

PupilSizePerEye

Pupil diameter for the eye

Fields

  • sizeMm - Pupil diameter in millimeters for the eye.

Definition

public partial struct PupilSizePerEye
{
    public float sizeMm;
}

Rayf32

A ray with an origin and direction.

Fields

  • origin - Origin of the ray.
  • direction - Direction of the ray.

Definition

public partial struct Rayf32
{
    public Point3f32 origin;
    public Vector3f32 direction;
}

SaccadeOutput

Output for left and right eye produced by a saccade filter.

Fields

  • isSaccadeLeft - Whether a saccade was detected on left eye data. A value of none means that there was insufficient data to determine if a saccade happened.
  • isSaccadeRight - Whether a saccade was detected on right eye data. A value of none means that there was insufficient data to determine if a saccade happened.

Definition

public partial struct SaccadeOutput
{
    public Optionbool isSaccadeLeft;
    public Optionbool isSaccadeRight;
}

SavitzkyGolaySmoothingConfig

Config for smoothing using fitted Savitzky Golay polynomial functions.

Fields

  • polynomialDegree - The order of the polynomial function to fit in the window.
  • halfWindowSize - The number of additional samples on either side of the target sample to use when fitting a polynomial curve. Total window size = 2 * half_window_size + 1 and it must be greater than the polynomial_degree.
  • smoothGaze - Select what part of the eye tracking data to smooth: gaze direction, origin or both

Definition

public partial struct SavitzkyGolaySmoothingConfig
{
    public ulong polynomialDegree;
    public ulong halfWindowSize;
    public SmoothGazeData smoothGaze;
}

SmeetsHoogeFilterConfig

Configuration for the Smeets Hooge filter.

Fields

  • lowerThresholdDegPerSec - The velocity threshold for detecting a saccade.
  • fixationSigmaThreshold - How many standard deviations from mean fixation velocity to detect onset and offset of a saccade
  • fixationVelocityWindowStartUs - The time before the saccade peak to start calculating average fixation velocity. Duration is given in microseconds (µs)
  • fixationVelocityWindowSizeUs - The size of the window used to compute the average velocity of the fixation preceding the saccade. Duration is given in microseconds (µs)
  • fixationVelocityMinimumDegPerSec - The minimal velocity to use as threshold for detecting onset and offset of saccades. Low noise in the preceding fixation can result in a low threshold for the saccade offset, preventing its detection. This setting safeguards against such effects by ensuring a minimum threshold.
  • earlyPeakLimit - If the velocity peak appears before this normalized time within the saccade, the saccade is discarded.
  • latePeakLimit - If the velocity peak appears after this normalized time within the saccade, the saccade is discarded.

Definition

public partial struct SmeetsHoogeFilterConfig
{
    public float lowerThresholdDegPerSec;
    public float fixationSigmaThreshold;
    public long fixationVelocityWindowStartUs;
    public long fixationVelocityWindowSizeUs;
    public float fixationVelocityMinimumDegPerSec;
    public float earlyPeakLimit;
    public float latePeakLimit;
}

SpectralRFFIPerEye

Output for Short-time Fourier transform for the gaze local velocities per eye

Fields

  • fftMagnitudeLocalAngularSpeed - Magnitude for frequency components for local angular speed.
  • fftLocalAngularSpeed - Frequency components for local angular speed.

Definition

public partial struct SpectralRFFIPerEye
{
    public float fftMagnitudeLocalAngularSpeed0;
    public float fftMagnitudeLocalAngularSpeed1;
    public float fftMagnitudeLocalAngularSpeed2;
    public float fftMagnitudeLocalAngularSpeed3;
    public float fftMagnitudeLocalAngularSpeed4;
    public float fftMagnitudeLocalAngularSpeed5;
    public float fftMagnitudeLocalAngularSpeed6;
    public float fftMagnitudeLocalAngularSpeed7;
    public float fftMagnitudeLocalAngularSpeed8;
    public float fftMagnitudeLocalAngularSpeed9;
    public float fftMagnitudeLocalAngularSpeed10;
    public float fftMagnitudeLocalAngularSpeed11;
    public float fftMagnitudeLocalAngularSpeed12;
    public float fftMagnitudeLocalAngularSpeed13;
    public float fftMagnitudeLocalAngularSpeed14;
    public float fftMagnitudeLocalAngularSpeed15;
    public float fftMagnitudeLocalAngularSpeed16;
    public float fftMagnitudeLocalAngularSpeed17;
    public float fftMagnitudeLocalAngularSpeed18;
    public float fftMagnitudeLocalAngularSpeed19;
    public float fftMagnitudeLocalAngularSpeed20;
    public float fftMagnitudeLocalAngularSpeed21;
    public float fftMagnitudeLocalAngularSpeed22;
    public float fftMagnitudeLocalAngularSpeed23;
    public float fftMagnitudeLocalAngularSpeed24;
    public float fftMagnitudeLocalAngularSpeed25;
    public float fftMagnitudeLocalAngularSpeed26;
    public float fftMagnitudeLocalAngularSpeed27;
    public float fftMagnitudeLocalAngularSpeed28;
    public float fftMagnitudeLocalAngularSpeed29;
    public float fftMagnitudeLocalAngularSpeed30;
    public float fftMagnitudeLocalAngularSpeed31;
    public Complexf32 fftLocalAngularSpeed0;
    public Complexf32 fftLocalAngularSpeed1;
    public Complexf32 fftLocalAngularSpeed2;
    public Complexf32 fftLocalAngularSpeed3;
    public Complexf32 fftLocalAngularSpeed4;
    public Complexf32 fftLocalAngularSpeed5;
    public Complexf32 fftLocalAngularSpeed6;
    public Complexf32 fftLocalAngularSpeed7;
    public Complexf32 fftLocalAngularSpeed8;
    public Complexf32 fftLocalAngularSpeed9;
    public Complexf32 fftLocalAngularSpeed10;
    public Complexf32 fftLocalAngularSpeed11;
    public Complexf32 fftLocalAngularSpeed12;
    public Complexf32 fftLocalAngularSpeed13;
    public Complexf32 fftLocalAngularSpeed14;
    public Complexf32 fftLocalAngularSpeed15;
    public Complexf32 fftLocalAngularSpeed16;
    public Complexf32 fftLocalAngularSpeed17;
    public Complexf32 fftLocalAngularSpeed18;
    public Complexf32 fftLocalAngularSpeed19;
    public Complexf32 fftLocalAngularSpeed20;
    public Complexf32 fftLocalAngularSpeed21;
    public Complexf32 fftLocalAngularSpeed22;
    public Complexf32 fftLocalAngularSpeed23;
    public Complexf32 fftLocalAngularSpeed24;
    public Complexf32 fftLocalAngularSpeed25;
    public Complexf32 fftLocalAngularSpeed26;
    public Complexf32 fftLocalAngularSpeed27;
    public Complexf32 fftLocalAngularSpeed28;
    public Complexf32 fftLocalAngularSpeed29;
    public Complexf32 fftLocalAngularSpeed30;
    public Complexf32 fftLocalAngularSpeed31;
}

SpectralRFFIPerEyeExtended

Output for Short-time Fourier transform for the gaze local velocities with extended window per eye

Fields

  • fftMagnitudeLocalAngularSpeed - Magnitude for frequency components for local angular speed.
  • fftLocalAngularSpeed - Frequency components for local angular speed.

Definition

public partial struct SpectralRFFIPerEyeExtended
{
    public float fftMagnitudeLocalAngularSpeed0;
    public float fftMagnitudeLocalAngularSpeed1;
    public float fftMagnitudeLocalAngularSpeed2;
    public float fftMagnitudeLocalAngularSpeed3;
    public float fftMagnitudeLocalAngularSpeed4;
    public float fftMagnitudeLocalAngularSpeed5;
    public float fftMagnitudeLocalAngularSpeed6;
    public float fftMagnitudeLocalAngularSpeed7;
    public float fftMagnitudeLocalAngularSpeed8;
    public float fftMagnitudeLocalAngularSpeed9;
    public float fftMagnitudeLocalAngularSpeed10;
    public float fftMagnitudeLocalAngularSpeed11;
    public float fftMagnitudeLocalAngularSpeed12;
    public float fftMagnitudeLocalAngularSpeed13;
    public float fftMagnitudeLocalAngularSpeed14;
    public float fftMagnitudeLocalAngularSpeed15;
    public float fftMagnitudeLocalAngularSpeed16;
    public float fftMagnitudeLocalAngularSpeed17;
    public float fftMagnitudeLocalAngularSpeed18;
    public float fftMagnitudeLocalAngularSpeed19;
    public float fftMagnitudeLocalAngularSpeed20;
    public float fftMagnitudeLocalAngularSpeed21;
    public float fftMagnitudeLocalAngularSpeed22;
    public float fftMagnitudeLocalAngularSpeed23;
    public float fftMagnitudeLocalAngularSpeed24;
    public float fftMagnitudeLocalAngularSpeed25;
    public float fftMagnitudeLocalAngularSpeed26;
    public float fftMagnitudeLocalAngularSpeed27;
    public float fftMagnitudeLocalAngularSpeed28;
    public float fftMagnitudeLocalAngularSpeed29;
    public float fftMagnitudeLocalAngularSpeed30;
    public float fftMagnitudeLocalAngularSpeed31;
    public float fftMagnitudeLocalAngularSpeed32;
    public float fftMagnitudeLocalAngularSpeed33;
    public float fftMagnitudeLocalAngularSpeed34;
    public float fftMagnitudeLocalAngularSpeed35;
    public float fftMagnitudeLocalAngularSpeed36;
    public float fftMagnitudeLocalAngularSpeed37;
    public float fftMagnitudeLocalAngularSpeed38;
    public float fftMagnitudeLocalAngularSpeed39;
    public float fftMagnitudeLocalAngularSpeed40;
    public float fftMagnitudeLocalAngularSpeed41;
    public float fftMagnitudeLocalAngularSpeed42;
    public float fftMagnitudeLocalAngularSpeed43;
    public float fftMagnitudeLocalAngularSpeed44;
    public float fftMagnitudeLocalAngularSpeed45;
    public float fftMagnitudeLocalAngularSpeed46;
    public float fftMagnitudeLocalAngularSpeed47;
    public float fftMagnitudeLocalAngularSpeed48;
    public float fftMagnitudeLocalAngularSpeed49;
    public float fftMagnitudeLocalAngularSpeed50;
    public float fftMagnitudeLocalAngularSpeed51;
    public float fftMagnitudeLocalAngularSpeed52;
    public float fftMagnitudeLocalAngularSpeed53;
    public float fftMagnitudeLocalAngularSpeed54;
    public float fftMagnitudeLocalAngularSpeed55;
    public float fftMagnitudeLocalAngularSpeed56;
    public float fftMagnitudeLocalAngularSpeed57;
    public float fftMagnitudeLocalAngularSpeed58;
    public float fftMagnitudeLocalAngularSpeed59;
    public float fftMagnitudeLocalAngularSpeed60;
    public float fftMagnitudeLocalAngularSpeed61;
    public float fftMagnitudeLocalAngularSpeed62;
    public float fftMagnitudeLocalAngularSpeed63;
    public float fftMagnitudeLocalAngularSpeed64;
    public float fftMagnitudeLocalAngularSpeed65;
    public float fftMagnitudeLocalAngularSpeed66;
    public float fftMagnitudeLocalAngularSpeed67;
    public float fftMagnitudeLocalAngularSpeed68;
    public float fftMagnitudeLocalAngularSpeed69;
    public float fftMagnitudeLocalAngularSpeed70;
    public float fftMagnitudeLocalAngularSpeed71;
    public float fftMagnitudeLocalAngularSpeed72;
    public float fftMagnitudeLocalAngularSpeed73;
    public float fftMagnitudeLocalAngularSpeed74;
    public float fftMagnitudeLocalAngularSpeed75;
    public float fftMagnitudeLocalAngularSpeed76;
    public float fftMagnitudeLocalAngularSpeed77;
    public float fftMagnitudeLocalAngularSpeed78;
    public float fftMagnitudeLocalAngularSpeed79;
    public float fftMagnitudeLocalAngularSpeed80;
    public float fftMagnitudeLocalAngularSpeed81;
    public float fftMagnitudeLocalAngularSpeed82;
    public float fftMagnitudeLocalAngularSpeed83;
    public float fftMagnitudeLocalAngularSpeed84;
    public float fftMagnitudeLocalAngularSpeed85;
    public float fftMagnitudeLocalAngularSpeed86;
    public float fftMagnitudeLocalAngularSpeed87;
    public float fftMagnitudeLocalAngularSpeed88;
    public float fftMagnitudeLocalAngularSpeed89;
    public float fftMagnitudeLocalAngularSpeed90;
    public float fftMagnitudeLocalAngularSpeed91;
    public float fftMagnitudeLocalAngularSpeed92;
    public float fftMagnitudeLocalAngularSpeed93;
    public float fftMagnitudeLocalAngularSpeed94;
    public float fftMagnitudeLocalAngularSpeed95;
    public float fftMagnitudeLocalAngularSpeed96;
    public float fftMagnitudeLocalAngularSpeed97;
    public float fftMagnitudeLocalAngularSpeed98;
    public float fftMagnitudeLocalAngularSpeed99;
    public float fftMagnitudeLocalAngularSpeed100;
    public float fftMagnitudeLocalAngularSpeed101;
    public float fftMagnitudeLocalAngularSpeed102;
    public float fftMagnitudeLocalAngularSpeed103;
    public float fftMagnitudeLocalAngularSpeed104;
    public float fftMagnitudeLocalAngularSpeed105;
    public float fftMagnitudeLocalAngularSpeed106;
    public float fftMagnitudeLocalAngularSpeed107;
    public float fftMagnitudeLocalAngularSpeed108;
    public float fftMagnitudeLocalAngularSpeed109;
    public float fftMagnitudeLocalAngularSpeed110;
    public float fftMagnitudeLocalAngularSpeed111;
    public float fftMagnitudeLocalAngularSpeed112;
    public float fftMagnitudeLocalAngularSpeed113;
    public float fftMagnitudeLocalAngularSpeed114;
    public float fftMagnitudeLocalAngularSpeed115;
    public float fftMagnitudeLocalAngularSpeed116;
    public float fftMagnitudeLocalAngularSpeed117;
    public float fftMagnitudeLocalAngularSpeed118;
    public float fftMagnitudeLocalAngularSpeed119;
    public float fftMagnitudeLocalAngularSpeed120;
    public float fftMagnitudeLocalAngularSpeed121;
    public float fftMagnitudeLocalAngularSpeed122;
    public float fftMagnitudeLocalAngularSpeed123;
    public float fftMagnitudeLocalAngularSpeed124;
    public float fftMagnitudeLocalAngularSpeed125;
    public float fftMagnitudeLocalAngularSpeed126;
    public float fftMagnitudeLocalAngularSpeed127;
    public float fftMagnitudeLocalAngularSpeed128;
    public float fftMagnitudeLocalAngularSpeed129;
    public float fftMagnitudeLocalAngularSpeed130;
    public float fftMagnitudeLocalAngularSpeed131;
    public float fftMagnitudeLocalAngularSpeed132;
    public float fftMagnitudeLocalAngularSpeed133;
    public float fftMagnitudeLocalAngularSpeed134;
    public float fftMagnitudeLocalAngularSpeed135;
    public float fftMagnitudeLocalAngularSpeed136;
    public float fftMagnitudeLocalAngularSpeed137;
    public float fftMagnitudeLocalAngularSpeed138;
    public float fftMagnitudeLocalAngularSpeed139;
    public float fftMagnitudeLocalAngularSpeed140;
    public float fftMagnitudeLocalAngularSpeed141;
    public float fftMagnitudeLocalAngularSpeed142;
    public float fftMagnitudeLocalAngularSpeed143;
    public float fftMagnitudeLocalAngularSpeed144;
    public float fftMagnitudeLocalAngularSpeed145;
    public float fftMagnitudeLocalAngularSpeed146;
    public float fftMagnitudeLocalAngularSpeed147;
    public float fftMagnitudeLocalAngularSpeed148;
    public float fftMagnitudeLocalAngularSpeed149;
    public float fftMagnitudeLocalAngularSpeed150;
    public float fftMagnitudeLocalAngularSpeed151;
    public float fftMagnitudeLocalAngularSpeed152;
    public float fftMagnitudeLocalAngularSpeed153;
    public float fftMagnitudeLocalAngularSpeed154;
    public float fftMagnitudeLocalAngularSpeed155;
    public float fftMagnitudeLocalAngularSpeed156;
    public float fftMagnitudeLocalAngularSpeed157;
    public float fftMagnitudeLocalAngularSpeed158;
    public float fftMagnitudeLocalAngularSpeed159;
    public float fftMagnitudeLocalAngularSpeed160;
    public float fftMagnitudeLocalAngularSpeed161;
    public float fftMagnitudeLocalAngularSpeed162;
    public float fftMagnitudeLocalAngularSpeed163;
    public float fftMagnitudeLocalAngularSpeed164;
    public float fftMagnitudeLocalAngularSpeed165;
    public float fftMagnitudeLocalAngularSpeed166;
    public float fftMagnitudeLocalAngularSpeed167;
    public float fftMagnitudeLocalAngularSpeed168;
    public float fftMagnitudeLocalAngularSpeed169;
    public float fftMagnitudeLocalAngularSpeed170;
    public float fftMagnitudeLocalAngularSpeed171;
    public float fftMagnitudeLocalAngularSpeed172;
    public float fftMagnitudeLocalAngularSpeed173;
    public float fftMagnitudeLocalAngularSpeed174;
    public float fftMagnitudeLocalAngularSpeed175;
    public float fftMagnitudeLocalAngularSpeed176;
    public float fftMagnitudeLocalAngularSpeed177;
    public float fftMagnitudeLocalAngularSpeed178;
    public float fftMagnitudeLocalAngularSpeed179;
    public float fftMagnitudeLocalAngularSpeed180;
    public float fftMagnitudeLocalAngularSpeed181;
    public float fftMagnitudeLocalAngularSpeed182;
    public float fftMagnitudeLocalAngularSpeed183;
    public float fftMagnitudeLocalAngularSpeed184;
    public float fftMagnitudeLocalAngularSpeed185;
    public float fftMagnitudeLocalAngularSpeed186;
    public float fftMagnitudeLocalAngularSpeed187;
    public float fftMagnitudeLocalAngularSpeed188;
    public float fftMagnitudeLocalAngularSpeed189;
    public float fftMagnitudeLocalAngularSpeed190;
    public float fftMagnitudeLocalAngularSpeed191;
    public float fftMagnitudeLocalAngularSpeed192;
    public float fftMagnitudeLocalAngularSpeed193;
    public float fftMagnitudeLocalAngularSpeed194;
    public float fftMagnitudeLocalAngularSpeed195;
    public float fftMagnitudeLocalAngularSpeed196;
    public float fftMagnitudeLocalAngularSpeed197;
    public float fftMagnitudeLocalAngularSpeed198;
    public float fftMagnitudeLocalAngularSpeed199;
    public float fftMagnitudeLocalAngularSpeed200;
    public float fftMagnitudeLocalAngularSpeed201;
    public float fftMagnitudeLocalAngularSpeed202;
    public float fftMagnitudeLocalAngularSpeed203;
    public float fftMagnitudeLocalAngularSpeed204;
    public float fftMagnitudeLocalAngularSpeed205;
    public float fftMagnitudeLocalAngularSpeed206;
    public float fftMagnitudeLocalAngularSpeed207;
    public float fftMagnitudeLocalAngularSpeed208;
    public float fftMagnitudeLocalAngularSpeed209;
    public float fftMagnitudeLocalAngularSpeed210;
    public float fftMagnitudeLocalAngularSpeed211;
    public float fftMagnitudeLocalAngularSpeed212;
    public float fftMagnitudeLocalAngularSpeed213;
    public float fftMagnitudeLocalAngularSpeed214;
    public float fftMagnitudeLocalAngularSpeed215;
    public float fftMagnitudeLocalAngularSpeed216;
    public float fftMagnitudeLocalAngularSpeed217;
    public float fftMagnitudeLocalAngularSpeed218;
    public float fftMagnitudeLocalAngularSpeed219;
    public float fftMagnitudeLocalAngularSpeed220;
    public float fftMagnitudeLocalAngularSpeed221;
    public float fftMagnitudeLocalAngularSpeed222;
    public float fftMagnitudeLocalAngularSpeed223;
    public float fftMagnitudeLocalAngularSpeed224;
    public float fftMagnitudeLocalAngularSpeed225;
    public float fftMagnitudeLocalAngularSpeed226;
    public float fftMagnitudeLocalAngularSpeed227;
    public float fftMagnitudeLocalAngularSpeed228;
    public float fftMagnitudeLocalAngularSpeed229;
    public float fftMagnitudeLocalAngularSpeed230;
    public float fftMagnitudeLocalAngularSpeed231;
    public float fftMagnitudeLocalAngularSpeed232;
    public float fftMagnitudeLocalAngularSpeed233;
    public float fftMagnitudeLocalAngularSpeed234;
    public float fftMagnitudeLocalAngularSpeed235;
    public float fftMagnitudeLocalAngularSpeed236;
    public float fftMagnitudeLocalAngularSpeed237;
    public float fftMagnitudeLocalAngularSpeed238;
    public float fftMagnitudeLocalAngularSpeed239;
    public float fftMagnitudeLocalAngularSpeed240;
    public float fftMagnitudeLocalAngularSpeed241;
    public float fftMagnitudeLocalAngularSpeed242;
    public float fftMagnitudeLocalAngularSpeed243;
    public float fftMagnitudeLocalAngularSpeed244;
    public float fftMagnitudeLocalAngularSpeed245;
    public float fftMagnitudeLocalAngularSpeed246;
    public float fftMagnitudeLocalAngularSpeed247;
    public float fftMagnitudeLocalAngularSpeed248;
    public float fftMagnitudeLocalAngularSpeed249;
    public float fftMagnitudeLocalAngularSpeed250;
    public float fftMagnitudeLocalAngularSpeed251;
    public float fftMagnitudeLocalAngularSpeed252;
    public float fftMagnitudeLocalAngularSpeed253;
    public float fftMagnitudeLocalAngularSpeed254;
    public float fftMagnitudeLocalAngularSpeed255;
    public Complexf32 fftLocalAngularSpeed0;
    public Complexf32 fftLocalAngularSpeed1;
    public Complexf32 fftLocalAngularSpeed2;
    public Complexf32 fftLocalAngularSpeed3;
    public Complexf32 fftLocalAngularSpeed4;
    public Complexf32 fftLocalAngularSpeed5;
    public Complexf32 fftLocalAngularSpeed6;
    public Complexf32 fftLocalAngularSpeed7;
    public Complexf32 fftLocalAngularSpeed8;
    public Complexf32 fftLocalAngularSpeed9;
    public Complexf32 fftLocalAngularSpeed10;
    public Complexf32 fftLocalAngularSpeed11;
    public Complexf32 fftLocalAngularSpeed12;
    public Complexf32 fftLocalAngularSpeed13;
    public Complexf32 fftLocalAngularSpeed14;
    public Complexf32 fftLocalAngularSpeed15;
    public Complexf32 fftLocalAngularSpeed16;
    public Complexf32 fftLocalAngularSpeed17;
    public Complexf32 fftLocalAngularSpeed18;
    public Complexf32 fftLocalAngularSpeed19;
    public Complexf32 fftLocalAngularSpeed20;
    public Complexf32 fftLocalAngularSpeed21;
    public Complexf32 fftLocalAngularSpeed22;
    public Complexf32 fftLocalAngularSpeed23;
    public Complexf32 fftLocalAngularSpeed24;
    public Complexf32 fftLocalAngularSpeed25;
    public Complexf32 fftLocalAngularSpeed26;
    public Complexf32 fftLocalAngularSpeed27;
    public Complexf32 fftLocalAngularSpeed28;
    public Complexf32 fftLocalAngularSpeed29;
    public Complexf32 fftLocalAngularSpeed30;
    public Complexf32 fftLocalAngularSpeed31;
    public Complexf32 fftLocalAngularSpeed32;
    public Complexf32 fftLocalAngularSpeed33;
    public Complexf32 fftLocalAngularSpeed34;
    public Complexf32 fftLocalAngularSpeed35;
    public Complexf32 fftLocalAngularSpeed36;
    public Complexf32 fftLocalAngularSpeed37;
    public Complexf32 fftLocalAngularSpeed38;
    public Complexf32 fftLocalAngularSpeed39;
    public Complexf32 fftLocalAngularSpeed40;
    public Complexf32 fftLocalAngularSpeed41;
    public Complexf32 fftLocalAngularSpeed42;
    public Complexf32 fftLocalAngularSpeed43;
    public Complexf32 fftLocalAngularSpeed44;
    public Complexf32 fftLocalAngularSpeed45;
    public Complexf32 fftLocalAngularSpeed46;
    public Complexf32 fftLocalAngularSpeed47;
    public Complexf32 fftLocalAngularSpeed48;
    public Complexf32 fftLocalAngularSpeed49;
    public Complexf32 fftLocalAngularSpeed50;
    public Complexf32 fftLocalAngularSpeed51;
    public Complexf32 fftLocalAngularSpeed52;
    public Complexf32 fftLocalAngularSpeed53;
    public Complexf32 fftLocalAngularSpeed54;
    public Complexf32 fftLocalAngularSpeed55;
    public Complexf32 fftLocalAngularSpeed56;
    public Complexf32 fftLocalAngularSpeed57;
    public Complexf32 fftLocalAngularSpeed58;
    public Complexf32 fftLocalAngularSpeed59;
    public Complexf32 fftLocalAngularSpeed60;
    public Complexf32 fftLocalAngularSpeed61;
    public Complexf32 fftLocalAngularSpeed62;
    public Complexf32 fftLocalAngularSpeed63;
    public Complexf32 fftLocalAngularSpeed64;
    public Complexf32 fftLocalAngularSpeed65;
    public Complexf32 fftLocalAngularSpeed66;
    public Complexf32 fftLocalAngularSpeed67;
    public Complexf32 fftLocalAngularSpeed68;
    public Complexf32 fftLocalAngularSpeed69;
    public Complexf32 fftLocalAngularSpeed70;
    public Complexf32 fftLocalAngularSpeed71;
    public Complexf32 fftLocalAngularSpeed72;
    public Complexf32 fftLocalAngularSpeed73;
    public Complexf32 fftLocalAngularSpeed74;
    public Complexf32 fftLocalAngularSpeed75;
    public Complexf32 fftLocalAngularSpeed76;
    public Complexf32 fftLocalAngularSpeed77;
    public Complexf32 fftLocalAngularSpeed78;
    public Complexf32 fftLocalAngularSpeed79;
    public Complexf32 fftLocalAngularSpeed80;
    public Complexf32 fftLocalAngularSpeed81;
    public Complexf32 fftLocalAngularSpeed82;
    public Complexf32 fftLocalAngularSpeed83;
    public Complexf32 fftLocalAngularSpeed84;
    public Complexf32 fftLocalAngularSpeed85;
    public Complexf32 fftLocalAngularSpeed86;
    public Complexf32 fftLocalAngularSpeed87;
    public Complexf32 fftLocalAngularSpeed88;
    public Complexf32 fftLocalAngularSpeed89;
    public Complexf32 fftLocalAngularSpeed90;
    public Complexf32 fftLocalAngularSpeed91;
    public Complexf32 fftLocalAngularSpeed92;
    public Complexf32 fftLocalAngularSpeed93;
    public Complexf32 fftLocalAngularSpeed94;
    public Complexf32 fftLocalAngularSpeed95;
    public Complexf32 fftLocalAngularSpeed96;
    public Complexf32 fftLocalAngularSpeed97;
    public Complexf32 fftLocalAngularSpeed98;
    public Complexf32 fftLocalAngularSpeed99;
    public Complexf32 fftLocalAngularSpeed100;
    public Complexf32 fftLocalAngularSpeed101;
    public Complexf32 fftLocalAngularSpeed102;
    public Complexf32 fftLocalAngularSpeed103;
    public Complexf32 fftLocalAngularSpeed104;
    public Complexf32 fftLocalAngularSpeed105;
    public Complexf32 fftLocalAngularSpeed106;
    public Complexf32 fftLocalAngularSpeed107;
    public Complexf32 fftLocalAngularSpeed108;
    public Complexf32 fftLocalAngularSpeed109;
    public Complexf32 fftLocalAngularSpeed110;
    public Complexf32 fftLocalAngularSpeed111;
    public Complexf32 fftLocalAngularSpeed112;
    public Complexf32 fftLocalAngularSpeed113;
    public Complexf32 fftLocalAngularSpeed114;
    public Complexf32 fftLocalAngularSpeed115;
    public Complexf32 fftLocalAngularSpeed116;
    public Complexf32 fftLocalAngularSpeed117;
    public Complexf32 fftLocalAngularSpeed118;
    public Complexf32 fftLocalAngularSpeed119;
    public Complexf32 fftLocalAngularSpeed120;
    public Complexf32 fftLocalAngularSpeed121;
    public Complexf32 fftLocalAngularSpeed122;
    public Complexf32 fftLocalAngularSpeed123;
    public Complexf32 fftLocalAngularSpeed124;
    public Complexf32 fftLocalAngularSpeed125;
    public Complexf32 fftLocalAngularSpeed126;
    public Complexf32 fftLocalAngularSpeed127;
    public Complexf32 fftLocalAngularSpeed128;
    public Complexf32 fftLocalAngularSpeed129;
    public Complexf32 fftLocalAngularSpeed130;
    public Complexf32 fftLocalAngularSpeed131;
    public Complexf32 fftLocalAngularSpeed132;
    public Complexf32 fftLocalAngularSpeed133;
    public Complexf32 fftLocalAngularSpeed134;
    public Complexf32 fftLocalAngularSpeed135;
    public Complexf32 fftLocalAngularSpeed136;
    public Complexf32 fftLocalAngularSpeed137;
    public Complexf32 fftLocalAngularSpeed138;
    public Complexf32 fftLocalAngularSpeed139;
    public Complexf32 fftLocalAngularSpeed140;
    public Complexf32 fftLocalAngularSpeed141;
    public Complexf32 fftLocalAngularSpeed142;
    public Complexf32 fftLocalAngularSpeed143;
    public Complexf32 fftLocalAngularSpeed144;
    public Complexf32 fftLocalAngularSpeed145;
    public Complexf32 fftLocalAngularSpeed146;
    public Complexf32 fftLocalAngularSpeed147;
    public Complexf32 fftLocalAngularSpeed148;
    public Complexf32 fftLocalAngularSpeed149;
    public Complexf32 fftLocalAngularSpeed150;
    public Complexf32 fftLocalAngularSpeed151;
    public Complexf32 fftLocalAngularSpeed152;
    public Complexf32 fftLocalAngularSpeed153;
    public Complexf32 fftLocalAngularSpeed154;
    public Complexf32 fftLocalAngularSpeed155;
    public Complexf32 fftLocalAngularSpeed156;
    public Complexf32 fftLocalAngularSpeed157;
    public Complexf32 fftLocalAngularSpeed158;
    public Complexf32 fftLocalAngularSpeed159;
    public Complexf32 fftLocalAngularSpeed160;
    public Complexf32 fftLocalAngularSpeed161;
    public Complexf32 fftLocalAngularSpeed162;
    public Complexf32 fftLocalAngularSpeed163;
    public Complexf32 fftLocalAngularSpeed164;
    public Complexf32 fftLocalAngularSpeed165;
    public Complexf32 fftLocalAngularSpeed166;
    public Complexf32 fftLocalAngularSpeed167;
    public Complexf32 fftLocalAngularSpeed168;
    public Complexf32 fftLocalAngularSpeed169;
    public Complexf32 fftLocalAngularSpeed170;
    public Complexf32 fftLocalAngularSpeed171;
    public Complexf32 fftLocalAngularSpeed172;
    public Complexf32 fftLocalAngularSpeed173;
    public Complexf32 fftLocalAngularSpeed174;
    public Complexf32 fftLocalAngularSpeed175;
    public Complexf32 fftLocalAngularSpeed176;
    public Complexf32 fftLocalAngularSpeed177;
    public Complexf32 fftLocalAngularSpeed178;
    public Complexf32 fftLocalAngularSpeed179;
    public Complexf32 fftLocalAngularSpeed180;
    public Complexf32 fftLocalAngularSpeed181;
    public Complexf32 fftLocalAngularSpeed182;
    public Complexf32 fftLocalAngularSpeed183;
    public Complexf32 fftLocalAngularSpeed184;
    public Complexf32 fftLocalAngularSpeed185;
    public Complexf32 fftLocalAngularSpeed186;
    public Complexf32 fftLocalAngularSpeed187;
    public Complexf32 fftLocalAngularSpeed188;
    public Complexf32 fftLocalAngularSpeed189;
    public Complexf32 fftLocalAngularSpeed190;
    public Complexf32 fftLocalAngularSpeed191;
    public Complexf32 fftLocalAngularSpeed192;
    public Complexf32 fftLocalAngularSpeed193;
    public Complexf32 fftLocalAngularSpeed194;
    public Complexf32 fftLocalAngularSpeed195;
    public Complexf32 fftLocalAngularSpeed196;
    public Complexf32 fftLocalAngularSpeed197;
    public Complexf32 fftLocalAngularSpeed198;
    public Complexf32 fftLocalAngularSpeed199;
    public Complexf32 fftLocalAngularSpeed200;
    public Complexf32 fftLocalAngularSpeed201;
    public Complexf32 fftLocalAngularSpeed202;
    public Complexf32 fftLocalAngularSpeed203;
    public Complexf32 fftLocalAngularSpeed204;
    public Complexf32 fftLocalAngularSpeed205;
    public Complexf32 fftLocalAngularSpeed206;
    public Complexf32 fftLocalAngularSpeed207;
    public Complexf32 fftLocalAngularSpeed208;
    public Complexf32 fftLocalAngularSpeed209;
    public Complexf32 fftLocalAngularSpeed210;
    public Complexf32 fftLocalAngularSpeed211;
    public Complexf32 fftLocalAngularSpeed212;
    public Complexf32 fftLocalAngularSpeed213;
    public Complexf32 fftLocalAngularSpeed214;
    public Complexf32 fftLocalAngularSpeed215;
    public Complexf32 fftLocalAngularSpeed216;
    public Complexf32 fftLocalAngularSpeed217;
    public Complexf32 fftLocalAngularSpeed218;
    public Complexf32 fftLocalAngularSpeed219;
    public Complexf32 fftLocalAngularSpeed220;
    public Complexf32 fftLocalAngularSpeed221;
    public Complexf32 fftLocalAngularSpeed222;
    public Complexf32 fftLocalAngularSpeed223;
    public Complexf32 fftLocalAngularSpeed224;
    public Complexf32 fftLocalAngularSpeed225;
    public Complexf32 fftLocalAngularSpeed226;
    public Complexf32 fftLocalAngularSpeed227;
    public Complexf32 fftLocalAngularSpeed228;
    public Complexf32 fftLocalAngularSpeed229;
    public Complexf32 fftLocalAngularSpeed230;
    public Complexf32 fftLocalAngularSpeed231;
    public Complexf32 fftLocalAngularSpeed232;
    public Complexf32 fftLocalAngularSpeed233;
    public Complexf32 fftLocalAngularSpeed234;
    public Complexf32 fftLocalAngularSpeed235;
    public Complexf32 fftLocalAngularSpeed236;
    public Complexf32 fftLocalAngularSpeed237;
    public Complexf32 fftLocalAngularSpeed238;
    public Complexf32 fftLocalAngularSpeed239;
    public Complexf32 fftLocalAngularSpeed240;
    public Complexf32 fftLocalAngularSpeed241;
    public Complexf32 fftLocalAngularSpeed242;
    public Complexf32 fftLocalAngularSpeed243;
    public Complexf32 fftLocalAngularSpeed244;
    public Complexf32 fftLocalAngularSpeed245;
    public Complexf32 fftLocalAngularSpeed246;
    public Complexf32 fftLocalAngularSpeed247;
    public Complexf32 fftLocalAngularSpeed248;
    public Complexf32 fftLocalAngularSpeed249;
    public Complexf32 fftLocalAngularSpeed250;
    public Complexf32 fftLocalAngularSpeed251;
    public Complexf32 fftLocalAngularSpeed252;
    public Complexf32 fftLocalAngularSpeed253;
    public Complexf32 fftLocalAngularSpeed254;
    public Complexf32 fftLocalAngularSpeed255;
}

SpectralSTFTConfig

Config for computing the Short-time Fourier transform for the gaze local velocities (STFT)

Fields

  • handleMissingStrategy - How to treat invalid data. Specific values can be provided in handle missing value field.
  • handleMissingValue - Value to use when handle missing strategy is ‘Value’. Ignore this if you’re using any other than ‘Value’ handle missing strategy.
  • windowing - The window function to use. By applying a window function, you can reduce spectral leakage, improve frequency resolution, and obtain a more accurate representation of the signal’s frequency. However, there is often a trade-off between frequency resolution and time resolution, so choosing the right window function and length depends on the specific needs.
  • stftLength - How many samples to include in the window, values must be powers of 2: [2, 4, 8, …, 256]). A longer window provides better frequency resolution but sacrifices time resolution, a shorter window offers better time resolution but reduces frequency resolution. Consider the properties of your signal and experiment with different window lengths to determine the best choice for your specific application.
  • sampleRate - Sample rate of the velocities array provided as input for the STFT.
  • scaling - Scaling for the results of the STFT with windowing functions. Scaling will be applied only when you’re using a windowing function and the result will be scaled with sqrt(1/(sum of applied window Hann/Hamming/Blackman)^2) Spectrum scaling can help you better understand the relative importance of different frequency components in your signal.
  • subtractAverages - Subtract averages for each window before performing RFFT. If velocity signal has an average different from zero, it contains a DC offset that can cause discontinuities at the edges when the signal is assumed to be periodic, which leads to spectral leakage. By subtracting the average we are removing the DC offset, ensuring that the periodic assumption holds. This leads to a cleaner and more accurate representation of the frequency content of the signal.

Definition

public partial struct SpectralSTFTConfig
{
    public MissingValueStrategy handleMissingStrategy;
    public float handleMissingValue;
    public WindowingFunction windowing;
    public ulong stftLength;
    public float sampleRate;
    public Scaling scaling;
    public bool subtractAverages;
}

SpectralSTFTOutput

Output for Short-time Fourier transform for the gaze local velocities

Fields

  • left - Left eye data.
  • right - Right eye data.

Definition

public partial struct SpectralSTFTOutput
{
    public OptionSpectralRFFIPerEye left;
    public OptionSpectralRFFIPerEye right;
}

SpectralSTFTOutputExtended

Output for Short-time Fourier transform for the gaze local velocities with extended window

Fields

  • left - Left eye data.
  • right - Right eye data.

Definition

public partial struct SpectralSTFTOutputExtended
{
    public OptionSpectralRFFIPerEyeExtended left;
    public OptionSpectralRFFIPerEyeExtended right;
}

TobiiIVTFilterConfig

Configuration for the Tobii I-VT filter.

Fields

  • detectFixationIfAngleSpeedBelowDegPerSec - Threshold at which fixation won’t be detected anymore. The recommended value is 30°/s, the value is selected to be sufficient for recordings with various levels of noise. However, modifications to this setting might be necessary for recordings and projects with very noisy data.
  • discardFixationsBelowUs - Fixations with a duration below this threshold will be discarded. Duration is given in microseconds (µs)
  • mergeAdjacentWhenGapBelowUs - Fixations separated by at most this interval that fulfill the angle threshold can be merged into one. Duration is given in microseconds (µs)
  • mergeAdjacentWhenAngleBelowDeg - Fixations with angular differences below this angle that fulfill the time gap threshold can be merged into one.
  • gapFillInInterpolationDurationBelowUs - Missing data gaps with duration below will be filled-in with interpolation data. This value should be chosen to not fill in blinks and other gaps caused by the participant or researcher. If set to 0 fill-in interpolation is disabled Duration is given in microseconds (µs)

Definition

public partial struct TobiiIVTFilterConfig
{
    public float detectFixationIfAngleSpeedBelowDegPerSec;
    public long discardFixationsBelowUs;
    public long mergeAdjacentWhenGapBelowUs;
    public float mergeAdjacentWhenAngleBelowDeg;
    public long gapFillInInterpolationDurationBelowUs;
}

Vector3f32

A 3-dimensional vector.

Fields

  • x - x component.
  • y - y component.
  • z - z component.

Definition

public partial struct Vector3f32
{
    public float x;
    public float y;
    public float z;
}

VelocityOutput

Output for left and right eye produced by velocity filters.

Fields

  • left - Velocity output for left eye. A value of none means that there was insufficient data to calculate velocity.
  • right - Velocity output for right eye. A value of none means that there was insufficient data to calculate velocity.

Definition

public partial struct VelocityOutput
{
    public OptionVelocityPerEye left;
    public OptionVelocityPerEye right;
}

VelocityPerEye

Per eye data of velocity filter output.

Fields

  • gazeDirection - Direction vector of gaze ray.
  • velocityDirection - Velocity direction vector of gaze ray.
  • localAngularSpeedDeg - Shortest path (3D angle) instantaneous speed, degrees per second.

Definition

public partial struct VelocityPerEye
{
    public Vector3f32 gazeDirection;
    public Vector3f32 velocityDirection;
    public float localAngularSpeedDeg;
}

VelocityWindowedIndicesConfig

Configuration for the windowed angular gaze velocities using indices for the window definition. Each output velocity is aggregated based on all neighboring pairs of velocities for elements between the given, relative time indices.

Fields

  • indexBefore - Index difference for the window start before currently calculated value. This value must be specified as a negative index relative to current value.
  • indexAfter - Index difference for the window end after currently calculated value. This value must be specified as a positive index relative to current value.
  • aggregation - The aggregation type for deltas within the window.

Definition

public partial struct VelocityWindowedIndicesConfig
{
    public long indexBefore;
    public long indexAfter;
    public Aggregation aggregation;
}

VelocityWindowedTimesConfig

Configuration for the windowed angular gaze velocities using times for the window definition. Each output velocity is aggregated based on all neighboring pairs of velocities for elements between the given, relative time stamps

Fields

  • timeBeforeUs - Time when the window starts before currently calculated value. This value must be specified as a negative duration in microseconds (µs).
  • timeAfterUs - Time when the window ends after currently calculated value. This value must be specified as a positive duration in microseconds (µs).
  • aggregation - The aggregation type for calculating values within the window.

Definition

public partial struct VelocityWindowedTimesConfig
{
    public long timeBeforeUs;
    public long timeAfterUs;
    public Aggregation aggregation;
}

VerifyDeltaOutput

Output from the verify delta filter.

Fields

  • count - Count of elements in time sequence that are outside of the threshold.
  • firstFoundTimeUs - Timestamp in microseconds (µs) of the first element found outside of the threshold.

Definition

public partial struct VerifyDeltaOutput
{
    public long count;
    public Optioni64 firstFoundTimeUs;
}

Version

Encodes a version number for our products, like 2.0.1.

Fields

  • major - Major component, e.g. 2.
  • minor - Minor component, e.g. 0.
  • patch - Patch component, e.g. 1.
  • build - Build ID.

Definition

public partial struct Version
{
    public byte major;
    public byte minor;
    public byte patch;
    public long build;
}

SliceBinocularGaze

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SliceBinocularGaze
{
    IntPtr data;
    ulong len;
}

SliceBlinkState

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SliceBlinkState
{
    IntPtr data;
    ulong len;
}

SliceCameraPose

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SliceCameraPose
{
    IntPtr data;
    ulong len;
}

SliceEntrancePupilData

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SliceEntrancePupilData
{
    IntPtr data;
    ulong len;
}

SliceFixationOutput

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SliceFixationOutput
{
    IntPtr data;
    ulong len;
}

SlicePositionGuide

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SlicePositionGuide
{
    IntPtr data;
    ulong len;
}

SlicePupilSizeAbsolute

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SlicePupilSizeAbsolute
{
    IntPtr data;
    ulong len;
}

SliceVelocityOutput

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct SliceVelocityOutput
{
    IntPtr data;
    ulong len;
}

Slicei64

A pointer to an array of data someone else owns which may not be modified.

Fields

  • data - Pointer to start of immutable data.
  • len - Number of elements.

Definition

public partial struct Slicei64
{
    IntPtr data;
    ulong len;
}

OptionPupilPerEye

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct OptionPupilPerEye
{
    PupilPerEye t;
    byte isSome;
}

OptionSpectralRFFIPerEye

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct OptionSpectralRFFIPerEye
{
    SpectralRFFIPerEye t;
    byte isSome;
}

OptionSpectralRFFIPerEyeExtended

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct OptionSpectralRFFIPerEyeExtended
{
    SpectralRFFIPerEyeExtended t;
    byte isSome;
}

OptionVelocityPerEye

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct OptionVelocityPerEye
{
    VelocityPerEye t;
    byte isSome;
}

Optionbool

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct Optionbool
{
    bool t;
    byte isSome;
}

Optionf32

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct Optionf32
{
    float t;
    byte isSome;
}

Optioni64

Option type containing boolean flag and maybe valid data.

Fields

  • t - Element that is maybe valid.
  • isSome - Byte where 1 means element t is valid.

Definition

public partial struct Optioni64
{
    long t;
    byte isSome;
}

Enums

Aggregation

Aggregation type for calculating values within a window.

Variants

  • Average -
  • Median -
  • Max -
  • Min -
  • AbsAverage -
  • AbsMax -
  • AbsMin -

Definition

public enum Aggregation
{
    Average = 0,
    Median = 1,
    Max = 2,
    Min = 3,
    AbsAverage = 4,
    AbsMax = 5,
    AbsMin = 6,
}

BlinkStatePerEye

Describes the openness of an eye in discrete steps. What exactly constitues and open or closed eye is hardware specific.

Variants

  • Invalid - Eye state was invalid, e.g., could not be measured.
  • Open - Eye is open.
  • Closed - Eye is closed.

Definition

public enum BlinkStatePerEye
{
    Invalid = 0,
    Open = 1,
    Closed = 2,
}

Eye

Which eye(s) to invalidate.

Variants

  • Left -
  • Right -
  • Both -

Definition

public enum Eye
{
    Left = 0,
    Right = 1,
    Both = 2,
}

FilterError

Error type returned from filter functions.

Variants

  • Ok - The function executed successfully.
  • LengthMismatch - Parameters of different lengths were passed to the function.
  • InvalidConfig - The configuration passed to the function is invalid.
  • InternalError - The function encountered an internal error.
  • InvalidTimeSequence - The time passed to the data contains an invalid sequence (e.g. not monotonic)
  • NotEnoughData - Not enough data for the function to process.
  • InvalidInputData - Invalid input data was passed to the function.

Definition

public enum FilterError
{
    Ok = 0,
    LengthMismatch = 1,
    InvalidConfig = 2,
    InternalError = 3,
    InvalidTimeSequence = 4,
    NotEnoughData = 5,
    InvalidInputData = 6,
}

LogLevel

Log level for Ocumen functions.

Variants

  • Off -
  • Error -
  • Warn -
  • Info -
  • Debug -
  • Trace -

Definition

public enum LogLevel
{
    Off = 0,
    Error = 1,
    Warn = 2,
    Info = 3,
    Debug = 4,
    Trace = 5,
}

MissingValueStrategy

How to treat invalid data. Specific values can be provided in handle missing value field.

Variants

  • Value - Provide specific value to use when handling missing value field.
  • Average - Use window average to replace missing values.

Definition

public enum MissingValueStrategy
{
    Value = 0,
    Average = 1,
}

ResampleMethod

Method used when resampling data.

Variants

  • TakeNearest - Takes the nearest value in time, or the one after if two identical.
  • TakeNearestBefore - Takes the nearest previous value.
  • TakeNearestAfter - Takes the nearest next value.
  • Interpolate - Interpolates previous and next value.

Definition

public enum ResampleMethod
{
    TakeNearest = 0,
    TakeNearestBefore = 1,
    TakeNearestAfter = 2,
    Interpolate = 3,
}

Scaling

Scaling for the results of the STFT with windowing functions.

Variants

  • NoScaling - No scaling will be applied.
  • Spectrum - ‘Spectrum’ scaling allows results to be interpreted as a magnitude spectrum. The results are scaled to sqrt(1/(sum of applied window Hann/Hamming/Blackman)^2)

Definition

public enum Scaling
{
    NoScaling = 0,
    Spectrum = 1,
}

SmoothGazeData

Which component of the gaze ray to apply smoothing to.

Variants

  • Direction - Applies smoothing only to direction.
  • Origin - Applies smoothing only to origin.
  • Both - Applies smoothing to both origin and direction.

Definition

public enum SmoothGazeData
{
    Direction = 0,
    Origin = 1,
    Both = 2,
}

WindowingFunction

Windowing function to use for STFT calculation.

Variants

  • NoFunction - No windowing function will be used
  • Hann - Hann windowing function
  • Hamming - Hamming windowing function
  • Blackman - Blackman windowing function

Definition

public enum WindowingFunction
{
    NoFunction = 0,
    Hann = 1,
    Hamming = 2,
    Blackman = 3,
}

Functions

get_version

Returns an Ocumen Filters version.

Definition

public static extern Version GetVersion();

init_logging

Initializes logging.

If you want log messages this should be called exactly once, as early as possible. Otherwise log messages inside the library will not be recorded.

Definition

public static extern void InitLogging(LoggerConfiguration config);

process_log_messages

Process all outstanding log messages.

The provided callback will be invoked with all outstanding log messages that have occurred since the last invocation.

Definition

public static extern void ProcessLogMessages(LogCallback f);
public static extern void ProcessLogMessages(IntPtr f);

Instantaneous Angular Gaze Velocities

Computes instantaneous angular gaze velocities.

The velocities are calculated to be the deltas between two adjacent frames. All angles are reported relative to the user’s ’nose vector'.

The function takes three arrays of matching timestamps, gaze and output. All arrays are required to be the same size. This function must not be used on data with non-monotonic time stamps. The result is written into the output array.

Notes

  • This filter must be used on data with monotonic time stamps.

Output

Definition

public static extern FilterError VelocityInstantaneous(Slicei64 times, SliceBinocularGaze gaze, SliceMutVelocityOutput output);
public static FilterError VelocityInstantaneous(long[] times, BinocularGaze[] gaze, VelocityOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError VelocityInstantaneous(NativeArray<long> times, NativeArray<BinocularGaze> gaze, NativeArray<VelocityOutput> output);
#endif

Windowed angular gaze velocities (index-based)

Computes index-based windowed angular gaze velocities.

This filter computes relative velocities for-and-between a series of eye tracking samples. Each output velocity is aggregated based on all neighboring pairs of velocities for elements between the given, relative indices

The function takes three arrays of matching timestamps, gaze and output. All arrays are required to be the same size. This function must not be used on data with non-monotonic time stamps. The result is written into the output array.

Notes

  • This filter must be used on data with monotonic time stamps.

VelocityWindowedIndicesConfig

  • “aggregation” - Average
  • “index after” - 0
  • “index before” - -1

Output

Definition

public static extern FilterError VelocityWindowedIndices(VelocityWindowedIndicesConfig config, Slicei64 times, SliceBinocularGaze gaze, SliceMutVelocityOutput output);
public static FilterError VelocityWindowedIndices(VelocityWindowedIndicesConfig config, long[] times, BinocularGaze[] gaze, VelocityOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError VelocityWindowedIndices(VelocityWindowedIndicesConfig config, NativeArray<long> times, NativeArray<BinocularGaze> gaze, NativeArray<VelocityOutput> output);
#endif

Windowed angular gaze velocities (time-based)

Computes time-based windowed angular gaze velocities.

This filter computes relative velocities for-and-between a series of eye tracking samples. Each output velocity is aggregated based on all neighboring pairs of velocities for elements between the given, relative time stamps

The function takes three arrays of matching timestamps, gaze and output. All arrays are required to be the same size. This function must not be used on data with non-monotonic time stamps. The result is written into the output array.

Notes

  • This filter must be used on data with monotonic time stamps.

VelocityWindowedTimesConfig

  • “aggregation” - Average
  • “time after” - 20000 µs
  • “time before” - -20000 µs

Output

Definition

public static extern FilterError VelocityWindowedTimes(VelocityWindowedTimesConfig config, Slicei64 times, SliceBinocularGaze gaze, SliceMutVelocityOutput output);
public static FilterError VelocityWindowedTimes(VelocityWindowedTimesConfig config, long[] times, BinocularGaze[] gaze, VelocityOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError VelocityWindowedTimes(VelocityWindowedTimesConfig config, NativeArray<long> times, NativeArray<BinocularGaze> gaze, NativeArray<VelocityOutput> output);
#endif

Saccade Smeets Hooge

Detects saccades, including onset and offset.

The algorithm uses absolute velocity for thresholding onset and offset of saccades and is therefore sensitive to glissades. Using a non up-sampled resolution of eye tracking data will impact accuracy of the onset and offset time of saccades.

The option to consider a direction change to signal the offset of a saccade is not part of the paper and was introduced to try to remedy this algorithms sensitivity to glissades.

The function takes a configuration for the filter, and three arrays of matching timestamps, velocities and output. All arrays are required to be the same size. This filter must not be used on data with non-monotonic time stamps. The output is written into the output array.

Notes

  • This filter must be used on data with monotonic time stamps.

SmeetsHoogeFilterConfig

  • “early peak limit” - 0.25
  • “fixation sigma threshold” - 3.0
  • “fixation velocity minimum” - 5.0 deg/s
  • “fixation velocity window size” - 100000 µs
  • “fixation velocity window start” - 200000 µs
  • “late peak limit” - 0.75
  • “lower threshold” - 75.0 deg/s

Output

References

Smeets and Hooge. Nature of Variability in Saccades. J Neurophysiol 90: 12-20, 2003.

Definition

public static extern FilterError SaccadeSmeetsHooge(SmeetsHoogeFilterConfig config, Slicei64 times, SliceVelocityOutput velocities, SliceMutSaccadeOutput output);
public static FilterError SaccadeSmeetsHooge(SmeetsHoogeFilterConfig config, long[] times, VelocityOutput[] velocities, SaccadeOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError SaccadeSmeetsHooge(SmeetsHoogeFilterConfig config, NativeArray<long> times, NativeArray<VelocityOutput> velocities, NativeArray<SaccadeOutput> output);
#endif

Saccade Non-Fixation

A simple detector that classifies everything a saccade that is not a fixation. Internally the filter invokes the given fixation filter and marks all outputs a saccade that were not marked as a fixation. This algorithm was sometimes used in slow desktop eye tracking systems, but unless you have a very special setting, you should probably not use this filter since there are many reasons why a non-fixation is not a saccade.

Notes

  • This filter must be used on data with monotonic time stamps.

Output

Definition

public static extern FilterError SaccadeNonFixation(SliceFixationOutput fixations, SliceMutSaccadeOutput output);
public static FilterError SaccadeNonFixation(FixationOutput[] fixations, SaccadeOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError SaccadeNonFixation(NativeArray<FixationOutput> fixations, NativeArray<SaccadeOutput> output);
#endif

Saccade Simple

Simple filter to compute saccades. This filter will always point to the fastest, and simplest, unspecified saccade filter available. Although no guarantees are made, this filter should give a good out-of-the-box performance if you are only interested in “detecting saccades”. We only recommend to use this filter in cases where you do not need to control which algorithm runs, and if you are fine with changing behavior between versions.

This filter must not be used on data with non-monotonic time stamps.

Notes

  • This filter must be used on data with monotonic time stamps.

Output

Definition

public static extern FilterError SaccadeSimple(Slicei64 times, SliceBinocularGaze gaze, SliceMutSaccadeOutput output);
public static FilterError SaccadeSimple(long[] times, BinocularGaze[] gaze, SaccadeOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError SaccadeSimple(NativeArray<long> times, NativeArray<BinocularGaze> gaze, NativeArray<SaccadeOutput> output);
#endif

Fixation Dispersion Angles

A white-label dispersion detector checking if gaze data is within certain thresholds.

This filter has a good balance between computational performance and accuracy and is suited for situations where eye tracking quality is good, and your primary concern is detecting periods of relative stillness. However, in situations where slow smooth pursuits dominate this filter may not produce optimal results.

The function takes a configuration for the filter, and three arrays of matching timestamps, velocities and output. The result is written into the output array. All arrays are required to be the same size.

Notes

  • This filter must be used on data with monotonic time stamps.
  • The output at position i reflects the interval between fused data i-1 and i.

DispersionAnglesFilterConfig

  • “max angle for fixations” - 3.0°
  • “max outliers” - 1
  • “min duration for fixation” - 100000 µs

Output

References

Holmqvist, K, Nyström, M, Andersson, R, Dewhurst, R, Halszka, J & van de Weijer, J 2011, Eye Tracking : A Comprehensive Guide to Methods and Measures. Oxford University Press.

Definition

public static extern FilterError FixationDispersionAngles(DispersionAnglesFilterConfig config, Slicei64 times, SliceVelocityOutput velocities, SliceMutFixationOutput output);
public static FilterError FixationDispersionAngles(DispersionAnglesFilterConfig config, long[] times, VelocityOutput[] velocities, FixationOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError FixationDispersionAngles(DispersionAnglesFilterConfig config, NativeArray<long> times, NativeArray<VelocityOutput> velocities, NativeArray<FixationOutput> output);
#endif

Fixation Tobii IVT

Fixation classification filter based on the Tobii Velocity-Threshold Identification (I-VT) algorithm. The filter classifies eye movements based on the velocity of the directional shifts of the eye. If it is below a certain threshold the sample for which the velocity is calculated is classified as a part of a fixation. There is, in this filter, no distinction between fixations and smooth pursuit. Depending on the set velocity threshold, smooth pursuits are either classified as none-fixations or fixations.

The Tobii I-VT filter is suited for situations where eye tracking quality is good, and your primary concern is detecting periods in which the eye does not move.

The function takes a configuration for the filter, and three arrays of matching timestamps, gaze, velocities and output. All arrays are required to be the same size. This filter must not be used on data with non-monotonic time stamps. The result is written into the output array.

Notes

  • This filter must be used on data with monotonic time stamps.

TobiiIVTFilterConfig

  • “detect fixation if angle speed below” - 30.0 deg/s
  • “discard fixations below” - 100000 µs
  • “gap fill in interpolation duration below” - 75000 µs
  • “merge adjacent when angle below” - 3.0°
  • “merge adjacent when gap below” - 100000 µs

Output

References

Olsen, Anneli. The Tobii I-VT fixation filter. Tobii Technology (2012): 1-21.

Definition

public static extern FilterError FixationTobiiIvt(TobiiIVTFilterConfig config, Slicei64 times, SliceVelocityOutput velocities, SliceMutFixationOutput output);
public static FilterError FixationTobiiIvt(TobiiIVTFilterConfig config, long[] times, VelocityOutput[] velocities, FixationOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError FixationTobiiIvt(TobiiIVTFilterConfig config, NativeArray<long> times, NativeArray<VelocityOutput> velocities, NativeArray<FixationOutput> output);
#endif

Fixation Simple

Simple filter to compute fixations. This filter will always point to the fastest, and simplest, unspecified fixation filter available. Although no guarantees are made, this filter should give a good out-of-the-box performance if you are only interested in “detecting fixations”. We only recommend to use this filter in cases where you do not need to control which algorithm runs, and if you are fine with changing behavior between versions.

Notes

  • This filter must be used on data with monotonic time stamps.
  • The output at position i reflects the interval between fused data i-1 and i.

Output

Definition

public static extern FilterError FixationSimple(Slicei64 times, SliceBinocularGaze gaze, SliceMutFixationOutput output);
public static FilterError FixationSimple(long[] times, BinocularGaze[] gaze, FixationOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError FixationSimple(NativeArray<long> times, NativeArray<BinocularGaze> gaze, NativeArray<FixationOutput> output);
#endif

Pupil Lam Thompson Corbett 1987

Computes the size difference between pupils and related metrics.

The function takes a configuration for the filter, and an array of pupil sizes. The output is written into the output array. Both arrays are required to be the same size.

Notes

  • The output at position i reflects the fused measurement i.
  • This filter may be applied to unsorted data.

LamThompsonCorbett1987FilterConfig

  • “loewenfeld criterion” - 0.4 mm
  • “ltc criterion ratio” - 0.15

Output

References

Lam, B. L., Thompson, H. S., & Corbett, J. J. (1987). The Prevalence of Simple Anisocoria. American Journal of Ophthalmology, 104(1), 69–73.

10.1016/0002-9394(87)90296-0

Definition

public static extern FilterError PupilLamThompsonCorbett1987(LamThompsonCorbett1987FilterConfig config, SlicePupilSizeAbsolute pupil_size, SliceMutPupilOutput output);
public static FilterError PupilLamThompsonCorbett1987(LamThompsonCorbett1987FilterConfig config, PupilSizeAbsolute[] pupil_size, PupilOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError PupilLamThompsonCorbett1987(LamThompsonCorbett1987FilterConfig config, NativeArray<PupilSizeAbsolute> pupil_size, NativeArray<PupilOutput> output);
#endif

Short-time Fourier transform

Compute the Short-time Fourier transform for the gaze local velocities (STFT).

The data is be broken up into chunks or frames of stft_length which overlap each other. Each chunk is Fourier transformed, and the complex result is added to a matrix, which records complex result and power magnitude for each point in time and frequency.

The window size (stft_length) for this function ranges from 2 to 64. If you want to use a larger window, please use the spectral_stft_velocity_extended function.

The returned frequency component i depends on the sampling rate and stft_length and will also be returned. It can be estimated by freq[i] = i * sample_rate / stft_length.

Use resampling to make sure that the input velocity is sampled with sample rate specified in config.

Notes

  • The output at position i has special meaning.

Output

References

Smith, S. (2002). Digital signal processing. London: Newnes. ISBN: 075067444X. 10.1016/B978-0-7506-7444-7.X5036-5

Definition

public static extern FilterError SpectralStftVelocity(SpectralSTFTConfig config, SliceVelocityOutput velocities, SliceMutSpectralSTFTOutput output, SliceMutf32 output_frequencies);
public static FilterError SpectralStftVelocity(SpectralSTFTConfig config, VelocityOutput[] velocities, SpectralSTFTOutput[] output, float[] output_frequencies);
#if UNITY_2018_1_OR_NEWER
public static FilterError SpectralStftVelocity(SpectralSTFTConfig config, NativeArray<VelocityOutput> velocities, NativeArray<SpectralSTFTOutput> output, NativeArray<float> output_frequencies);
#endif

Short-time Fourier transform (extended)

Compute the Short-time Fourier transform for the gaze local velocities (STFT) with extended window sizes.

The data is be broken up into chunks or frames of stft_length which overlap each other. Each chunk is Fourier transformed, and the complex result is added to a matrix, which records complex result and power magnitude for each point in time and frequency.

The window size (stft_length) for this function ranges from 128 to 512. Please note that using this function requires more memory, and we recommend only running it on machines with a high amount of RAM. If you want to use a smaller window, please use the spectral_stft_velocity function.

The returned frequency component i depends on the sampling rate and stft_length and will also be returned. It can be estimated by freq[i] = i * sample_rate / stft_length.

Use resampling to make sure that the input velocity is sampled with sample rate specified in config.

Notes

  • The output at position i has special meaning.

Output

References

Smith, S. (2002). Digital signal processing. London: Newnes. ISBN: 075067444X. 10.1016/B978-0-7506-7444-7.X5036-5

Definition

public static extern FilterError SpectralStftVelocityExtended(SpectralSTFTConfig config, SliceVelocityOutput velocities, SliceMutSpectralSTFTOutputExtended output, SliceMutf32 output_frequencies);
public static FilterError SpectralStftVelocityExtended(SpectralSTFTConfig config, VelocityOutput[] velocities, SpectralSTFTOutputExtended[] output, float[] output_frequencies);
#if UNITY_2018_1_OR_NEWER
public static FilterError SpectralStftVelocityExtended(SpectralSTFTConfig config, NativeArray<VelocityOutput> velocities, NativeArray<SpectralSTFTOutputExtended> output, NativeArray<float> output_frequencies);
#endif

Add Noise

Adds normally distributed noise to eye tracking gaze data.

This filter is useful for testing purposes to stress algorithms and computations under less-than-ideal conditions.

The function takes array of gaze data and configuration. The result is written directly into the gaze data array.

Notes

  • This filter may be applied to unsorted data.

NoiseConfig

  • “mean direction” - 0.0
  • “mean origin” - 0.0
  • “seed” - 0
  • “std dev direction” - 0.05
  • “std dev origin” - 0.02

Output

Definition

public static extern FilterError AddNoise(NoiseConfig config, SliceMutBinocularGaze data);
public static FilterError AddNoise(NoiseConfig config, BinocularGaze[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError AddNoise(NoiseConfig config, NativeArray<BinocularGaze> data);
#endif

Time Shift

Shifts time by a supplied duration.

The function takes in an array of times and a duration which the array will be shifted by.

Notes

  • This filter may be applied to unsorted data.

Definition

public static extern FilterError TimeShift(SliceMuti64 times, long duration_us);
public static FilterError TimeShift(long[] times, long duration_us);
#if UNITY_2018_1_OR_NEWER
public static FilterError TimeShift(NativeArray<long> times, long duration_us);
#endif

Verify Delta Above

Checks whether all data has a time delta above a supplied duration.

The function takes in an array of times, as well as a duration in microseconds (µs) and writes the result in the last parameter.

Notes

  • This filter must be used on data with monotonic time stamps.

Definition

public static extern FilterError VerifyDeltaAbove(Slicei64 times, long duration_us, out VerifyDeltaOutput output);
public static FilterError VerifyDeltaAbove(long[] times, long duration_us, out VerifyDeltaOutput output);
#if UNITY_2018_1_OR_NEWER
public static FilterError VerifyDeltaAbove(NativeArray<long> times, long duration_us, out VerifyDeltaOutput output);
#endif

Verify Delta Below

Checks whether all data has a time delta below a supplied duration.

The function takes in an array of times, as well as a duration in microseconds (µs) and writes the result in the last parameter.

Notes

  • This filter must be used on data with monotonic time stamps.

Definition

public static extern FilterError VerifyDeltaBelow(Slicei64 times, long duration_us, out VerifyDeltaOutput output);
public static FilterError VerifyDeltaBelow(long[] times, long duration_us, out VerifyDeltaOutput output);
#if UNITY_2018_1_OR_NEWER
public static FilterError VerifyDeltaBelow(NativeArray<long> times, long duration_us, out VerifyDeltaOutput output);
#endif

Force Increasing Timestamp

Enforces that all timestamps are strictly increasing.

If non-strictly monotonic timestamps are found their value will be forced to be monotonic. This is done by setting them to a value larger than the previous timestamp, based on the given minimum delta parameter. Fails the pipeline if the time between two adjacent samples is lower than the given threshold.

This stage can be used if sensor data fails to time sync properly but is known to be ordered. In that case new time stamps are forced onto the data so subsequent stages (e.g., fusion) can still attempt to merge the data sensibly.

The function takes array of timestamps, delta parameter in microseconds (µs) and output array for rearranged timestamps. The result is written into the output timestamps array.

Definition

public static extern FilterError ForceIncreasingTimestamp(Slicei64 times, long min_delta_us, SliceMuti64 output);
public static FilterError ForceIncreasingTimestamp(long[] times, long min_delta_us, long[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError ForceIncreasingTimestamp(NativeArray<long> times, long min_delta_us, NativeArray<long> output);
#endif

Sort By Time

Sorts data by timestamp in ascending order.

The function takes a pointer to the data, the length of the data, the size of each element in the data, and a array of timestamps.

The provided pointer is assumed to be a pointer where each element is of the provided size. The provided array of timestamps must be to be the same length of the data array.

Both the data and the timestamps are modified in place.

Notes

  • This filter may be applied to unsorted data.

Definition

public static extern FilterError SortDataByTimestamp(IntPtr data_ptr, long data_len, long data_elem_size, SliceMuti64 timestamps);
public static FilterError SortDataByTimestamp(IntPtr data_ptr, long data_len, long data_elem_size, long[] timestamps);
#if UNITY_2018_1_OR_NEWER
public static FilterError SortDataByTimestamp(IntPtr data_ptr, long data_len, long data_elem_size, NativeArray<long> timestamps);
#endif

Resample Binocular Gaze

Resamples binocular gaze data given a method and target times.

The data from the time and gaze arrays will be resampled to match the target times array in accordance with the supplied method. The resulting data will be written into the output array.

Output

Definition

public static extern FilterError ResampleBinocularGaze(ResampleMethod method, long invalid_treshold, Slicei64 times, SliceBinocularGaze data, Slicei64 target_times, SliceMutBinocularGaze output);
public static FilterError ResampleBinocularGaze(ResampleMethod method, long invalid_treshold, long[] times, BinocularGaze[] data, long[] target_times, BinocularGaze[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError ResampleBinocularGaze(ResampleMethod method, long invalid_treshold, NativeArray<long> times, NativeArray<BinocularGaze> data, NativeArray<long> target_times, NativeArray<BinocularGaze> output);
#endif

Resample Position Guide Data

Resample position guide data given a method and target times.

The data from the time and position guide array will be resampled to match the target times array in accordance with the supplied method. The resulting data will be written into the output array.

Output

Definition

public static extern FilterError ResamplePositionGuideData(ResampleMethod method, long invalid_treshold, Slicei64 times, SlicePositionGuide data, Slicei64 target_times, SliceMutPositionGuide output);
public static FilterError ResamplePositionGuideData(ResampleMethod method, long invalid_treshold, long[] times, PositionGuide[] data, long[] target_times, PositionGuide[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError ResamplePositionGuideData(ResampleMethod method, long invalid_treshold, NativeArray<long> times, NativeArray<PositionGuide> data, NativeArray<long> target_times, NativeArray<PositionGuide> output);
#endif

Resample Entrance Pupil Data

Resample entrance pupil data given a method and target times.

The data from the time and entrance pupils array will be resampled to match the target times array in accordance with the supplied method. The resulting data will be written into the output array.

Output

Definition

public static extern FilterError ResampleEntrancePupilData(ResampleMethod method, long invalid_treshold, Slicei64 times, SliceEntrancePupilData data, Slicei64 target_times, SliceMutEntrancePupilData output);
public static FilterError ResampleEntrancePupilData(ResampleMethod method, long invalid_treshold, long[] times, EntrancePupilData[] data, long[] target_times, EntrancePupilData[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError ResampleEntrancePupilData(ResampleMethod method, long invalid_treshold, NativeArray<long> times, NativeArray<EntrancePupilData> data, NativeArray<long> target_times, NativeArray<EntrancePupilData> output);
#endif

Resample Pupil Size Data

Resample pupil size data given a method and target times.

The data from the time and pupil size array will be resampled to match the target times array in accordance with the supplied method. The resulting data will be written into the output array.

Output

Definition

public static extern FilterError ResamplePupilSizeAbsoluteData(ResampleMethod method, long invalid_treshold, Slicei64 times, SlicePupilSizeAbsolute data, Slicei64 target_times, SliceMutPupilSizeAbsolute output);
public static FilterError ResamplePupilSizeAbsoluteData(ResampleMethod method, long invalid_treshold, long[] times, PupilSizeAbsolute[] data, long[] target_times, PupilSizeAbsolute[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError ResamplePupilSizeAbsoluteData(ResampleMethod method, long invalid_treshold, NativeArray<long> times, NativeArray<PupilSizeAbsolute> data, NativeArray<long> target_times, NativeArray<PupilSizeAbsolute> output);
#endif

Transform Binocular Gaze

Transforms binocular gaze from the local eye tracker coordinate system to world space given a matching head pose.

To read more about coordinate systems and transformations, see https://developer.tobii.com/xr/learn/technical-information/coordinate-systems/ Keep in mind that the eye tracking data and head pose needs to be synced, since they may be temporally shifted, read more at https://developer.tobii.com/xr/learn/technical-information/time-synchronization/

Output

Definition

public static extern FilterError TransformBinocularGaze(SliceBinocularGaze gaze, SliceCameraPose head_pose, SliceMutBinocularGaze output);
public static FilterError TransformBinocularGaze(BinocularGaze[] gaze, CameraPose[] head_pose, BinocularGaze[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError TransformBinocularGaze(NativeArray<BinocularGaze> gaze, NativeArray<CameraPose> head_pose, NativeArray<BinocularGaze> output);
#endif

Detects near blinks.

Eye tracking data around blinks can sometimes exhibit what can best be described as “dipping”, a measurement of vertical movement. Since this dipping behavior can interfere with some algorithms this filter allows you to invalidate eye tracking samples around blinks more aggressively so that dipping won’t be detected.

Using this function you can get an array of boolean values indicating blink or near blink for both eyes and apply it later on any data type you need.

Notes

  • This filter must be used on data with monotonic time stamps.

InvalidateNearBlinkConfig

  • “after” - 20000 µs
  • “before” - 20000 µs
  • “min blink duration” - 50000 µs

Output

Definition

public static extern FilterError DetectNearBlinks(InvalidateNearBlinkConfig config, Slicei64 times, SliceBlinkState blinks, SliceMutNearBlinkOutput output);
public static FilterError DetectNearBlinks(InvalidateNearBlinkConfig config, long[] times, BlinkState[] blinks, NearBlinkOutput[] output);
#if UNITY_2018_1_OR_NEWER
public static FilterError DetectNearBlinks(InvalidateNearBlinkConfig config, NativeArray<long> times, NativeArray<BlinkState> blinks, NativeArray<NearBlinkOutput> output);
#endif

Invalidates entrance pupil data before and after a blink.

Eye tracking data around blinks can sometimes exhibit what can best be described as “dipping”, a measurement of vertical movement. Since this dipping behavior can interfere with some algorithms this filter allows you to invalidate eye tracking samples around blinks more aggressively so that dipping won’t be detected.

Notes

  • This filter must be used on data with monotonic time stamps.

InvalidateNearBlinkConfig

  • “after” - 20000 µs
  • “before” - 20000 µs
  • “min blink duration” - 50000 µs

Output

Definition

public static extern FilterError InvalidateNearBlinkEntrancePupil(InvalidateNearBlinkConfig config, Slicei64 times, SliceBlinkState blinks, SliceMutEntrancePupilData data);
public static FilterError InvalidateNearBlinkEntrancePupil(InvalidateNearBlinkConfig config, long[] times, BlinkState[] blinks, EntrancePupilData[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateNearBlinkEntrancePupil(InvalidateNearBlinkConfig config, NativeArray<long> times, NativeArray<BlinkState> blinks, NativeArray<EntrancePupilData> data);
#endif

Invalidates binocular gaze data before and after a blink.

Eye tracking data around blinks can sometimes exhibit what can best be described as “dipping”, a measurement of vertical movement. Since this dipping behavior can interfere with some algorithms this filter allows you to invalidate eye tracking samples around blinks more aggressively so that dipping won’t be detected.

Notes

  • This filter must be used on data with monotonic time stamps.

InvalidateNearBlinkConfig

  • “after” - 20000 µs
  • “before” - 20000 µs
  • “min blink duration” - 50000 µs

Output

Definition

public static extern FilterError InvalidateNearBlinkBinocularGaze(InvalidateNearBlinkConfig config, Slicei64 times, SliceBlinkState blinks, SliceMutBinocularGaze data);
public static FilterError InvalidateNearBlinkBinocularGaze(InvalidateNearBlinkConfig config, long[] times, BlinkState[] blinks, BinocularGaze[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateNearBlinkBinocularGaze(InvalidateNearBlinkConfig config, NativeArray<long> times, NativeArray<BlinkState> blinks, NativeArray<BinocularGaze> data);
#endif

Invalidates pupil size absolute data before and after a blink.

Eye tracking data around blinks can sometimes exhibit what can best be described as “dipping”, a measurement of vertical movement. Since this dipping behavior can interfere with some algorithms this filter allows you to invalidate eye tracking samples around blinks more aggressively so that dipping won’t be detected.

Notes

  • This filter must be used on data with monotonic time stamps.

InvalidateNearBlinkConfig

  • “after” - 20000 µs
  • “before” - 20000 µs
  • “min blink duration” - 50000 µs

Output

Definition

public static extern FilterError InvalidateNearBlinkPupilSizeAbsolute(InvalidateNearBlinkConfig config, Slicei64 times, SliceBlinkState blinks, SliceMutPupilSizeAbsolute data);
public static FilterError InvalidateNearBlinkPupilSizeAbsolute(InvalidateNearBlinkConfig config, long[] times, BlinkState[] blinks, PupilSizeAbsolute[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateNearBlinkPupilSizeAbsolute(InvalidateNearBlinkConfig config, NativeArray<long> times, NativeArray<BlinkState> blinks, NativeArray<PupilSizeAbsolute> data);
#endif

Invalidates position guide data before and after a blink.

Eye tracking data around blinks can sometimes exhibit what can best be described as “dipping”, a measurement of vertical movement. Since this dipping behavior can interfere with some algorithms this filter allows you to invalidate eye tracking samples around blinks more aggressively so that dipping won’t be detected.

Notes

  • This filter must be used on data with monotonic time stamps.

InvalidateNearBlinkConfig

  • “after” - 20000 µs
  • “before” - 20000 µs
  • “min blink duration” - 50000 µs

Output

Definition

public static extern FilterError InvalidateNearBlinkPositionGuide(InvalidateNearBlinkConfig config, Slicei64 times, SliceBlinkState blinks, SliceMutPositionGuide data);
public static FilterError InvalidateNearBlinkPositionGuide(InvalidateNearBlinkConfig config, long[] times, BlinkState[] blinks, PositionGuide[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateNearBlinkPositionGuide(InvalidateNearBlinkConfig config, NativeArray<long> times, NativeArray<BlinkState> blinks, NativeArray<PositionGuide> data);
#endif

Invalidates the blink state data by eye.

InvalidateEyeConfig

  • “eye” - Both

Output

Definition

public static extern FilterError InvalidateEyeForBlinkState(InvalidateEyeConfig config, SliceMutBlinkState data);
public static FilterError InvalidateEyeForBlinkState(InvalidateEyeConfig config, BlinkState[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateEyeForBlinkState(InvalidateEyeConfig config, NativeArray<BlinkState> data);
#endif

Invalidate Entrance Pupil Data

Invalidates the entrance pupil data by eye.

InvalidateEyeConfig

  • “eye” - Both

Output

Definition

public static extern FilterError InvalidateEyeForEntrancePupil(InvalidateEyeConfig config, SliceMutEntrancePupilData data);
public static FilterError InvalidateEyeForEntrancePupil(InvalidateEyeConfig config, EntrancePupilData[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateEyeForEntrancePupil(InvalidateEyeConfig config, NativeArray<EntrancePupilData> data);
#endif

Invalidate Gaze Data

Invalidates the gaze data by eye

InvalidateEyeConfig

  • “eye” - Both

Output

Definition

public static extern FilterError InvalidateEyeForGaze(InvalidateEyeConfig config, SliceMutBinocularGaze data);
public static FilterError InvalidateEyeForGaze(InvalidateEyeConfig config, BinocularGaze[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateEyeForGaze(InvalidateEyeConfig config, NativeArray<BinocularGaze> data);
#endif

Invalidate Pupil Size Data

Invalidates the pupil size data by eye.

InvalidateEyeConfig

  • “eye” - Both

Output

Definition

public static extern FilterError InvalidateEyeForPupilSize(InvalidateEyeConfig config, SliceMutPupilSizeAbsolute data);
public static FilterError InvalidateEyeForPupilSize(InvalidateEyeConfig config, PupilSizeAbsolute[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateEyeForPupilSize(InvalidateEyeConfig config, NativeArray<PupilSizeAbsolute> data);
#endif

Invalidate Position Guide Data

Invalidates the position guide data by eye.

InvalidateEyeConfig

  • “eye” - Both

Output

Definition

public static extern FilterError InvalidateEyeForPositionGuide(InvalidateEyeConfig config, SliceMutPositionGuide data);
public static FilterError InvalidateEyeForPositionGuide(InvalidateEyeConfig config, PositionGuide[] data);
#if UNITY_2018_1_OR_NEWER
public static FilterError InvalidateEyeForPositionGuide(InvalidateEyeConfig config, NativeArray<PositionGuide> data);
#endif

Calculate Catmull-Rom Resampling length

Calculates count of the resampled items for Catmull-Rom resampling.

CatmullRomResamplingConfig

  • “output interval” - 4000 µs
  • “single eye resampling” - false

Definition

public static extern FilterError CalculateCatmullRomResamplingLength(long time_start_us, long time_end_us, CatmullRomResamplingConfig config, out ulong output_length);

Catmull-Rom Resampling

Samples gaze angles by interpolation using a Catmull-Rom spline.

This processor will create a continuous Catmull-Rom spline over all samples and then sample the spline with the configured time interval.

The resulting data will have gaze angles interpolated.

Using this processor you can achieve higher resolution on eye tracking data and thereby getting higher precision on events produced by filters.

Since this processor will ignore invalid samples when creating the spline, it is highly recommended preceding this processor with a processor that handles invalid data.

The function takes in an array of times and corresponding gaze data, config and writes the result into output time array and output gaze parameters.

Make sure that the length of output parameters match resampled data length (end time - start time) / output interval + 1. You can use calculate resampling length function to get resampled data length.

Notes

  • This filter must be used on data with monotonic time stamps.

CatmullRomResamplingConfig

  • “output interval” - 4000 µs
  • “single eye resampling” - false

Output

References

Catmull, Edwin; Rom, Raphael (1974). A class of local interpolating splines. In Barnhill, Robert E.; Riesenfeld, Richard F. (eds.). Computer Aided Geometric Design. pp. 317–326. 10.1016/B978-0-12-079050-0.50020-5

Definition

public static extern FilterError CatmullRomResampling(CatmullRomResamplingConfig config, Slicei64 times, SliceBinocularGaze gaze_data, SliceMuti64 output_times, SliceMutBinocularGaze output_gaze);
public static FilterError CatmullRomResampling(CatmullRomResamplingConfig config, long[] times, BinocularGaze[] gaze_data, long[] output_times, BinocularGaze[] output_gaze);
#if UNITY_2018_1_OR_NEWER
public static FilterError CatmullRomResampling(CatmullRomResamplingConfig config, NativeArray<long> times, NativeArray<BinocularGaze> gaze_data, NativeArray<long> output_times, NativeArray<BinocularGaze> output_gaze);
#endif

Savitzky-Golay Smoothing

Smooths gaze data by interpolation using fitted Savitzky-Golay polynomial functions.

This processor will create a polynomial function for every sample passed to this processor where it can fit a window and output sample this polynomial with the system_timestamp from the original sample.

This processor will try to create a polynomial for a window that contains invalid samples only if there is at least 2 valid samples. It is highly recommended preceding this processor with a processor that handles invalid data.

The function takes in an array of times and corresponding gaze data, config and writes the result into output gaze array. If smoothing is impossible due to lack of data, initial values are copied to the output gaze.

Notes

  • This filter must be used on data with monotonic time stamps.

SavitzkyGolaySmoothingConfig

  • “half window size” - 2
  • “polynomial degree” - 2
  • “smooth gaze” - Direction

Output

References

Savitzky, A. and Golay, M.J.E. (1964) Smoothing and Differentiation of Data by Simplified Least-Squares Procedures. Analytical Chemistry, 36, 1627-1639. 10.1021/ac60214a047

Definition

public static extern FilterError SavitzkyGolaySmoothing(SavitzkyGolaySmoothingConfig config, Slicei64 times, SliceBinocularGaze gaze_data, SliceMutBinocularGaze output_gaze);
public static FilterError SavitzkyGolaySmoothing(SavitzkyGolaySmoothingConfig config, long[] times, BinocularGaze[] gaze_data, BinocularGaze[] output_gaze);
#if UNITY_2018_1_OR_NEWER
public static FilterError SavitzkyGolaySmoothing(SavitzkyGolaySmoothingConfig config, NativeArray<long> times, NativeArray<BinocularGaze> gaze_data, NativeArray<BinocularGaze> output_gaze);
#endif