code wiki / (root) / nx_dynaoracle.nx

nx_dynaoracle.nx

buildroot/runtime/nx_dynaoracle.nx

20414 B390 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_image.nx nx_motion.nx nx_ringdown_lib.nx nx_dynaoracle.nx

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

main do_out sys_write do_slen do_atoi do_num sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_image_alloc sys_mmap ↻ nx_motion_pyr_new nx_motion_pyr_levels nx_image_s64_alloc sys_mmap ↻ nx_image_alloc ↻ do_crop nx_motion_mean_flow_pyr nx_motion_copy_into

structs

none

consts

54const DO_OUTFD: i64 = 1
55const DO_EXIT_OK: i64 = 0
56const DO_EXIT_USAGE: i64 = 2
57const DO_EXIT_UNREADABLE: i64 = 3
58const DO_EXIT_REFUSED: i64 = 4
59const DO_EXIT_UNOBSERVABLE: i64 = 5
61const DO_PERMIL: i64 = 1000
62const DO_US_PER_S: i64 = 1000000
63const DO_MILLI: i64 = 1000
64const DO_MIN_FRAMES: i64 = 3
71const DO_MIN_ROI_PX: i64 = NX_MOTION_WIN * NX_MOTION_WIN
74const DO_FLOW_MIN_Q8: i64 = 1

functions

76func 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
77func do_out(s: *u8) -> i64 { sys_write(DO_OUTFD, s, do_slen(s)); return 0 }
called by 3: do_kvdo_ksmain calls 2: sys_writedo_slen
78func do_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
80func do_num(v: i64) -> i64
called by 2: do_kvmain calls 2: sys_mmapsys_write
95func do_kv(k: *u8, v: i64) -> i64 { do_out(k); do_out("=" as *u8); do_num(v); do_out("\n" as *u8); return 0 }
called by 1: main calls 2: do_outdo_num
96func do_ks(k: *u8, v: *u8) -> i64 { do_out(k); do_out("=" as *u8); do_out(v); do_out("\n" as *u8); return 0 }
called by 1: main calls 1: do_out
98func do_atoi(s: *u8) -> i64
called by 1: main
115func do_crop(dst: *Image, base: *u8, frame_off: i64, parent_stride: i64,
called by 1: main
129func main(argc: i64, argv: *i64) -> i64