swarm_field_from_tracks — DRIVE swarmflow op

• 데이터 종류: any × scalar × scalar → table

• 호출: import fullseye as fs; fs.ledger.swarm_field_from_tracks(frames, res: 'float', frame_dt: 'float', center=(0.0, 0.0), grid_step=None, h=None, threshold: 'float' = 0.3, max_disp_px=None, min_count: 'int' = 3, outlier_k: 'int' = 12, outlier_threshold: 'float' = 3.0) -> 'dict'(구현을 직접 호출하려면 import swarmflow; swarmflow.swarm_field_from_tracks(frames, res: 'float', frame_dt: 'float', center=(0.0, 0.0), grid_step=None, h=None, threshold: 'float' = 0.3, max_disp_px=None, min_count: 'int' = 3, outlier_k: 'int' = 12, outlier_threshold: 'float' = 3.0) -> 'dict', 원장에서 가져오려면 opsdrive.get("swarm_field_from_tracks"))

사용법

> 이 연산자의 설명은 아직 번역이 없습니다. 원문을 그대로 싣습니다.

俯瞰のコマ列 → 個体を検出(blob2d の連結成分 + 明るさの重心)→ 隣のコマと相互最近傍でつなぐ → 速度を SPH 核で格子へ。

つなぐ条件: A の点の最近傍が B の点で、その B の点の最近傍も A の点(相互)、かつ移動が `max_disp_px` 以下

(既定 = 検出した点どうしの最近傍の間隔の中央値の 0.45 倍。1 コマの移動がこれを超えると取り違える = 追跡の限界)。

全部のコマの組の速度を一つの集団にして平均する(定常の流れの前提)。取り違えた組は速度が桁で外れる(実測: 一様に

撒いた 1300 個で 2 % の組が 1〜3 m/s ずれ、格子の rms 誤差が U の 16 % になった)ので、格子へ移す前に**正規化した

中央値の検査**(PIV の慣行、近い `outlier_k 個の速度の中央値からのずれ / その近傍のずれの中央値 > outlier_threshold`)

で捨てる。

Args:

frames: 同じ大きさの (H, W) のコマの列(2 枚以上)。

res: 画素の大きさ [m/px]。

frame_dt: コマの間隔 [s]。

center: 画像の中心の世界座標 [m]。

grid_step: 格子の間隔 [m] (既定 = 個体の間隔の推定値)。

h: 格子へ移す核の h [m] (既定 = grid_step)。

threshold: 2 値化のしきい値(最小〜最大の割合)。

max_disp_px: 1 コマの移動の上限 [px]。

min_count: 格子の台の中に要る速度の数。

outlier_k: 中央値の検査に使う近傍の数(0 で検査しない)。

outlier_threshold: 検査のしきい値。

Returns:

速度場の dict(module の規約)+ `points (M, 2)・point_velocity` (M, 2)(つないだ組の中点と速度)、

`n_detected(コマごと)、n_linked、n_outliers(中央値の検査で捨てた組)、n_rejected_blobs`、

`spacing`(個体の間隔の推定 [m])。

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

• poc_swarm_obstacle_from_flow — py -3.11 examples/poc_swarm_obstacle_from_flow.py

타입이 이어지는 다음 연산자(table 를 입력으로 받는 것)

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

같은 카테고리(swarmflow)

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


*Provenance: swarmflow.py — DRIVE 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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