Tobii Eyetracker Mouse emulation

Official forum for open source FreePIE discussion and development.
Post Reply
Centuri0n
One Eyed Hopeful
Posts: 6
Joined: Fri Jan 25, 2008 12:28 pm

Tobii Eyetracker Mouse emulation

Post by Centuri0n »

Spend some hours to figure out, how to move mouse pointer with just a gaze (for Tobii Eyetracker)

You'll need only FreePIE and this script:

Code: Select all

from ctypes import *
user32 = windll.user32

def update():
	
	global enabled
	
	looking = tobiiEyeX.userPresence == "Present" and enabled
	if (looking and enabled):
		posx = tobiiEyeX.gazePointInPixelsX
		posy = tobiiEyeX.gazePointInPixelsY
		user32.SetCursorPos(int(posx),int(posy))
		
		
	diagnostics.watch(enabled)
	diagnostics.watch(posx)
	diagnostics.watch(posy)
	
		
if starting:
	enabled = True
	tobiiEyeX.update += update
	
toggle = keyboard.getPressed(Key.F4)

if toggle:
	enabled = not enabled
F4 toggles mouse following gaze mode.

Correct yourself for your needs.
kazujin.tenno
One Eyed Hopeful
Posts: 1
Joined: Sun Dec 09, 2018 5:03 am

Re: Tobii Eyetracker Mouse emulation

Post by kazujin.tenno »

Does the freepie tobii plugin able to detect single eye squinting/wink? or blinking given X miliseconds of dwelling(time taken to gaze on a spot) time? I saw it is implemented in software called IRIS but is not very programmable. I want to use the blink and squint/wink to do some macro.

If you imagine like squinting my left eye for 1 secs to trigger a zoom scope. something like that.
I always thought of Tobii as programmable utility rather than just for gaming purposes to improved its overall usefulness and im currently trying to start a youtube channel to inspire disabled gamers to use some tech stuff to play some games.
Post Reply

Return to “FreePIE”