This project enables users to control their mouse pointer using hand gestures. It utilizes OpenCV, PyAutoGUI, and MediaPipe to track hand movements and translate them into cursor movements and click actions.
- Move Cursor: Control mouse pointer using hand movement.
- Click Actions: Perform left and right clicks with gestures.
- Scroll Functionality: Scroll up and down using hand gestures.
- Real-Time Processing: Uses MediaPipe Hand Tracking for fast and efficient tracking.
Make sure you have Python 3.10 installed. Then, install the required libraries:
pip install opencv-python pyautogui mediapipe
- OpenCV - For capturing and processing video input.
- PyAutoGUI - For simulating mouse actions.
- MediaPipe - For real-time hand tracking.
Run the script to start the hand-controlled mouse system:
python hand_mouse_control.py
- Hand Detection: Uses MediaPipe to detect hands and track landmarks.
- Gesture Recognition: Identifies specific finger positions to determine actions (move, click, scroll).
- Mouse Control: Uses PyAutoGUI to move the cursor and perform clicks based on gestures.
Gesture | Action |
---|---|
Index finger up | Move cursor |
Index + Middle finger up | Perform a click |
Thumb + Pinky up | Scroll up/down |
Feel free to fork this repository and contribute improvements. Pull requests are welcome!
This project is licensed under the MIT License.