Skip to content

Made for MLH Local Hack Day. Input controller using face detection.

Notifications You must be signed in to change notification settings

alfi-s/face_controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

F-Controller

Your face as an input device.

Overview

This is a simple python script that uses the OpenCV library to detect faces, and then use the position of your face relative to your screen to trigger keyboard inputs.

Prerequisites

In order to run this, you need OpenCV and pynput. You can install OpenCV by going here. You can install pynput by:

pip3 install pynput

Usage

As of now, you can set the thresholds for sensing inputs by hardcoding the x_threshold and y_threshold values in the script. You can also set the keyboard inputs by setting the key_x_below_threshold, key_x_above_threshold, key_y_below_threshold, and key_y_above_threshold values in the script.

Run the script using:

python3 detection.py

A webcam feed will appear. Press the I key on the keyboard to tell the program to start listening for inputs. Press the Q key on the keyboard to exit the program.

About

Made for MLH Local Hack Day. Input controller using face detection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages