These sections were split out of README.md to keep it readable.
After the 3D step, ft-hands fits a skeleton with your own bone lengths to each hand (track/skeleton.h), so fingers keep their length and don’t wobble. It’s the base for a hand mesh, colliders and the hand ray. --skeleton 0 (HANDS_SKELETON=0) turns it off.
Hand::scale. Nothing is saved: each start learns again.notes/forearm.md): a neck pivot fixed in the head frame, shoulders 18 cm to each side and 6 cm down, upper arm 1.5 times the forearm, the forearm 2.8 times the palm (wrist to middle knuckle), the elbow on the circle the two bones allow, turned 3 degrees from straight down, and never more than 75 degrees off the hand’s own axis. ft-hands has no HMD pose, so “down” is the head frame’s -y: published with FH_FIT_ELBOW_HEAD_UP. The model’s other parameters (neck and shoulder offsets) are its starting values: the fitted ones are on the training PC.include/fh_hands.h): after version 1’s struct, which is unchanged, an fh_hand_fit_t per hand with the 21 joints (position, a rough radius, and a quaternion in OpenXR’s hand-joint axes), the bone lengths, the joint angles, the elbow, the pinch point (between the index and middle knuckles) and the thumb-index contact point, the thumb-index and thumb-middle distances, the fit’s rms and how settled the calibration is, and the palm’s velocity and angular velocity. Those two are in the head frame and include the head’s own motion; for motion in the room, difference room-frame points across publishes as screens/handcut.cpp does. Version 1’s points and capsules are the skeleton’s too, so ft-screens’ cutouts get it without a change. The hand recorder’s reader takes version 1 or 2.ft-handreplay --pinch-fitted counts pinches on the fitted tips for comparison: they begin about as often as on the triangulated tips, more than on the world landmarks.What it measured, ft-handreplay on three recordings and three takes of the 2026-10-03 hand-recorder session (frame-hands notes/skeleton-fit.md has every number):
| 2026-09-29/30 recordings, 30 Hz | dim (typing) | lit | bright |
|---|---|---|---|
| Bone length spread per track (median CV): measured / One Euro / skeleton | 0.41 / 0.37 / 0.05 | 0.24 / 0.22 / 0.03 | 0.39 / 0.35 / 0.01 |
| Index tip jitter, hand and fingers still, mm (median; 90%): One Euro / skeleton | 4.5 / 3.9; 16.9 / 24.3 | 3.4 / 2.8; 11.0 / 14.7 | 4.2 / 3.2; 11.5 / 10.2 |
| Thumb tip jitter, still, mm (median; 90%) | 3.0 / 2.7; 12.0 / 11.8 | 2.4 / 2.7; 7.8 / 12.0 | 3.0 / 2.2; 10.1 / 8.7 |
| Index tip jitter, palm over 0.3 m/s, median mm | 14.0 / 11.2 | 11.0 / 8.6 | 17.7 / 14.7 |
| Palm jitter, still, median mm | 1.8 / 1.8 | 1.9 / 1.8 | 1.9 / 1.8 |
| Tips trailing, moving over 0.5 m/s, median mm | 6.5 / 5.7 | 5.1 / 4.9 | 5.7 / 4.9 |
| Tips trailing, fingers moving on the palm, median mm | 7.8 / 3.5 | 5.9 / 4.7 | 4.6 / 3.5 |
| Palm normal’s turn per update, palm still, fingers moving, median degrees | 2.8 / 1.7 | 2.2 / 1.3 | 2.3 / 2.0 |
| Fit rms against the measured landmarks, stereo, median mm | 10.4 | 9.0 | 7.6 |
| Calibration settled after each side’s first sample, s (left, right) | 20.5, 10.9 | 10.8, 3.5 | 15.6, 8.9 |
ft-hands detects a pinch per hand (track/pinch.h) and publishes it to the gestures file. The layout, and how to read it without missing quick taps, is in include/fh_gestures.h.
--pinch-begin (default 0.020 m). It ends when they open past --pinch-end (0.045 m) for 2 processed frames in a row, or when the hand stays lost for 0.25 s (flagged lost).tests/pinch_test.cpp (make check).--pinch-triangulated uses the triangulated tips instead. On two recordings without deliberate pinches, the world landmarks came under 2 cm in 0.2-1% of frames, against 3.3-4.5% for the triangulated tips. In the dim recording, typing still gave 2 pinches a minute (see the next point).--pinch-palm-down MAX holds back pinches begun with the palm facing down (MAX is the palm normal’s share of the head’s up axis). The default, 1, turns it off. A close held back that way has to open again before a pinch can begin. Typing curls the thumb onto the index: in the lit recording of 2026-09-30, typing on a keyboard in the lap began 23 pinches in about 2 minutes, all with the palm facing down (0.69-1.00), while the 26 deliberate ones read 0.00-0.50. But in the headset, deliberate pinches with the hand raised in front read 0.90-0.99 too, so the limit is off. Typing is caught by the pointer helper instead: the input relay tells it when you press a key, and the hands on the keys are held back (POINTER_PINCH_TYPING and the settings after it, below).tools/watch_gestures.py prints begins, ends and drag offsets live, and --distance prints each hand’s distance.With POINTER_HANDS=1, the pointer helper (pointer/helper/ft-pointer.cpp) reads the gestures file every frame. It’s off by default.
The hand ray (POINTER_HAND_RAY=1, the default with POINTER_HANDS): a bare hand in front and pointing, palm away, high or low, out in front or lowered toward you (not while it types: the typing guard; POINTER_RAY_RAISED=30 brings back the old height limit, the knuckles within 30 cm under the eyes, and POINTER_RAY_FORWARD=25 the old reach limit, at least 25 cm in front of them), shows a ray from it, Quest-style (include/fh_ray.h: from a shoulder estimated from the head, through the knuckles), and the ray drives the pointer’s virtual controller, so it works on SteamVR’s dashboard, Steam’s pages, overlays and Frametop’s panels like a controller’s laser. The ray comes up as the thumb nears the index or middle tip (POINTER_RAY_READY). With the ray up, a pinch clicks (a held pinch drags), a middle pinch right-clicks (held and moved, it scrolls), a three-finger pinch (thumb, index and middle together) scrolls as the hand moves, and while a pinch carries a panel, reaching out pushes it away and pulling in brings it near. With the hand low or the palm toward you, there’s no ray, and pinches and grips work as below. In gaze mode there’s no ray at all unless POINTER_GAZE_HAND_RAY=1. A hand holding a controller, or whose controller was used in the last seconds, has no ray and no gestures (the helper’s handoff, pointer/helper/handoff.h). The rules, timings and measurements are at the top of ft-pointer.cpp (“Handoff”, “Hand ray”) and in frame-hands’ notes/hand-interaction.md. pointer/tools/rayeval runs the ray over a replay (ft-handreplay --ray).
POINTER_GAZE_HAND_RAY). A pinch locks the pointer where you were looking just before the fingers began to close (75 ms before ft-hands saw the pinch, since the eyes often move on as the hand closes), and a quick tap clicks there. Pinch, hold and move the hand to nudge the pointer: nothing moves until the hand has moved 4 degrees (about 3 cm at arm’s length), then the pointer follows at 0.3 times the hand’s movement. Letting go clicks where the pointer is, and the correction is a lesson for the gaze tracker, as with the mouse. Held still for POINTER_GAZE_HOLD (0.5 s) instead, the pinch is a real press at that point, and the hand drags at POINTER_GRIP_GAIN. A middle pinch is a right click the same way. Hold a pinch with one hand and pinch with the other: both buttons are down, left for the first hand and right for the second, each until its own pinch opens (a first pinch not yet pressed becomes a press at once, where the pointer is), as when you hold both of a mouse’s buttons. The rules and timings are in pointer/helper/gazehand.h.Settings in ~/.config/frametop.conf:
POINTER_HANDS (0): 1 turns pinches and grips on.POINTER_GAZE_PINCH (1): in gaze mode, 0 turns clicks at the gaze off (pinches and grips with no ray do nothing), leaving the ray when gaze is off and direct touch. Frametop Input Settings’ Hands page has the three hand inputs as switches of their own (hands/handsmode.py, methods_of).POINTER_PINCH_GAIN (0.5): without gaze mode, a held pinch moves the pointer this many times the hand’s angle, seen from the eye. Under 1 gives precision.POINTER_PINCH_DEADZONE (1.5): without gaze mode, how many degrees the pinching hand moves before the pointer does, so a tap’s jitter and the pinch point shifting as the fingers close don’t move it.POINTER_GAZE_HAND_RAY (0): in gaze mode, 1 keeps the hand ray beside the gaze (a raised, pointing hand’s pinches are then ray pinches).POINTER_GAZE_PINCH_DEADZONE (4): in gaze mode, how many degrees a held pinch moves before it nudges the pointer. A tap’s jitter and a hand drifting while you look stay inside it.POINTER_GAZE_PINCH_GAIN (0.3): in gaze mode, past the dead zone the pointer moves this many times the hand’s angle. Low, so a nudge is a fine correction.POINTER_GRIP_GAIN (1): a grip moves the pointer this many times the hand’s angle.POINTER_GRIP_BELOW (0.35): grips that begin more than this many metres below the eyes are ignored, because hands resting on a desk curl like a loose fist. Pinches have no such limit: deliberate ones sat 0.35-0.45 m below the eyes with the elbow resting.POINTER_PINCH_TYPING (2), POINTER_TYPING_RAISE (0.08 m), POINTER_TYPING_BELOW (0.2 m), POINTER_TYPING_POSTURE (0.3 s), POINTER_TYPING_RECENT (600 s), POINTER_TYPING_KEEP (300 s), POINTER_TYPING_MOUSE (10 s), POINTER_DESK_MODEL (unset), POINTER_DESK_MIN (0.8): typing on a real keyboard. For POINTER_PINCH_TYPING seconds after a key, no hand pinches, grips, pokes or shows a ray, except one lifted off the keys; a hand that was on the keys stays held back through any pause until it rises POINTER_TYPING_RAISE above where it typed (or turns its palm up); both hands down on the keys together count as typing before the first key. A hand on the keys stays held back while the cameras can’t see it (looking up at a screen) for up to POINTER_TYPING_KEEP, and for POINTER_TYPING_MOUSE after the mouse was used a hand that comes down at the desk is held back the same way, keys or not, as is one a trained desk model (POINTER_DESK_MODEL) puts on the keyboard or mouse. pointer/helper/typing.h and docs/hands-typing.md have the rules and the measurements.POINTER_HAND_RAY (1), POINTER_RAY_DEADZONE (2.5 degrees the ray turns during a pinch before the press drags), POINTER_RAY_PUSH (1), POINTER_RAY_SCROLL (1; -1 turns scrolling round), POINTER_RAY_RELEASE (2 s after the ray goes before a pointer it woke lets go), POINTER_RAY_GRACE (0.5 s a hand keeps the laser after its ray drops; the other hand’s ray takes it after that, or at once by pinching or raising): the hand ray.include/fh_smooth.h, through fh_ray.h): One Euro filters run in continuous time, so the pointer’s pose moves at the helper’s rate (about 100 Hz) instead of stepping at the tracker’s 15-30 Hz; the direction is filtered on the sphere. POINTER_RAY_SMOOTH_MINCUTOFF (0.8 Hz with the hand still), POINTER_RAY_SMOOTH_BETA (0.06 Hz more per degree a second it turns), POINTER_RAY_SMOOTH_HOLD (0.5 Hz still while a pinch is held: a drag’s precision). The reach, push and pull’s input, has a heavier one of its own. POINTER_RAY_STEADY (1): while a pinch is held (and 0.25 s after), the ray pivots on where the shoulder was at the press, then eases back to the body model over 0.5 s; the model’s shoulder follows the head, which made looking around move what was dragged. POINTER_RAY_TAP (0.3 s) and POINTER_RAY_TAP_DEADZONE (6 degrees): a pinch’s first 0.3 s takes 6 degrees of turn before it drags, so a quick tap whose hand swung stays a click; after that POINTER_RAY_DEADZONE applies. When the press starts dragging the pointer carries on from where it was, no jump. On the probe-moves replay (pointer/tools/rayeval on frame-hands/dumps/probe-moves-v4.dump, read at 90 Hz) the pose’s second difference per tick went from 0.90-0.96 degrees rms (p90 1.4) to 0.24-0.26 (p90 0.24) at about the same lag (110 ms behind the capture, against 105).include/fh_ray.h; ideas and formulas from StereoKit, MIT): POINTER_RAY_TORSO_WRISTS (1): the shoulders face between the head (counted twice) and the wrists seen, so looking aside while pointing swings the ray less. POINTER_RAY_HAND_WEIGHT (0; 0..1): how far the ray turns from the shoulder’s line toward the hand’s own direction (POINTER_RAY_HAND_PITCH -30 and POINTER_RAY_HAND_YAW 8 degrees off the palm’s axes). POINTER_RAY_ANCHOR (0): the knuckle point pinned to the palm while a pinch is held. The last two measured worse on replays (pointer/tools/rayeval; numbers in fh_ray.h), so they’re off.When tracking goes wrong in real use, flag it: ft-handsctl flag [note], or by voice with frame-voice’s voice commands (its commands setting: “flag that” runs ft-handsctl flag with the words after it as the note, e.g. “flag that, fingers crossed”). The offline tools (frame-hands’ train/flags) relabel what was saved with the teacher, find what went wrong and in which situations, and make guided capture sessions for the weakest ones.
ft-hands keeps a rolling buffer in RAM (track/flagbuf.h, HANDS_FLAG_BUFFER=1): per processed set, a mono crop around each view the tracker used (its landmark crop’s centre, 1.6 times its size, axis aligned, at most HANDS_FLAG_CROP px a side), with where it is in the image, so labels made on it lift back to the image and triangulate; a lost view is still cropped where it was for a second, so the teacher can say whether the hand was there; and its hands, gestures and each view’s landmarks. It keeps HANDS_FLAG_SECONDS and at most HANDS_FLAG_MB of crops; nothing is written until a flag. Cost, measured (2026-10-09, a replayed ring with two hands in view): about 80 crops a second at 20 sets a second, 56 MB of crops for 14 s at 224 px (ft-hands’ peak RSS 101 -> 159 MB), and 0.1 ms a crop on a tracking core (A720), so about 1% of a core; ft-hands’ CPU time was the same with and without it. At 30 sets a second with four views the 80 MB cap can trim the oldest seconds.
ft-handsctl flag makes HANDS_FLAG_DIR/flag-<time>/ and asks ft-hands for the buffer through run_dir/flag; ft-hands keeps going for 2 s more, then a thread of its own (off the tracking cores, lowest priority) writes manifest.json (written last), sets.jsonl, crops.jsonl and crops.bin. Once ft-hands has taken the request, the drawn hands pulse cyan for half a second (ft-handview’s flash; HANDS_FLAG_FLASH=0 turns it off; HANDS_FLAG_TONE=1 also plays a short tone). It returns then, and in the background saves one frame of your view from /dev/video99 as view.jpg (HANDS_FLAG_VIEW=0 skips it), the head’s poses over the window from ft-handview (poses) as hmd.jsonl, and ctl.json. ft-hands logs each flag (“flag:”, “flag written:”), and the status line has the buffer’s size and cost. A flag while one is being taken adds its note to it. The format is in frame-hands’ notes/flag-failures.md. The crops show your hands and some of the room: keep flags with your recordings.
ft-handreplay REC --flag-at S1,S2 --flag-out DIR (or --flag-every S) makes the same flags from a recording, with the same buffer, for testing the offline tools before real flags exist; --flag-crop PX, --flag-scale F, --flag-mb MB and --flag-seconds S change the buffer.