wrapped_phase — 3D structured_light op

• Data kinds: images → image2d

• Call: import fullseye as fs; fs.ledger.wrapped_phase(images) -> 'np.ndarray' (implementation को सीधे call करना हो तो import fringe; fringe.wrapped_phase(images) -> 'np.ndarray', registry से लेना हो तो ops3d.get("wrapped_phase"))

उपयोग

N-step phase-shift fringe images से wrapped phase (-π, π] निकालता है।

standard N-step formula φ = atan2(Σ_n I_n sin(2πn/N), Σ_n I_n cos(2πn/N))। N >= 3 बराबर अंतराल वाले phase shifts माने जाते हैं। return value हर pixel की wrapped phase (-π,π] का 2D array है।

images: length N की sequence (हर एक 2D [0,1] image) या (N, H, W) array।

गणना: phase shifts को बराबर अंतराल δ_n = 2πn/N (n = 0..N-1) मानकर, s = Σ_n I_n sin δ_n और c = Σ_n I_n cos δ_n को tensordot से निकालकर np.arctan2(s, c)। I_n = a + b cos(φ - δ_n) model (synthesize_fringes जैसा ही sign convention) में φ बिना sign उलटे वापस मिलता है। औसत luminance a कट जाती है, इसलिए bias का असर नहीं पड़ता।

input और validation (ValueError): None / 3-D (N, H, W) में बदला न जा सके / N < 3 / NaN या Inf हो। value range [0, 1] एक पूर्वधारणा है, इसकी जाँच नहीं होती (range के बाहर भी गणना चलती है)।

return value: (H, W) float64, range (-π, π]। s = c = 0 वाले pixels (कोई fringe नहीं, modulation शून्य) arctan2(0, 0) = 0 लौटाते हैं, न error आता है न NaN — भरोसेमंद pixels चुनने के लिए modulation (इसी module का function) से modulation depth देखें (decode_fringe का min_modulation यही करता है)।

सावधानी: अगर phase shifts बराबर अंतराल पर न हों, या images की संख्या और क्रम मेल न खाएँ, तो error नहीं आता बल्कि "विश्वसनीय दिखने वाली गलत" phase मिलती है। अगला चरण है unwrap_phase_2d (spatial unwrapping) या absolute_phase (coarse absolute phase से order तय करना)।

पृष्ठभूमि guides (इस op के पीछे की physics और conventions)

• depth_sensors — Depth sensors — ranging के सिद्धांत, असली devices के आँकड़े, dropouts कैसे दिखते हैं

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• structured_light — py -3.11 examples_3d/structured_light.py

• structured_light_scan — py -3.11 examples_3d/structured_light_scan.py

वे अगले ops जिनसे type जुड़ता है (image2d को input के रूप में लेते हैं)

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

इसी category के (structured_light)

unwrap_phase_2d · graycode_decode · decode_fringe · synthesize_fringes · absolute_phase · triangulate_column


*Provenance: fringe.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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