nx_dynaoracle.nx
buildroot/runtime/nx_dynaoracle.nx
about
nx_dynaoracle.nx -- MEASURE SOFT-TISSUE DYNAMICS FROM VIDEO, IN THE SUBJECT'S OWN UNITS, WITH
THE SAME ESTIMATOR THE XPBD PLANT IS MEASURED WITH.
WHY THIS EXISTS. Every fidelity claim on /world/beach until now was PLANT-against-CITED-BAND:
nx_dyna_bind_skin rings the XPBD cage down and compares fn/zeta to knowledge/gamefeel_oracle.conf.
That is sound for the plant and says NOTHING about the render, because correct fn and zeta do not
imply correct amplitude, correct phase relative to footfall, or correct mode shape. A source
comment in the craft world states the old doctrine outright -- "measuring our own tissue needs no
reference footage" -- and that was right for a ringdown and insufficient for a LOOK. This organ is
the other half: it measures REAL FOOTAGE and OUR OWN RENDER CAPTURE through one instrument, so the
comparison is like-for-like instead of two rulers pointed at two subjects.
THE EXCEED, NAMED. gamefeel_oracle.conf's own closing note records that the 2025-26 differentiable
-simulation literature (MonoPhysics, PhysCoRe, EgoPhys) recovers Young's modulus, Poisson ratio and
yield stress and NEVER damping, never on human soft tissue. PhysRig [arXiv 2506.20936] fits
material prototypes and likewise not damping. Damping is the parameter that governs jiggle decay.
Fitting zeta from video is therefore a capability the field does not have, not a catch-up rung.
WHAT IT CAN AND CANNOT MEASURE -- stated before any number, because a limit discovered later reads
as a defect and a limit declared up front is a contract:
CAN : natural frequency, damping ratio, drive frequency, drive-to-response phase lag, and
amplitude AS A RATIO of a body landmark. All DIMENSIONLESS, so they survive a clip with
no calibration, no known camera and no known subject size.
CANNOT: amplitude in MILLIMETRES. There is no scale reference in an arbitrary clip. The
tissue_amp_walk_mm row therefore stays CITED and unmeasured by this organ, and closing
that gap needs a metric parametric-mesh recovery (Multi-HMR/Anny class) used as an
ORACLE ONLY, never as product -- the rule this estate already applies to BodyParts3D.
HOW CAMERA AND BODY MOTION ARE CANCELLED. Three signals come off every frame pair:
tissue ROI flow = camera + body translation + tissue oscillation
reference ROI = camera + body translation (a RIGID torso patch)
tissue - reference = tissue oscillation alone.
The NOISE FLOOR is not a tunable. It is measured from the reference ROI's OWN TOP AND BOTTOM
HALVES differenced: both halves sit on the same rigid body and share camera and body motion
exactly, so their difference is pure measurement noise BY CONSTRUCTION. That is a negative control
the caller cannot forget to supply and cannot fudge, and it is why this organ has no deadband
constant. A deadband picked by taste decides how much real oscillation reads as noise, which is
the one number an author must never choose after seeing the result.
usage: nx_dynaoracle measure <raw_gray8> <w> <h> <fps_milli> <tx0> <ty0> <tx1> <ty1> <rx0> <ry0> <rx1> <ry1>
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_image.nxnx_motion.nxnx_ringdown_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 54 | const DO_OUTFD: i64 = 1 |
| 55 | const DO_EXIT_OK: i64 = 0 |
| 56 | const DO_EXIT_USAGE: i64 = 2 |
| 57 | const DO_EXIT_UNREADABLE: i64 = 3 |
| 58 | const DO_EXIT_REFUSED: i64 = 4 |
| 59 | const DO_EXIT_UNOBSERVABLE: i64 = 5 |
| 61 | const DO_PERMIL: i64 = 1000 |
| 62 | const DO_US_PER_S: i64 = 1000000 |
| 63 | const DO_MILLI: i64 = 1000 |
| 64 | const DO_MIN_FRAMES: i64 = 3 |
| 71 | const DO_MIN_ROI_PX: i64 = NX_MOTION_WIN * NX_MOTION_WIN |
| 74 | const DO_FLOW_MIN_Q8: i64 = 1 |
functions
| 76 | func do_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: do_out |
| 77 | func do_out(s: *u8) -> i64 { sys_write(DO_OUTFD, s, do_slen(s)); return 0 } |
| 78 | func do_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: main |
| 80 | func do_num(v: i64) -> i64 |
| 95 | func do_kv(k: *u8, v: i64) -> i64 { do_out(k); do_out("=" as *u8); do_num(v); do_out("\n" as *u8); return 0 } |
| 96 | func do_ks(k: *u8, v: *u8) -> i64 { do_out(k); do_out("=" as *u8); do_out(v); do_out("\n" as *u8); return 0 } |
| 98 | func do_atoi(s: *u8) -> i64 called by 1: main |
| 115 | func do_crop(dst: *Image, base: *u8, frame_off: i64, parent_stride: i64, called by 1: main |
| 129 | func main(argc: i64, argv: *i64) -> i64 |