This project allows you to control your mouse cursor using hand gestures captured from your webcam. It uses Python libraries OpenCV, MediaPipe, and PyAutoGUI.
- Moves the mouse cursor based on the position of your index finger.
- Performs a mouse click when you pinch your thumb and index finger together.
- Python 3.7 or higher
- OpenCV
- MediaPipe
- PyAutoGUI
To install the required libraries, run: pip install opencv-python mediapipe pyautogui
Alternatively, if you have a requirements.txt file, run:
pip install -r requirements.txt
- Connect your webcam.
- Run the script: hand-mouse-control.py
- A window will open showing your webcam feed with hand landmarks.
- Move your index finger to move the mouse pointer.
- Pinch your thumb and index finger to click.
- Press
qto quit.
Kamand Kaffashi