swarm_field_from_piv — DRIVE swarmflow op

• Data kinds: any × scalar × scalar → table

• Call: import fullseye as fs; fs.ledger.swarm_field_from_piv(frames, res: 'float', frame_dt: 'float', center=(0.0, 0.0), window: 'int' = 24, overlap: 'float' = 0.5, min_peak_ratio: 'float' = 1.1, outlier_threshold=3.0) -> 'dict' (to call the implementation directly, import swarmflow; swarmflow.swarm_field_from_piv(frames, res: 'float', frame_dt: 'float', center=(0.0, 0.0), window: 'int' = 24, overlap: 'float' = 0.5, min_peak_ratio: 'float' = 1.1, outlier_threshold=3.0) -> 'dict'; from the registry, opsdrive.get("swarm_field_from_piv"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

俯瞰のコマ列 → 隣どうしの相互相関の PIV(pivops.piv_cross_correlate)→ 全部の組の平均 → 世界の速度場。

個体を一つずつ見分けない(重なっても使える)代わりに、窓(`window` px)より細かい乱れは均される。峰の比が

`min_peak_ratio` 未満の窓は欠測(NaN)。★群れは格子のように並びやすく(押し合いで間隔がそろう)、相関の峰が

隣の格子の位置にも立つので峰の比が 1 に近い。実測(間隔 7.5 px、窓 24): しきい値 0 だと取り違えた窓が混ざり個体の

速度との rms が U の 13.7 %、1.1 で 1.9 %(測れた窓 85 %)、1.3 では測れた窓が 18 % に減る —— 既定は 1.1。

さらに組ごとに正規化した中央値の検査(pivops.piv_outlier_mask、しきい値 `outlier_threshold`、None で掛けない)で

外れた窓を欠測にしてから平均する。pivops の注意どおり、急な勾配(障害物の肩)を外れと呼ばないよう慣行の 2 より緩い 3。pivops の成分 (dy, dx) [px/コマ] を u = dx·res/Δt、v = −dy·res/Δt に直す。

Returns:

速度場の dict + `valid_fraction(窓のうち測れた割合)、n_pairs`。

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_swarm_obstacle_from_flow — py -3.11 examples/poc_swarm_obstacle_from_flow.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 (swarmflow)

sph_kernel · sph_density_pressure · swarm_simulate · swarm_render_overhead · swarm_field_from_tracks · potential_flow_cylinder · velocity_deficit_map · stagnation_from_centerline


*Provenance: swarmflow.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.