foe_from_flow — DRIVE ttc op

• Data kinds: image2d × image2d → table

• Call: import fullseye as fs; fs.ledger.foe_from_flow(u, v, mask=None, *, min_speed: 'float' = 0.3, max_speed: 'float' = inf, iters: 'int' = 5, angle_scale: 'float' = 0.05) -> 'dict' (to call the implementation directly, import drivettc; drivettc.foe_from_flow(u, v, mask=None, *, min_speed: 'float' = 0.3, max_speed: 'float' = inf, iters: 'int' = 5, angle_scale: 'float' = 0.05) -> 'dict'; from the registry, opsdrive.get("foe_from_flow"))

Usage

Estimates the focus of expansion (FoE) from optical flow: {"foe": (col, row), "n", "residual"}.

The flow of pure translation is radial from the FoE (Longuet-Higgins & Prazdny 1980), so every pixel's flow line (the line through point p_i in the direction of the flow) passes through the FoE. FoE = the point minimising Σ w_i·dist(F, flow line_i)² (2×2 normal equations). The weights are iteratively 1/|p_i − F|·1/(1 + (角度残差/angle_scale)²) (Cauchy-like). The farther the pixel, the more the error in its flow-line direction affects the FoE position, so we divide by distance, and outliers (occlusion, textureless areas) are suppressed by the angle residual. The entry point (round 16) that derives from the flow the FoE treated as "known" in round 15. Theorem gate: feeding the true flow (flow_from_depth_motion) matches foe_from_motion to 1e-9.

mask selects the pixels to use (default = pixels that are finite with speed in [min_speed, max_speed]). Fewer than 3 valid pixels, or singular normal equations (all flow lines parallel), raise ValueError.

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_world_terrain — py -3.11 examples/poc_world_terrain.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 (ttc)

relative_motion · foe_from_motion · flow_from_depth_motion · ttc_truth · ttc_from_flow · ttc_from_scale · ttc_from_range · label_extent


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