Detecting Pupil Movement Using Javascript

A project log for BlinkToText

BlinkToText is an open source, free, and easy to use software program that converts eye blinks to text.

Swaleh OwaisSwaleh Owais 10/05/2017 at 03:220 Comments

I want to build the entire software program using web tools like Javascript and RoR. This would allow me to host the entire application on a website and allow anyone in the world to easily to access it. There are many Javascript libraries for computer vision. I am prototyping with clmtracker. Clmtracker detects faces within a given video feed. The software overlays any detected faces with a green mask. There are points laid out on specific features of the face, such as the mouth, nose, and eyes. Ten points describe the geometry of both eyes.

[1, Figure 2: Representation of Points in Clmtrackr Face Matrix]

Points 27 and 32 describe the centerpoints of the pupils. Currently, I am writing a software program that uses clmtrackr to detect faces in a videofeed. The software then measures the distance between the Point 27 and 32 and the four corners of each eye. If the length falls below a certain threshold, the program will know that the eye is in a certain corner.


[1] A. Venâncio. Plot of Significant Facial Features. 2017. Available: