binocular_disparity_ms — MV stereo op

• Data kinds: image2d × image2d → table

• Call: import fullseye as fs; fs.ledger.binocular_disparity_ms(left, right, 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_disparity_ms(left, right, max_disp=32, window=5, P1=5.0, P2=50.0, paths=4, lr_tolerance=1.0); from the registry, opsmv.get("binocular_disparity_ms"))

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

• GPU: none (CPU reference implementation only)

Usage

Compute rectified-stereo disparity with semi-global matching, verify it left-right and interpolate to subpixel.

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

左基準と右基準の視差を stereo.disparity_sgm で 1 回ずつ計算し、対応点で lr_tolerance より食い違う画素と参照できない左端の列を無効にする。残りの画素は SAD の 3 点放物線で小数の視差へ補間する。無効の画素は disparity が NaN になる。空の入力(left が 0 要素)は ValueError。

Args:

left: 左の画像 (H, W)。視差はこの画像を基準にする。

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

max_disp: 探す視差の上限(画素、>= 1)。

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

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

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

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

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

Returns:

disparity(float、無効は NaN)、valid(bool)、score(0..1、大きいほど

コストの谷が深い)を持つ dict。

出典: H. Hirschmüller, IEEE Trans. PAMI 30(2), 328-341 (2008), doi:10.1109/TPAMI.2007.1166。

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_3d_sensor_modalities — py -3.11 examples/poc_3d_sensor_modalities.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_distance_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.