Configure SimpleGazeTracker

General Opions (in CONFIG)

CONFIG is a plain text file where camera-independent SimpleGazeTracker parameters are specified. Lines start with ‘#’ are ignored. This is an example of CONFIG.

[SimpleGazeTrackerCommon]
BINOCULAR=0
THRESHOLD=17
MAX_PUPIL_WIDTH=25
MIN_PUPIL_WIDTH=15
PURKINJE_THRESHOLD=236
PURKINJE_SEARCHAREA=29
PURKINJE_EXCLUDEAREA=8
CAMERA_WIDTH=320
CAMERA_HEIGHT=224
PREVIEW_WIDTH=640
PREVIEW_HEIGHT=480
ROI_WIDTH=0
ROI_HEIGHT=0
SHOW_DETECTIONERROR_MSG=0
PORT_SEND=10001
PORT_RECV=10000
DELAY_CORRECTION=0
OUTPUT_PUPILSIZE=1
USBIO_BOARD=0
USBIO_AD=0;BIP5VOLTS
USBIO_DI=FIRSTPORTA
USB_USE_THREAD=0

Note

Parameter name is case sensitive.

#correct
BINOCULAR=0

#wrong
Binocular=0
Parameter Description Adjustable at run-time
BINOCULAR This parameter must be 0 or 1. If the value is 1, SimpleGazeTracker runs at binocular recording mode. Otherwise, it runs at monocular recording mode. NO
THRESHOLD This parameter affects detection of pupil. See Adjusting camera (monocular recording) for detal. YES
MAX_PUPIL_WIDTH This parameter affects detection of pupil. See Adjusting camera (monocular recording) for detal. YES
MIN_PUPIL_WIDTH This parameter affects detection of pupil. See Adjusting camera (monocular recording) for detal. YES
PURKINJE_THRESHOLD This parameter affects detection of the first Purkinje image. See Adjusting camera (monocular recording) for detal. YES
PURKINJE_SEARCHAREA This parameter affects detection of the first Purkinje image. See Adjusting camera (monocular recording) for detal. YES
PURKINJE_EXCLUDEAREA This parameter affects detection of pupil center. See Adjusting camera (monocular recording) for detal. YES
CAMERA_WIDTH Width of the image sent from the camear. NO
CAMERA_HEIGHT Height of the image sent from the camear. NO
PREVIEW_WIDTH Width of the preview image on the screen of the Recorder PC. NO
PREVIEW_HEIGHT Height of the preview image on the screen of the Recorder PC. NO
ROI_WIDTH If this value is not 0, SimpleGazeTracker searches pupil and the first Purkinje image only from the region specified by this parameter and ROI_HEIGHT. See Setting region of interest (ROI) for detail. New in 0.5.1 NO
ROI_HEIGHT If this value is not 0, SimpleGazeTracker searches pupil and the first Purkinje image only from the region specified by this parameter and ROI_WIDTH. See Setting region of interest (ROI) for detail. New in 0.5.1 NO
SHOW_DETECTIONERROR_MSG This parameter must be 0 or 1. If the value is 1, Error message is overlaid on the camer apreview image if detection of pupil and the first Purkinje image is failed. See Adjusting camera (monocular recording) for detal. New in 0.5.1 NO
PORT_SEND TCP/IP Port number for sending information to the Recorder PC. This value must be the same to portRecv (not portSend) parameter of GazeParser.TrackingTools.BaseController.connect(). Default value is 10001. New in 0.5.1 NO
PORT_RECV TCP/IP Port number for receiving commands from the Recorder PC. This value must be the same to portSend (not portRecv) parameter of GazeParser.TrackingTools.BaseController.connect(). Default value is 10000. New in 0.5.1 NO
DELAY_CORRECTION If delay in measuring gaze position is unacceptably long, you can use this parameter to correct delay. Unit of the value is millisedonds. Currently, only integer (not float) value is accepted. Default value is 0. See Delay from stimulus presentation to image capture for detail. New in 0.5.1 NO
OUTPUT_PUPILSIZE This parameter must be 0 or 1. If the value is 1, pupil size (area of ellipse fitted to the pupil) is output to the data file. New in 0.5.3 NO
USBIO_BOARD ID or name of USB-IO device. See USB I/O units (SimpleGazeTracker 0.7.0 or later) for detail. NO
USBIO_AD Port and range of analog input channel(s). See USB I/O units (SimpleGazeTracker 0.7.0 or later) for detail. NO
USBIO_DI Port of digital input. See USB I/O units (SimpleGazeTracker 0.7.0 or later) for detail. NO
USB_USE_THREAD This parameter must be 0 or 1. A saparate thread is used to read analog/digital inputs from USB-IO device if the value is 1. Generally, using separate thread results in better performance. NO

