wrapped_phase — 3D structured_light op

Data kinds: imagesimage2d

Call: import fullseye as fs; fs.ledger.wrapped_phase(images) -> 'np.ndarray' (to call the implementation directly, import fringe; fringe.wrapped_phase(images) -> 'np.ndarray'; from the registry, ops3d.get("wrapped_phase"))

Usage

Compute the wrapped phase (−π, π] from an N-step phase-shifted fringe image series.

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

標準 N-step 公式 φ = atan2(Σ_n I_n sin(2πn/N), Σ_n I_n cos(2πn/N))。N >= 3 の等間隔位相シフトを

仮定。返り値は各画素の巻き込み位相(-π,π] の 2D 配列。

images: 長さ N のシーケンス(各 2D [0,1] 画像)または (N, H, W) 配列。

計算: 位相シフト量を等間隔 `δ_n = 2πn/N(n = 0..N-1`)とし、

`s = Σ_n I_n sin δ_nc = Σ_n I_n cos δ_ntensordot` で取って

`np.arctan2(s, c)I_n = a + b cos(φ - δ_n) のモデル(synthesize_fringes`

と同じ符号規約)なら `φ が符号反転なしで戻る。平均輝度 a` は消えるので

バイアスの影響を受けない。

入力と検証(`ValueError): None / 3-D (N, H, W)` に変換できない /

`N < 3 / NaN・Inf を含む。値域 [0, 1]` は前提であって検査はしない(範囲外

でも計算は通る)。

返り値: `(H, W) float64、値域 (-π, π]s = c = 0` の画素(縞が無い・

変調ゼロ)は `arctan2(0, 0) = 0` を返し、エラーにも NaN にもならない —

信頼できる画素を選ぶには `modulation`(同モジュールの関数)で変調度を見る

(`decode_fringemin_modulation` がそれを行う)。

注意: 位相シフト量が等間隔でない・枚数と順序が合っていない画像列を渡すと、

エラーにならず「もっともらしく間違った」位相が出る。次段は

`unwrap_phase_2d(空間展開)か absolute_phase`(粗い絶対位相で次数確定)。

Background guides (the physics and conventions behind this op)

depth_sensors — 深度センサの知識 — 測距原理・実機の値・欠測の出方

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.

Runnable examples (verified samples that actually call this op)

structured_lightpy -3.11 examples_3d/structured_light.py

structured_light_scanpy -3.11 examples_3d/structured_light_scan.py

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

fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade

Same category (structured_light)

unwrap_phase_2d · graycode_decode · decode_fringe · synthesize_fringes · absolute_phase · triangulate_column


*Provenance: fringe.py — 3D 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.