mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-14 21:00:41 +02:00
Hold an open hand out to a screen, remote display or floating window,
palm to it, then pull the arm back making a fist: the panel comes over
250 ms to 45 cm ahead of the eyes, at the fist's height, facing you
(user, 2026-10-10). Screens wider than HANDS_GRAB_THAT_WIDTH (0.6 m)
come at that width. The same gesture at a panel that came, still where
it came to, sends it back; the reset button sends floating windows back
(the layout reset places screens and remote displays itself).
screens/grabthat.{h,cpp}: the detector (pure logic): open fingers, palm
ahead and the wrist 28 cm out for 0.2 s arm it; the fingers closing with
the palm still to the panel, then on one frame a fist, the wrist 8 cm
back within 0.5 s and the palm turned over fire it. The panel is the one
the eye-through-palm line meets, else the one the head points at. From
the closing (thumb clear of the index: not a pinch) to 0.4 s after the
fire the hand counts as near, so the helper doesn't take the fist as a
gaze grip. Hands frames carry the head pose at capture now
(Hands::captureHead).
Tests replay the user's flag (fires twice, right hand, at -11.35 and
-5.89 s; expected -11.4 and -5.9), and the other 12 flags and 15 minutes
of recordings fire nothing (1 of 143 pinches, 3 of 12 grips begin on a
claimed hand); synthetic waves, pushes, fists without the pull, slow
pulls, a hand turned over first, held-out pinches, a drop to the lap and
typing don't fire. handinput-test --grabthat FLAG_DIR... scans flags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
701 B
Bash
Executable File
11 lines
701 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Near hand input and the hand matte, offline (screens/tests/handinput_test.cpp): the unit tests,
|
|
# then each publish dump given (ft-handreplay --publish-dump: recorded hands as ft-hands
|
|
# published them) against panels placed around the hands.
|
|
# scripts/test-handinput.sh [DUMP...]
|
|
set -euo pipefail
|
|
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
dumps=$(printf ' %q' "$@")
|
|
"$root/scripts/frame.sh" -C screens "mkdir -p build && g++ -std=c++17 -O2 -Wall -Wextra -Wno-unused-parameter -Werror \
|
|
tests/handinput_test.cpp handcut.cpp handinput.cpp palmmenu.cpp grabthat.cpp -o build/handinput-test && build/handinput-test${dumps:+ && build/handinput-test --replay$dumps}"
|