FaceToJoystick is a tool allowing you to use your head as a joystick, similiar to opentrack but more compatable with linux.
opencv-python
package)git clone https://github.com/PeaceNira/FaceToJoystick.git
pip install opencv-python vgamepad numpy
main.py
script:python main.py
Position your face in front of the webcam.
Look left, right, up, or down to control the virtual joystick.
Press the 'r' key to reset the initial face position if needed.
Press the 'q' key to exit the program.
The X output is Controller axis 4, and the Y output is axis 5.
Constants contain options you can edit to your desire, or when the application is launched via the GUI.
Contributions are welcome and am hoping to build this project into a good linux alternative to opentrack.
This project is licensed under the MIT license. See the LICENSE file for details.
Drastic changes in light will cause the face to bounce around, so will extremely dark/light settings.