Skip to content

Python hand tracking module with MediaPipe - Detect hands, track fingers, measure distances, and recognize gestures in real-time

License

Notifications You must be signed in to change notification settings

Divyansh0980/HandTracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HandTracking

Python hand tracking module with MediaPipe - Detect hands, track fingers, measure distances, and recognize gestures in real-time

Hand Tracking Module

A Python-based hand tracking module using MediaPipe and OpenCV for real-time hand detection and gesture recognition.

Features

  • 🖐️ Real-time hand detection and tracking
  • 👆 Finger position detection (up/down state)
  • 📏 Distance calculation between fingers
  • 🎯 Hand landmark identification (21 points per hand)
  • 📦 Reusable handDetector class for easy integration
  • ⚡ High-performance tracking

Demo

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

Requirements

  • Python 3.7+
  • OpenCV
  • MediaPipe
  • NumPy (installed with OpenCV)

Installation

  1. Clone the repository:
git clone https://github.com/Divyansh0980/HandTracking
cd HandTracking
  1. Install required packages:
pip install -r requirements.txt

Usage

Basic Usage

Run the demo script:

python HandTracking.py

Press q to quit the application.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • MediaPipe by Google for the hand tracking solution
  • OpenCV for computer vision functionality

Project Link: https://github.com/Divyansh0980/HandTracking

About

Python hand tracking module with MediaPipe - Detect hands, track fingers, measure distances, and recognize gestures in real-time

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages