Hand Landmark Tracker is a Python package that leverages Google’s MediaPipe to detect and track 21 hand landmarks in real-time from webcam or video input. Beyond basic tracking, it includes Kalman filtering for smooth trajectories, Lab Streaming Layer (LSL) support for multi-device synchronization, and example integrations with robotic arms.
┌─────────────────┐ ┌──────────────┐ ┌────────────────┐
│ Webcam Input │───▶│ MediaPipe │───▶│ Kalman Filter │
└─────────────────┘ │ Hand Model │ └───────┬────────┘
└──────────────┘ │
▼
┌─────────────────┐ ┌──────────────┐ ┌────────────────┐
│ Robot Control │◀───│ LSL Stream │◀───│ 21 Landmarks │
└─────────────────┘ └──────────────┘ └────────────────┘
from hand_tracker import HandTracker
from mini_arm import MiniArmClient
tracker = HandTracker(stream_lsl=True)
robot = MiniArmClient(port='COM3')
for landmarks in tracker.run():
# Map index finger position to robot end-effector
target = landmarks['INDEX_FINGER_TIP']
robot.send(f'set_pose:{target.tolist()}')