Skip to content

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

Hand-Tracking

โœ‹ Hand Tracking with MediaPipe (Python)

A real-time hand tracking system built using:

  • ๐ŸŽฅ OpenCV (camera processing)
  • ๐Ÿ– MediaPipe (hand landmark detection)
  • ๐Ÿงฎ NumPy (math utilities)

This project detects hand landmarks from a webcam feed and enables gesture-based interaction like pinch detection and finger counting.


๐Ÿš€ Features

  • Real-time webcam hand tracking
  • 21 hand landmark detection
  • Pinch detection (Thumb + Index)
  • Finger counting logic
  • Gesture recognition foundation
  • Lightweight and fast

๐Ÿง  How It Works

MediaPipe detects 21 3D hand landmarks per frame.

Example important landmarks:

  • 0 โ†’ Wrist
  • 4 โ†’ Thumb tip
  • 8 โ†’ Index tip
  • 12 โ†’ Middle tip
  • 16 โ†’ Ring tip
  • 20 โ†’ Pinky tip

Pinch detection is calculated using the distance between:

Thumb tip (4) and Index tip (8)

If the distance is small โ†’ pinch detected.


๐ŸŽฎ Example Gestures

Gesture Detection Logic
๐Ÿค Pinch Distance(4, 8) < threshold
โœŠ Fist No fingers up
โœ‹ Open Palm 4 fingers up
โ˜ Index Up Landmark 8 above landmark 6

Finger up detection logic:

tip.y < pip.y

## Installations

pip install opencv-python mediapipe numpy

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages