This open-source project uses computer vision to simulate a joystick by tracking hand and finger movements, allowing users to play racing games.
- Clone the project:
git clone https://github.com/ehsanrs2/Virtual-joystick-with-computer-vision.git- Install the required Python libraries:
pip install -r requirements.txt- Navigate to the
Virtual_joystick_with_computer_visiondirectory and run the following command:
python Hand_Tracking.py- Right thumb: Acts as the 9 key, with a range of 0 to 255 (by opening and closing).
- Left thumb: Acts as the 6 key.
- Rotating hands: Moves axis 1 (key number 3 in the image) left and right, with a range of -32767 to 32767.
The variable threshold = 50 in line 94 of Hand_Tracking.py limits the rotation to ±50 degrees for the maximum point (±32767). You can adjust this value if desired.

