A Python application that enables computer control through hand gestures using computer vision. The application tracks hand movements through your webcam and translates them into mouse controls.
- Real-time hand tracking and gesture recognition
- Mouse movement control using index finger
- Click, right-click, and drag gestures
- Scrolling functionality
- Live camera preview option
- FPS counter
- Hand preference selection (left/right)
- Move cursor: Point with index finger
- Click: Pinch index finger and thumb
- Right-click: Pinch middle finger and thumb
- Drag: Pinch index, middle finger and thumb
- Scroll: Two fingers up/down motion
- Start tracking: Show all fingers
- Stop tracking: Close all fingers
- Clone this repository
git clone https://github.com/hashim1213/HandTrackMouse.git
- Set up environment
python3 -m venv venv
source venv/bin/activate
//Windows
`venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python HandTrack.py
- Select your preferred hand (left/right)
- Click "Start" to begin hand tracking
- Optional: Enable camera preview to see hand tracking visualization
- Python 3.8+
- Webcam
- Sufficient lighting for hand detection