wrapped_phase — 3D structured_light op

• Data kinds: images → image2d

• 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.

Standard N-step formula φ = atan2(Σ_n I_n sin(2πn/N), Σ_n I_n cos(2πn/N)). Assumes N >= 3 equally spaced phase shifts. Returns a 2D array of the wrapped phase (-π,π] at each pixel.

images: a sequence of length N (each a 2D [0,1] image) or an (N, H, W) array.

Computation: with equally spaced phase shifts δ_n = 2πn/N (n = 0..N-1), s = Σ_n I_n sin δ_n and c = Σ_n I_n cos δ_n are taken with tensordot, giving np.arctan2(s, c). For the model I_n = a + b cos(φ - δ_n) (the same sign convention as synthesize_fringes) φ comes back without a sign flip. The mean luminance a cancels, so the result is not affected by bias.

Input and validation (ValueError): None / not convertible to 3-D (N, H, W) / N < 3 / contains NaN or Inf. The value range [0, 1] is a precondition, not checked (values outside it still compute).

Returns: (H, W) float64, range (-π, π]. Pixels with s = c = 0 (no fringes, zero modulation) return arctan2(0, 0) = 0 and give neither an error nor NaN — to select reliable pixels, look at the modulation depth with modulation (a function of the same module) (min_modulation of decode_fringe does that).

Caution: passing an image sequence whose phase shifts are not equally spaced, or whose count and order do not match, gives no error but a "plausibly wrong" phase. The next step is unwrap_phase_2d (spatial unwrapping) or absolute_phase (fringe order fixed by a coarse absolute phase).

Background guides (the physics and conventions behind this op)

• depth_sensors — Depth sensors — ranging principles, real-device figures, how dropouts appear

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_light — py -3.11 examples_3d/structured_light.py

• structured_light_scan — py -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.