Vizard 7 » Reference » Input Devices » Other devices » Omnicept
7.5

Omnicept

This plug-in provides support for HP Omnicept series of HMD eye tracking devices.

 

A full sample script can be found at \examples\devices\omniceptExample.py

Note: The Omnicept plug-in is not supported on 32-bit versions of Vizard

Initialization

The Omnicept plug-in is implemented as a Vizard extension. In order to use the plug-in you must first install the HP Omnicept runtime 1.13 or above. To calibrate the eye tracker you must manually run the calibration app included with the Omnicept runtime before running your Vizard script.

 

The Omnicept extension object has the following methods/constants:

Method

Description

<omnicept>.addOmnicept()

Returns an Omnicept eye tracker object if detected.

<omnicept>.setLicense(licenseType, clientId, accessKey)

If using licensed features, set the license information. This must be called before calling <omnicept>.addOmnicept().

 

licenseType must be one of the following license flags:

  • <omnicept>.LICENSE_CORE
  • <omnicept>.LICENSE_TRIAL
  • <omnicept>.LICENSE_ENTERPRISE
  • <omnicept>.LICENSE_REV_SHARE

clientId and accessKey are the strings provided by HP.

The Omnicept Eye Tracker provides both position and orientation data that represent the gaze origin/direction relative to the HMD coordinate frame. By default, the combined gaze values from both eyes is returned. To get the gaze values for each eye, pass the viz.LEFT_EYE or viz.RIGHT_EYE flag to the corresponding sensor function. The eye tracker object has the following methods in addition to the standard extension sensor methods:

Method

Description

<tracker>.getGazeConfidence(eye=viz.BOTH_EYE) Get the (0-1) confidence of the computed gaze vector.

<tracker>.getEyeOpen(eye=viz.BOTH_EYE)

Get the eye open amount of the specified eye. The amount is a 0-1 value, 0 indicating eye is closed and 1 indicating eye is open. Specifying viz.BOTH_EYE will average the value from each eye.

<tracker>.getEyeOpenConfidence(eye=viz.BOTH_EYE) Get the (0-1) confidence of the computed eye open amount.
<tracker>.getPupilDiameter(eye=viz.BOTH_EYE) Get the pupil diameter (in mm) of the specified eye. Specifying viz.BOTH_EYE will average the value from each eye.
<tracker>.getPupilDiameterConfidence(eye=viz.BOTH_EYE) Get the (0-1) confidence of the computed pupil diameter.
<tracker>.getHeartRate() Get the computed heart rate BPM value.
<tracker>.getCognitiveLoad() Get the (0-1) cognitive load value. Requires an Omnicept license from HP.
<tracker>.getCognitiveLoadStdDev() Get the cognitive load standard deviation value (0-1). Requires an Omnicept license from HP.

Example

The following example shows how to connect to an Omnicept eye tracker:

# Create extension
omnicept = viz.add('omnicept.dle')

# Connect to eye tracker
eyeTracker = omnicept.addOmnicept()

The next example shows how to get the gaze vector and perform an intersection test to determine where the user is looking:

# Get gaze matrix in local HMD coordinate system
gazeMat = eyeTracker.getMatrix()

# Transform gaze matrix into world coordinate system using main view
gazeMat.postMult(viz.MainView.getMatrix())

# Intersect world gaze vector with scene
line = gazeMat.getLineForward(1000)
info = viz.intersect(line.begin, line.end)
if info.valid:
    print('User is looking at', info.point)