synthesize_fringes — 3D structured_light op

• 数据种类:image2d → images

• 调用: import fullseye as fs; fs.ledger.synthesize_fringes(height, n_steps=4, freq=1.0, phase_gain=1.0, bias=0.5, amplitude=0.5, axis=1, noise=0.0, seed=None, return_phase=False)(要直接调用实现,import fringe; fringe.synthesize_fringes(height, n_steps=4, freq=1.0, phase_gain=1.0, bias=0.5, amplitude=0.5, axis=1, noise=0.0, seed=None, return_phase=False);从台账取用则 ops3d.get("synthesize_fringes"))

• 经台账调用的返回值: fullseye.ledger.synthesize_fringes(...) 只返回声明的 out 类型 images 的值(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.synthesize_fringes.raw(...),或直接调用 fringe.synthesize_fringes。

用法

由已知 height map 合成 N 步相移条纹图像序列(用于测试/样例生成)。

模型:总相位 φ(x,y) = φ_carrier + phase_gain·height。载波 φ_carrier 是横穿视场的线性斜坡(freq 个周期)。各帧为 I_n = bias + amplitude·cos(φ - δ_n), δ_n = 2πn/N。在此符号约定下,wrapped_phase(...) 可原样恢复总相位 φ。

height: 2D 数组(被测对象的高度场,任意单位)。

n_steps: 相移张数 N(>=3)。

freq: 横穿视场宽度的载波周期数(条纹数)。0 表示无载波(只有 height)。

phase_gain: 高度→相位的转换增益(rad/单位)。对应解码侧的标定 k = 1/phase_gain。

bias: 平均亮度 a(默认 0.5)。

amplitude: 条纹振幅 b(默认 0.5)。bias±amplitude 落在 [0,1] 内较为自然。

axis: 载波方向(1 = 沿列方向 x 的默认值,0 = 行方向 y)。

noise: 附加高斯噪声的标准差(0 表示无噪声)。

seed: 噪声用随机种子。

return_phase: True 时返回 (images, total_phase)(用于测试、调试)。

返回值:(N, H, W) float 数组(裁剪到值域 [0,1])。return_phase=True 时也返回相位。

背景知识指南(该算子背后的物理与约定)

• depth_sensors — 深度传感器知识 —— 测距原理、实机数值、缺测的表现

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

• structured_light — py -3.11 examples_3d/structured_light.py

类型可衔接的下一个算子(可接受 images 作为输入)

fuse_to_voxel · photometric_stereo · wrapped_phase · graycode_decode · decode_fringe · carve · visual_hull

同类别(structured_light)

wrapped_phase · unwrap_phase_2d · graycode_decode · decode_fringe · absolute_phase · triangulate_column


*Provenance: fringe.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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