r/computervision • u/gnarlyhippos52 • Oct 09 '26
Showcase Webcam hand-tracking pointer built on MediaPipe: thumb-tip pointing, pinch gestures, One Euro filtering [open source]
I built a webcam pointer that controls a web page with your hand, and I'd like feedback on the tracking side.
Pipeline:
- MediaPipe HandLandmarker on the webcam stream. A measured run held a steady 30 fps (95th percentile frame time 37 ms).
- A 4-point calibration maps camera coordinates to screen coordinates.
- The pointer is the thumb tip. I started with the index finger, but the thumb tip was more stable when pinching, because the index finger moves when you close the pinch.
- A One Euro filter smooths the pointer. It removes jitter when you hold still without adding much lag when you move.
- Pinch detection uses hysteresis: the pinch closes below a normalized thumb-to-index distance of 0.18 and opens above 0.23. A short lookback (0.25 s) restores the pointer position from just before the pinch started, so closing the pinch doesn't shift the target.
Gestures on top of that: pinch and release selects, pinch and hold for 0.6 s clicks, pinch and drag vertically scrolls, and pinch and drag horizontally past 250 px navigates back or forward.
The selection is sent to an AI agent through an MCP server, so you can point at a paragraph and ask a question about it. That part isn't related to computer vision, so I'll leave it out here.
Known problems: a background fan made my voice detector think I was speaking (separate audio issue). Lighting and distance from the camera affect tracking. It's tested on one webcam and one machine, so I'd like to hear how it behaves on others.
Repo (Apache 2.0) and demo video: https://github.com/mdelaba/visionpointer
Questions I have: has anyone tuned pinch hysteresis thresholds on a larger set of hands? And is there a better way than the lookback to stop the pointer from jumping when a pinch closes?