Note

MAXPOINTS and MINPOINTS are obsolete. Please use MAX_PUPIL_WIDTH and MIN_PUPIL_WIDTH instead.

Opions for OpenCV edition (in CONFIG_OPENCV)

CONFIG_OPENCV is a plain text file where camera-dependent parameters are specified. Lines start with ‘#’ are ignored. This is an example of CONFIG_OPENCV.

[SimpleGazeTrackerOpenCV]
USE_THREAD=1
SLEEP_DURATION=0
FRAME_RATE=60

Note

Parameter name is case sensitive.

#correct
USE_THREAD=0

#wrong
Use_Thread=0

Warning

Whether these parameters work correctly depends on camera unit. Probably it also depends on build options of OpenCV. It is recommended to delete unnecessary options from CONFIG_OPENCV because such options may cause unexpected effects.

Parameter Description Adjustable at run-time
CAMERA_ID This integer is passed to the constructor or CV::VideoCapture. Usually you need not write this parameter to the configuration file if you connect only one camera to your PC. If you have multiple cameras on your PC and SimpleGazeTracker does not use desirable camera, use this parameter to tell SimpleGazeTracker which camera should be used. New in 0.5.1 NO
USE_THREAD This parameter must be 0 or 1. A saparate thread is used to capture image if the value is 1. Generally, using separate thread results in better performance: however, it will cause segmentation fault if your opencv library is not built with multithreading support. Set this value 0 if segmentation fault occurs. NO
SLEEP_DURATION When USE_THREAD is 0, performance of SimpleGazeTracker may severely spoiled because captring camera image may lock process until capture is finished. In such a case, set SLEEP_DURATION to wait to capture image until a specified amount of time has elapsed. The Unit of the value is milliseconds. This value should be a bit smaller than inter-frame interval of the camera. For example, about 14-15 would work fine if your camera capture image at 60Hz (1000ms/60frames = 16.667ms). NO
FRAME_RATE Set this value to CV_CAP_PROP_FPS using cv::VideoCapture::set. Frame rate of the camera is set to this value if it is configurable from cv::VideoCapture::set. NO
EXPOSURE Set this value to CV_CAP_PROP_EXPOSURE using cv::VideoCapture::set. Exposure of the camera is set to this value if it is configurable from cv::VideoCapture::set. NO
BRIGHTNESS Set this value to CV_CAP_PROP_BRIGHTNESS using cv::VideoCapture::set. Brightness of the camera is set to this value if it is configurable from cv::VideoCapture::set. NO
CONTRAST Set this value to CV_CAP_PROP_CONTRAST using cv::VideoCapture::set. Contrast of the camera is set to this value if it is configurable from cv::VideoCapture::set. NO
GAIN Set this value to CV_CAP_PROP_GAIN using cv::VideoCapture::set. Gain of the camera is set to this value if it is configurable from cv::VideoCapture::set. NO

Note

Image size (CV_CAP_PROP_FRAME_WIDTH and CV_CAP_PROP_FRAME_HEIGHT) are configured by CAMERA_WIDTH and CAMERA_HEIGHT options in ‘CONFIG’.

Opions for OptiTrack edition (in CONFIG_OPTITRACK)

CONFIG_OPTITRACK is a plain text file where camera-dependent parameters are specified. Lines start with ‘#’ are ignored. This is an example of CONFIG_OPTITRACK.

#For V120:slim
#FRAME_RATE=120
#EXPOSURE=200
#INTENSITY=1
#
#For V100
#FRAME_RATE=100
#EXPOSURE=200
#INTENSITY=1
#
[SimpleGazeTrackerOptiTrack]
FRAME_RATE=120
EXPOSURE=200
INTENSITY=1

