PeaceNira / FaceToJoystick

A simple python application to track your face and map it to a axis control
MIT License
4 stars 5 forks source link
gaming-software hacktoberfest hacktoberfest-accepted hacktoberfest-starter hacktoberfest2024 help-wanted image-processing opencv tkinter-python tracking

FaceToJoystick

FaceToJoystick is a tool allowing you to use your head as a joystick, similiar to opentrack but more compatable with linux.

Requirements

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/PeaceNira/FaceToJoystick.git
  1. Install the required Python packages:
pip install opencv-python vgamepad numpy
  1. Connect your webcam to your computer.

Usage

  1. Run the main.py script:
python main.py
  1. Position your face in front of the webcam.

  2. Look left, right, up, or down to control the virtual joystick.

  3. Press the 'r' key to reset the initial face position if needed.

  4. Press the 'q' key to exit the program.

  5. The X output is Controller axis 4, and the Y output is axis 5.

  6. Constants contain options you can edit to your desire, or when the application is launched via the GUI.

Contributing

Contributions are welcome and am hoping to build this project into a good linux alternative to opentrack.

License

This project is licensed under the MIT license. See the LICENSE file for details.

Known Issues:

Drastic changes in light will cause the face to bounce around, so will extremely dark/light settings.