This project enables gesture-based interaction using a webcam by recognizing hand gestures with the Mediapipe library and controlling the system via the PyAutoGUI library.
The code for gesture interaction is located in the Hand-Gesture-Recognition
folder. The project is divided into two main files:
app.py
: Contains the main program logic for capturing video and processing hand gestures.controller.py
: Handles mouse cursor movement and click events based on detected gestures.
Additionally, a requirements.txt
file is provided to install the necessary dependencies.
To run the program, the following libraries are required:
- OpenCV
- Mediapipe
- PyAutoGUI
You can install the required libraries using pip:
pip install opencv-python mediapipe pyautogui
Or use the requirements.txt
file to install the exact versions:
pip install -r requirements.txt
- Ensure that all required libraries are installed.
- Run the
app.py
file in a Python environment with a webcam:python app.py
- The program will start capturing video from the webcam, and you can control the system using hand gestures.
Images representing each hand gesture and their corresponding actions can be found in:
Hand-Gesture-Recognition/gestures/
The schematic of the setup is available in:
static/images/SYSTEM.png
For more details, visit the project webpage: Autostereoscopic Display
Parts of this project page were adopted from the Nerfies page.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.