binocular_distance_ms — MV stereo op

• Data kinds: image2d × image2d → table

• Call: import fullseye as fs; fs.ledger.binocular_distance_ms(left, right, focal, baseline, doffs=0.0, max_disp=32, window=5, P1=5.0, P2=50.0, paths=4, lr_tolerance=1.0) (to call the implementation directly, import mvstereo; mvstereo.binocular_distance_ms(left, right, focal, baseline, doffs=0.0, max_disp=32, window=5, P1=5.0, P2=50.0, paths=4, lr_tolerance=1.0); from the registry, opsmv.get("binocular_distance_ms"))

• HALCON equivalent: binocular_distance_ms (the HALCON reference is a useful guide to its meaning and parameters)

• GPU: none (CPU reference implementation only)

Usage

Compute the distance image of a rectified stereo pair (Z = focal * baseline / (disparity + doffs)).

> The detailed description below is the original text — the summary and the headings are translated.

視差は binocular_disparity_ms の値をそのまま使う。無効の画素と、視差が 0 以下で距離の決まらない画素は distance が NaN になる。空の入力(left が 0 要素)は ValueError。

Args:

left: 左の画像 (H, W)。

right: 右の画像 (H, W)。

focal: 焦点距離(画素、> 0)。

baseline: 基線長(距離の単位がこの単位になる、> 0)。

doffs: 主点の差 cx_right - cx_left(画素)。

max_disp: 探す視差の上限。

window: census と SAD の窓(奇数)。

P1: 視差 1 の段差の罰則。

P2: 視差 2 以上の段差の罰則。

paths: 集約の方向数(2 / 4)。

lr_tolerance: 左右一致の許容差(画素)。

Returns:

distance(無効は NaN)、disparity、valid、score を持つ dict。

Detailed usage guide

• machine_vision_classics family guide

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)

• machine_vision_tour — py -3.11 examples/machine_vision_tour.py

• poc_real_stereo_multiscanline — py -3.11 examples/poc_real_stereo_multiscanline.py

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

map_image · rectify_to_world_plane · change_radial_distortion_image · find_ncc_models · run_bg_esti · give_bg_esti · update_bg_esti · classify_class_gmm

Same category (stereo)

binocular_disparity_ms · reconstruct_surface_stereo


*Provenance: mvstereo.py — MV 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.