eyetracker-ng 0.1-1 documentation

gui Module

«  camera Module   ::   Contents

gui Module

Gui module provides graphical user interface for eyetracker program. You’re welcome to modify it for your needs, but it’s main purpose is to demonstrate program functions thus it’s usability is limited. If you’re interested in developing advenced eye-tracking algorithms that depend on variable parameters you are welcome to contact us for more information about GUI modifications.

functional Module

class eyetracker.gui.functional.MyForm(parent=None)[source]

Bases: PyQt4.QtGui.QMainWindow

Functional part of GUI interface.

Class governing the functional part of the default graphical user interface.

additional_1Change()[source]

Set a chosen additional_1 parameter for some purposes.

What is additional_1 –> Sasha

value : string
value to be assigned to additional_1 parameter. It would be converted to np.float32
additional_2Change()[source]

Set a chosen additional_2 parameter for some purposes.

What is additional_2 –> Sasha

value : string
value to be assigned to additional_1 parameter. It would be converted to np.float32
algorithmChange()[source]

Change eyetracker algorithm.

Function changing algorithm for eyetracker.

alphaChange()[source]

Set a chosen alpha parameter for smoothing purposes.

Alpha is a control parameter of the running average. It describes how many previous glint and pupil positions should be averaged. By arbitrary alpha should not exceed 10 and could not be a negative number.

value : string
value to be assigned to alpha parameter. It would be converted to np.float32
cameraChange()[source]

Change camera between avalaible devices.

clearSettings()[source]

Restore GUI default configuration.

Function clears all parameters saved previously in a config file and set gui to a default state.

glintUpdate(image)[source]
Parameters:

image : np.array

image on which glints should be find and marked.

hsbGlint_Change(value)[source]

Set a text in a gui according to the possition of a slider.

Parameters:

value : int

value to be displayed in an apriopriate label

hsbPupilNumber_Change(value)[source]

Set a text in a gui according to the possition of a slider.

Parameters:

value : int

value to be displayed in an apriopriate label

hsbPupil_Change(value)[source]

Set a text in a gui according to the possition of a slider.

Parameters:

value : int

value to be displayed in an apriopriate label

imageFlip()[source]

Set a variable telling the gui to flip incomming frames from a camera.

imageMirror()[source]

Set a variable telling the gui to mirror incomming frames from a camera.

loadSettings()[source]

Load GUI settings from file.

Loads parameters of a programm from a specified file. If file is not present, default parameters would be loaded.

paintEvent(event)[source]
Parameters:

event : object

standard event handler as described in QT4 documentation.

pupilUpdate(image)[source]
Parameters:

image : np.array

image on which pupil should be find and marked.

resolutionChange()[source]

Set a chosen resolution of a camera.

It does not change an image displayed in the gui, but sets variable for eyetracker programm.

runEyetracker()[source]

Starts eyetracker with parameters picked from gui.

saveSettings()[source]

Save GUI settings.

Saves GUI parameters specified file.

setDefaultSettings()[source]

Set GUI defaul configuration.

Function sets all gui parameters to its default values.

setWidgetsState()[source]

Set state of gui widgets according to self.config variable.

startButtonClicked()[source]

Handles the behavior of the start/stop button, based on parameters picked from gui.

timerEvent(event)[source]

Function controlling the main flow of this gui.

Function fires periodically (sampling rate), grabs frames from a camera, starts image processing and displays changes in the gui.

Parameters:

event : object

standard event handler as described in QT4 documentation.

graphical Module

class eyetracker.gui.graphical.Ui_StartingWindow[source]

Bases: object

GUI graphical part.

Class governing the graphical part of the default graphical user interface. It describes only parameters of used widgets, all operational functions are placed in separate class in eyetracker/gui/functional.

x.__init__(...) initializes x; see help(type(x)) for signature

retranslateUi(StartingWindow)[source]

Attach names to all widgets set up in setupUi function.

setupUi(StartingWindow)[source]

Initialization of all needed widgets.

«  camera Module   ::   Contents