Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

[solved] pygaze tutorial not working (forgot to turn off DUMMYMODE)

ashishinfiniteashishinfinite Posts: 2
edited May 2015 in PyGaze

i'm working on windows.I have downloaded the package OF WINpython-Pygaze-0.4. when i run shooting_game example it runs but not shoots based on my eye location .Simiilarly when i run simple_tracker_experiment example
gmae opens but it dosen't track my eye and when i close the game(i.e. simple_tracker_experiment ) it shows me on python shell:

Calibration would now take place
Drift correction would now take place
Recording would have started at: 3622.52023359
The following status message would have been visible on the experimentor PC: trial 1
The following message would have been logged to the EDF: start_trial 1 trialtype left
The following message would have been logged to the EDF: fixation
The following message would have been logged to the EDF: target left
Recording would have stopped at: 39997.3048325
Drift correction would now take place
Drift correction would now take place
Drift correction would now take place
Drift correction would now take place
Drift correction would now take place
Drift correction would now take place

Comments

  • EdwinEdwin Posts: 635
    edited 4:47AM

    From the messages in the terminal, e.g. "Calibration would now take place" and "The following message would have been logged to the EDF [...]", I can see that DUMMYMODE was True. This means you were not actually using an eye tracker, but the dummy mode (this lets you use the mouse as an gaze simulator).

    The solution is simple:

    1) Make sure that DUMMYMODE = False in constants.py.

    2) Set TRACKERTYPE = to one of the following: eyelink, eyetribe, smi or tobii (depending on what brand you are using).

    3) Make sure that you pay attention to the other constants. DISPSIZE, for example, should match your monitor's resolution.

    Good luck!

  • ashishinfiniteashishinfinite Posts: 2
    edited May 2015

    what does it mean brand(i.e. eyelink,......) .Would i have to purchase it????
    when i run simple_eye_tracker experiment it gives me error:

    Traceback (most recent call last):
    File "C:/Python27/ashish/h", line 24, in
    tracker = eyetracker.EyeTracker(disp)
    File "C:\Python27\lib\site-packages\pygaze\eyetracker.py", line 65, in init
    from libsmi import SMItracker
    File "C:\Python27\lib\site-packages\pygaze\libsmi.py", line 38, in
    from iViewXAPI import *
    File "C:\Python27\lib\site-packages\pygaze\iViewXAPI.py", line 74, in
    iViewXAPI = windll.LoadLibrary("iViewXAPI.dll")
    File "C:\Python27\lib\ctypes__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
    File "C:\Python27\lib\ctypes__init__.py", line 365, in init
    self._handle = _dlopen(self._name, mode)
    WindowsError: [Error 126] The specified module could not be found


    and when i run shooting game example it gives me error:

    Traceback (most recent call last):
    File "C:/Python27/ashish/h", line 33, in
    eyetracker = EyeTracker(disp)
    File "C:\Python27\lib\site-packages\pygaze\eyetracker.py", line 60, in init
    self.class.init(self, display, resolution=resolution, data_file=eyedatafile+".edf", fg_color=fgc, bg_color=bgc, eventdetection=EVENTDETECTION, saccade_velocity_threshold=saccvelthresh, saccade_acceleration_threshold=saccaccthresh)
    File "C:\Python27\lib\site-packages\pygaze\libeyelink.py", line 129, in init
    raise Exception("Error in libeyelink.libeyelink.init(): Failed to connect to the tracker!")
    Exception: Error in libeyelink.libeyelink.init(): Failed to connect to the tracker!


    i want to just just use my laptop webcame to track my eye.
    can u give procedure how do i utilize pygaze to do this?????

  • EdwinEdwin Posts: 635
    edited May 2015

    Ah, I see. As is clearly noted on the website, you will need an eye tracker to use the toolbox for eye tracking.

    You may have come across this project (and/or its source code). Although hosted on the PyGaze website, it is labelled as a separate project. The PyGaze toolbox does not include functionality for eye tracking by webcam.

    The main reason for this is that you don't "just use a laptop webcam to track an eye". Although the theory is simple, and the basics are easily implemented, doing it properly is an intricate process that requires a great deal of optimalisation.

    TL;DR: PyGaze can't do webcam eye-tracking. You don't "just" track an eye using your webcam. If you want to write your own code and need a start, see this.

  • Hi,

    I am running the "simple_tracker_experiment.py" from PyGaze and although the eye tracker seems to be connected I get this error:

    Connection timed outTraceback (most recent call last):
    File "/Users/Eyetracker/Desktop/simple_tracker_experiment/simple_tracker_experiment.py", line 23, in
    tracker = eyetracker.EyeTracker(disp)
    File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pygaze/eyetracker.py", line 68, in init
    self.class.init(self, display, **args)
    File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pygaze/_eyetracker/libeyelink.py", line 158, in __init__
    "Error in libeyelink.libeyelink.__init__(): Failed to "
    Exception: Error in libeyelink.libeyelink.__init__(): Failed to connect to the tracker!

    Since I read in the error message "Connection timed out", I would like to know whether this error is due to internet connection's problems or to other problem sources. How I can solve it? Many thanks in advance. :)

Sign In or Register to comment.