Python hand tracking module with MediaPipe - Detect hands, track fingers, measure distances, and recognize gestures in real-time
A Python-based hand tracking module using MediaPipe and OpenCV for real-time hand detection and gesture recognition.
- 🖐️ Real-time hand detection and tracking
- 👆 Finger position detection (up/down state)
- 📏 Distance calculation between fingers
- 🎯 Hand landmark identification (21 points per hand)
- 📦 Reusable
handDetectorclass for easy integration - ⚡ High-performance tracking
The module can detect up to 2 hands simultaneously and provides:
- Hand landmarks with connections
- Bounding box around detected hands
- Individual finger state detection
- Distance measurements between any two landmarks
- Real-time FPS display
- Python 3.7+
- OpenCV
- MediaPipe
- NumPy (installed with OpenCV)
- Clone the repository:
git clone https://github.com/Divyansh0980/HandTracking
cd HandTracking- Install required packages:
pip install -r requirements.txtRun the demo script:
python HandTracking.pyPress q to quit the application.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Project Link: https://github.com/Divyansh0980/HandTracking