structured_light op• 数据种类:images → image2d
• 调用: import fullseye as fs; fs.ledger.graycode_decode(bit_images, thresh=0.5) -> 'np.ndarray'(要直接调用实现,import fringe; fringe.graycode_decode(bit_images, thresh=0.5) -> 'np.ndarray';从台账取用则 ops3d.get("graycode_decode"))
Gray code 位图像序列 → 整数条纹级次图(绝对级次)。
bit_images:长度为 K 的序列(各为 2D 图像,亮=1 / 暗=0)。MSB first(bit_images[0] 为
最高位)。用 thresh 二值化。
thresh: 二值化阈值(像素值 >= thresh 为 1)。
处理:将各位平面二值化 → 按 MSB first 组装 Gray 值 → Gray→binary 转换
(binary = gray ^ (gray>>1) ^ ... ^ (gray>>(K-1))),返回绝对级次(整数)。
返回值:dtype int64 的 2D 级次图(值域 0..2**K-1)。
校验(ValueError):None / 无法转换为 (K, H, W) / K < 1 / K > 62(超出 int64) / 含 NaN、Inf。thresh 不做检查(以与像素值相同的尺度给出。[0, 1] 图像时默认为 0.5)。
二值化只用固定阈值 >= thresh — 不与反转图案(负像)比较, 也不做局部阈值。因阴影、低反射而显暗的像素被解码为 0 位, 不报错却得到错误级次,因此调用方应另行持有用 modulation 等生成的可信掩模。
级次的含义:Gray 码相邻码字只差 1 位,因此边界像素的二值化错误只会使级次偏移 ±1(若是 binary 码则会大幅跳变)。返回的整数可作为投影仪列号或条纹绝对级次,用于 absolute_phase 的 coarse (按 2π * 级次 换算为相位)或 triangulate_column 的 column。
• depth_sensors — 深度传感器知识 —— 测距原理、实机数值、缺测的表现
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• graycode_structured_light — py -3.11 examples_3d/graycode_structured_light.py
• 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 · decode_fringe · synthesize_fringes · absolute_phase · triangulate_column
*Provenance: fringe.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.