structured_light op• 資料種類:image2d × image2d → image2d
• 呼叫: import fullseye as fs; fs.ledger.absolute_phase(wrapped, coarse) -> 'np.ndarray'(要直接呼叫實作,import fringe; fringe.absolute_phase(wrapped, coarse) -> 'np.ndarray';從台帳取用則 ops3d.get("absolute_phase"))
用粗糙但絕對的相位估計確定條紋級次,把捲繞相位變成絕對相位。
Φ = wrapped + 2π·round((coarse − wrapped) / 2π)
wrapped:wrapped_phase 的輸出,(-π,π] 的 2D 陣列(高精度、無絕對級次)。
coarse: 同形狀的 2D 陣列。絕對但粗略的相位估計 [rad]。典型的是把以 Gray code 解碼的投影機
行號換算成相位(2π·freq·col/width)。可含 NaN(輸出也為 NaN)。
回傳值:絕對相位 [rad] (2D float64)。無效像素(任一方為 NaN)為 NaN。
為何需要(與空間展開的區別):unwrap_phase_2d 沿相鄰像素追蹤來連接 2π 跳變, 因此 (a) 殘留全域偏移 +2πm,(b) 在被遮擋切開的孤島之間級次無法傳播。本 op 逐像素獨立確定級次,因此即使在分成孤島的場景中也是絕對的, 也不需要傳播。代價是要求 coarse 的誤差小於半個週期(π)。
要求(fail-closed):|coarse − Φ_true| < π。違反時 round 會選中相鄰級次, 僅該像素靜默偏移 2π(= 1 條條紋對應的深度)。請選擇條紋數 freq,使 Gray code 的粗略度(±0.5 行) 換算為相位後的量不超過半個週期(例:投影機寬度 512 px、freq 24 → 1 個週期 21.3 px,Gray 的 ±0.5 px 完全在範圍內)。
Raises:形狀不一致、非 2D、wrapped 大幅超出 (-π,π] 時拋出 ValueError。
來源(公開文獻):結合 Gray code 與相移獲得絕對相位的合成法 — Sansoni et al., *Appl. Opt.* 38(31) 1999 / Zhang, *Opt. Lasers Eng.* 48 2010(綜述)。Gray code 本身的投影見 Inokuchi et al., *ICPR* 1984。
• depth_sensors — 深度感測器知識 —— 測距原理、實機數值、缺測的表現
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• structured_light_scan — py -3.11 examples_3d/structured_light_scan.py
image2d 作為輸入)fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade
structured_light)wrapped_phase · unwrap_phase_2d · graycode_decode · decode_fringe · synthesize_fringes · triangulate_column
*Provenance: fringe.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.