Virtual Keyboard 3 – Gaze controlled keyboard with Python and Opencv p.7
In the previous tutorial we learn how to create and display a virtual keyboard using opencv.
We have now two files, a main.py file where we have the code for detecting the blinking and the gaze of our eyes, and we have a file where we have the code of our visual keyboard.
To simplify all this, we’re going to put everything into a single file and create functions where the same code is repeated.
All this steps are explained in the video.
I’m going to show in this post only the new feature that we added in this tutorial, and it is the lighting up of the letters.
Light up letters each 10 frames
Basically we are lighting up a letter for 10 frames, and after that we light up the next one, so that when we reach the letter we want to press, we simply close our eyes and it gets pressed.
# Letters if frames == 10: letter_index += 1 frames = 0 if letter_index == 15: letter_index = 0 for i in range(15): if i == letter_index: light = True else: light = False letter(i, keys_set_1[i], light)
Hi there, I’m the founder of Pysource.
I’m a Computer Vision Consultant, developer and Course instructor.
I help Companies and Freelancers to easily and efficiently build Computer Vision Software.
Learn to build Computer Vision Software easily and efficiently.
This is a FREE Workshop where I'm going to break down the 4 steps that are necessary to build software to detect and track any object.Sign UP for FREE
Detect and Track any Object (Full Videocourse)
You can Build Software to detect and track any Object even if you have a basic programming knowledge.