OpenMV cam Eye Tracker

Hello everyone,
I am working with a team of students in France, and we have a project to make during the year. We decided to make an eye-tracker for disabled persons that you can just plug in the computer to make it work. We decided to use the open mv cam along with a teensy, but we need help transfering eye coordinates to the teensy, to change them into screen coordinates (so that the mouse cursor moves to where you look). Can someone help us?
Best reguards

Yes, what communications bus would you like to use to send the coordinates? SPI, I2C, Serial? Serial is the easiest. I can provide some example code for the OpenMV Cam.

Here’s are versions of the eye tracking scripts with serial output added. (1.72 KB) (1.75 KB)

I took a look, but there are some things that I don’t quite understand.
First of all, in the beginning of the script for the iris detection, it is written that the face is not detected, it needs the other script. But since the camera is going to be sitting close to the eye, is it necessary?
And how do we take the coordinates of the eye and use them through Serial with the Teensy?

Hi, the second script literally zooms in on the area eye to skip the face detection part. It assumes that you have the camera mounted such that only the eyes are in the field of view.

As for the coordinates. The script sends them out through serial in pain text. What do you need help with?

I would need help for the teensy code; I just understood where the coordinates are sent in the python script, but can we just use x and y in the arduino code?

Yes, x and y define the center of the eye. So, you just parse the text string for x and y and those are your coordinates.

we recently received the camera but we are faicing an issue; when testing the script, the IDE posts an error saying: “AttributeError: ‘module’ object has no attribute ‘set_windowing’”. What are we supposed to do?
Thnak you

Please update your OpenMV Cam’s firmware. The IDE should have a note on the bottom asking you to update the firmware.

I just downloaded the software on the website since I am on an other compouter, and there is no note on the bottom…

I am on version 1.4.0, if it can help

Yes, the newest firmware is version 2.1.0.

Please install the latest version of the OpenMV IDE and update your firmware.

I found the note, I had to connect the camera. Sorry! Everyhting is working fine now.

Hello Titusblacksad,

I am currently working with a team of students in Michigan looking to complete a similar project of using eye tracking to move a searchlight for use during search and rescue. I believe the software you used to move a mouse can be applied to our project.

Can you post the code of the final project?

Thank you!