A real-time hand tracking project using OpenCV and MediaPipe that efficiently detects and visualizes hand landmarks through your webcam feed.
Great for gesture recognition, interactive interfaces, and experimentation!
- 👐 Detects up to two hands simultaneously in live video.
- 🎯 Draws clear hand landmarks and connections on each frame.
- 📍 Returns the position of each landmark for further use, like gesture recognition.
- 🖨️ Prints landmark coordinates to the console.
- ⚡ Displays real-time FPS overlay for performance insight.
- Python 3.6+
- OpenCV (
cv2) - MediaPipe
Install dependencies:# Hand-Tracking-Project
- Clone this repository:
git clone https://github.com/your-username/Hand-Tracking-Project.git cd Hand-Tracking-Project - Run the main hand tracking module:
python HTModule.py
- Quit:
Focus the image window and pressqto exit.
- HTModule.py: Main, modular hand tracker with landmark detection and visualization.
- HandTracking.py: Simple, single-script version for experiments and quick demos.
- 📷 Captures frames from your camera.
- 🤚 Detects & tracks hands with MediaPipe.
- 🖊️ Draws landmarks and hand connections on video.
- 💻 Prints coordinates of hand landmarks to console.
- ⏱️ Overlays FPS metric for real-time feedback.
- Adjust number of hands, confidence thresholds, or visualization options in the
handDetectorclass. - Use printed landmark lists to build your own gesture controls or hand-based interfaces!
Open-source under the MIT License.
🙋♂️ Issues or ideas? Open an issue or a pull request – contributions welcome!