plane_sweep_depth — 3D plane_sweep_stereo op

• 資料種類:image2d × image2d → depth

• 呼叫: import fullseye as fs; fs.ledger.plane_sweep_depth(img_ref: 'np.ndarray', img_src: 'np.ndarray', K: 'np.ndarray', R: 'np.ndarray', t: 'np.ndarray', depth_candidates, window: 'int' = 1, normal=(0.0, 0.0, 1.0)) -> 'np.ndarray'(要直接呼叫實作,import plane_sweep; plane_sweep.plane_sweep_depth(img_ref: 'np.ndarray', img_src: 'np.ndarray', K: 'np.ndarray', R: 'np.ndarray', t: 'np.ndarray', depth_candidates, window: 'int' = 1, normal=(0.0, 0.0, 1.0)) -> 'np.ndarray';從台帳取用則 ops3d.get("plane_sweep_depth"))

用法

用 plane-sweep stereo 估計稠密深度圖。→ (H,W) depth。

在各深度平面上將 src 扭曲到 ref,逐像素選出 photo-consistency 最小的候選深度(winner-take-all)。所有候選下都在視野外的像素為 NaN。fail-closed(失敗即拒絕)(空/非 2D/shape 不一致/非正深度)。

• img_ref / img_src:同形狀的 (H,W) 灰階 float。基準相機為 [I|0],source 為 P_src = K [R|t](X_src = R X_ref + t)。

• K:共用的 (3,3) 內參矩陣(奇異時 ValueError)。

• depth_candidates:基準相機座標下正的有限深度序列(D 個)。回傳的深度必定是其中的某一個,量化誤差約為候選間隔。候選通常在近處取得較密(依逆深度等間隔)。

• window:成本的 box 聚合尺寸(預設 1 = 逐像素絕對差)。2 以上時為視窗內 SAD 除以有效像素數正規化後的值,在紋理貧乏區域較穩定,但階躍會變模糊。小於 1 時 ValueError。

• normal:掃掠平面的法線(預設 (0,0,1) = 正對平行)。

回傳值為 (H,W) float。所有候選下都映射到 src 視野外的像素(成本 ∞)為 NaN。在輝度恆定的區域,所有候選的成本相同,argmin 回傳第一個候選,因此會混入沒有可信度的深度。需要成本體 (D,H,W) 本身時,請使用同一模組的 cost_volume。所得深度可以用 depth_to_points 轉換為點雲。

背景知識指南(該運算子背後的物理與規範)

• depth_sensors — 深度感測器知識 —— 測距原理、實機數值、缺測的表現

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• plane_sweep_depth — py -3.11 examples_3d/plane_sweep_depth.py

型別可銜接的下一個運算子(可接受 depth 作為輸入)

depth_to_points · tsdf_from_depth · to_points · fuse_to_voxel · depth_to_organized_points · normals_from_depth · occlusion_edges · bearing_angle_image

同類別(plane_sweep_stereo)

warp_by_plane


*Provenance: plane_sweep.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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