real-time hands tracker, sends joints coords over OSC
Project description
#handjoints-osc
Real-time hand tracking with MediaPipe. Sends data over OSC. Written in Python.
Installation
Recommended: make a virtual environment
python -m venv .venv source .venv/bin/activate
Install requirements:
pip install -r requirements
Arguments:
$ python main.py --help
usage: main.py [-h] [--host HOST] [--confidence CONFIDENCE] port
positional arguments: port send OSC to this port
options: -h, --help show this help message and exit --host HOST send OSC to this host --confidence CONFIDENCE, -c CONFIDENCE minimum detection confidence threshold
OSC format
- path:
/handjoints i *i* ...f
- [0] number of detected hands
- [1:numHands] handedness for each detected hand
- [numHands+1:..] x and y coordinates for each joint for each hand
The program detects maximum 2 hands, each hand has 21 joints, and each joint 2 coordinates.
Arguments are all in a single list, starting with the number of hands, then handedness for each hand, and following with x and y coordinates for all joints of one hand, and then the joint of each other hand.
[nHands, ...handedness, ...coordsHand0, ...cordsHand1] coords: [j0x, j0y, j1x, j1y, j2x, j2y, ...]
If only one hand is detected, numHands + handedness + coords (21 * 2) gives 44 values. If two hands are detected, there are two handedness values, so 1 + 2 + 42 + 42 = 87 values.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for handjoints_osc-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea6893c176f7ba478d3c05843b429907c2b0867c16506cd08fea6f0597c7b22 |
|
MD5 | 3cccc824b1591a5fedc23ce5105b0396 |
|
BLAKE2b-256 | f2860675a17046e6db032365c0cfb1c95debe61d64aae22d301ef81323774e59 |