Note

Parameter name is case sensitive.

#correct
FRAME_RATE=120

#wrong
Frame_rate=120
Parameter Description Adjustable at run-time
FRAME_RATE Frame rate of the camera. NO
EXPOSURE Exposure duration. YES
INTENSITY (ONLY FOR V100R2) Intensity of built-in IR LED illumination. YES

Opions for Interface GPC5300 edition (in CAMERA.cfg)

CAMERA.cfg specifies camera parameters which is necessary for GPC5300 to control the camera. Usually, this file is created with a configuration file generator that comes with GPC5300. See the manual of GPC5300 for detail.

(new in 0.6.5) CONFIG_GPC5300 is a plain text file where camera-dependent parameters are specified. Lines start with ‘#’ are ignored. This is an example of CONFIG_OPTITRACK.

[SimpleGazeTrackerGPC5300]
OUTPUT_DIGITAL_INPUT=1

Note

Parameter name is case sensitive.

#correct
OUTPUT_DIGITAL_INPUT=1

#wrong
Output_Digital_Input=1
Parameter Description Adjustable at run-time
OUTPUT_DIGITAL_INPUT This parameter must be 0 or 1. If the value is 1, status of the digital input port on the CameraLink interface board is output to the data file. NO

Opions for FlyCapture2 edition (in CONFIG_FLYCAPTURE2)

CONFIG_FLYCAPTURE2 is a plain text file where camera-dependent parameters are specified. Lines start with ‘#’ are ignored. This is an example of CONFIG_FLYCAPTURE2.

[SimpleGazeTrackerFlyCapture2]
OFFSET_X=0
OFFSET_Y=16
FRAME_RATE=250
CAMERA_MODE=1
USE_THREAD=1
SLEEP_DURATION=0

Note

Parameter name is case sensitive.

#correct
FRAME_RATE=250

#wrong
Frame_rate=250
Parameter Description Adjustable at run-time
OFFSET_X Set horizontal offset of ROI. NO
OFFSET_Y Set vertical offset of ROI. NO
FRAME_RATE Frame rate of the camera. NO
CAMERA_MODE Set camera mode. Only 0 (mode0) and 1 (mode1) are supported. SimpleGazeTracker supports only Format7 mode and RAW8 pixcel format. NO
USE_THREAD This parameter must be 0 or 1. A saparate thread is used to capture image if the value is 1. Generally, using separate thread results in better performance: however, it will cause segmentation fault if your opencv library is not built with multithreading support. Set this value 0 if segmentation fault occurs. NO
SLEEP_DURATION When USE_THREAD is 0, performance of SimpleGazeTracker may severely spoiled because captring camera image may lock process until capture is finished. In such a case, set SLEEP_DURATION to wait to capture image until a specified amount of time has elapsed. The Unit of the value is milliseconds. This value should be a bit smaller than inter-frame interval of the camera. For example, about 14-15 would work fine if your camera capture image at 60Hz (1000ms/60frames = 16.667ms). NO

Note

Image size is configured by CAMERA_WIDTH and CAMERA_HEIGHT options in ‘CONFIG’.

Opions for DirectShow edition (in CONFIG_DIRECTSHOW)

CONFIG_DIRECTSHOW is a plain text file where camera-dependent parameters are specified. Lines start with ‘#’ are ignored. This is an example of CONFIG_DIRECTSHOW.

[SimpleGazeTrackerDirectShow]
CAMERA_ID=0
FRAME_RATE=60

Note

Parameter name is case sensitive.

#correct
FRAME_RATE=120

#wrong
Frame_rate=120
Parameter Description Adjustable at run-time
CAMERA_ID Specify camera unit used by SimpleGazeTracker. Default value is 0. Usually you need not write this parameter to the configuration file if you connect only one camera to your PC. If you have multiple cameras on your PC and SimpleGazeTracker does not use desirable camera, use this parameter to tell SimpleGazeTracker which camera should be used. NO
FRAME_RATE Frame rate of the camera. NO

Note

Image size is configured by CAMERA_WIDTH and CAMERA_HEIGHT options in ‘CONFIG’.