time_stretch_from_gravity — DRIVE ball op

• Data kinds: none → table (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.time_stretch_from_gravity(g_fit: 'float', g_ref: 'float' = 9.81) -> 'dict' (to call the implementation directly, import ballistics; ballistics.time_stretch_from_gravity(g_fit: 'float', g_ref: 'float' = 9.81) -> 'dict'; from the registry, opsdrive.get("time_stretch_from_gravity"))

• GPU: none (CPU reference implementation only)

Usage

Inverts, in closed form, the time-stretch factor of a video from the fitted gravitational acceleration. In footage whose time axis was stretched by k (slow motion or a relabelled frame rate) the trajectory keeps its shape while g appears as g/k², so k = √(g_ref / g_fit). Returns {"k", "g_fit", "g_ref", "log_k"} (log_k = ln k is 0 without tampering and its sign tells faster/slower; when passing to imgforensics.evidence_quantile use |log_k| as the "larger is stronger" evidence). g_fit ≤ 0, non-finite values and g_ref ≤ 0 raise ValueError (no stretch factor is defined for a trajectory whose gravity points up or is absent).

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_video_physics_consistency — py -3.11 examples/poc_video_physics_consistency.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (ball)

ball_params · impact_params · flight_vacuum · flight_ode · flight_simulate · flight_state_at · magnus_lift_coefficient · drag_coefficient_sphere


*Provenance: ballistics.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.