Real-Time Eye Tracking: Streaming OpenIris Coordinates to PsychoPy for Live Plotting

Hi everyone,

I’m currently using OpenIris for real-time eye tracking, and I have a working script that can pull the eye coordinates (e.g., pupil position) and either save or print them out in real time.

What I want to do next is use PsychoPy to:

  • Read these coordinates live as they’re being generated
  • Plot them in real time to visualize eye movement during the experiment

I’m unsure of the best way to enable real-time communication between the two environments. Specifically:

  • What’s the most reliable way to stream the coordinates from OpenIris to PsychoPy (e.g., sockets, file watching, shared memory)?
  • How can I structure the PsychoPy script to receive and plot the data continuously with minimal latency?

If anyone has experience with this kind of setup or can point me toward an efficient solution or sample code, I’d really appreciate it!

Thanks so much!

Dear Nora-retina,

By “plot them in real-time” do you mean show markers on the screen that are the “current” position of the participants’ gaze?

I am not familiar with OpenIris, however is there any implementation of the OpenIris code in psychopy (e.g. via a code component). If yes, there is a few different ways to do this. If not, I am imagine you’d have to use some kind of data porting, but you are going experience a noticeable amount of lag, which will influence participants’ ability to engage with the task (as they are distracted by the gaze indicators).

Issac