triangulate_column — 3D structured_light op

• 数据种类:image2d → depth

• 调用: import fullseye as fs; fs.ledger.triangulate_column(column, k_cam, k_proj, rot, trans) -> 'np.ndarray'(要直接调用实现,import fringe; fringe.triangulate_column(column, k_cam, k_proj, rot, trans) -> 'np.ndarray';从台账取用则 ops3d.get("triangulate_column"))

用法

由每个相机像素的「投影仪列号」三角测量出深度 Z(结构光的最后一段)。

结构光扫描仪的几何本身:相机像素 (u,v) 张成 1 条视线,投影仪的列号 u_p 张成 1 个平面(包含投影仪中心与该列的平面)。视线与平面的交点就是表面的 3D 点,其相机坐标系下的 Z 即深度。这是闭式解,既不需要迭代也不需要优化。

column:(H, W) 的投影仪列号(亚像素实数)。由相位得到的值可直接

传入。NaN = 未确定像素(输出也为 NaN)。

k_cam: 相机内参矩阵 3x3(fx, fy, cx, cy[, skew])。像素中心位于整数坐标

(与 render3d.render_mesh / camera.depth_to_points 相同的约定)。

k_proj:投影仪内参矩阵 3x3。只使用第 0 行(列方向)和第 2 行。

rot: 3x3 旋转。相机坐标系 → 投影仪坐标系(X_proj = rot·X_cam + trans)。

trans: 长度为 3 的平移(同上,单位与场景相同)。禁止零向量

(基线 0 = 相机与投影仪在同一点。平面与视线不相交,深度无法定义)。

返回值:(H, W) float64 的深度图(相机前方的 Z,与 render_mesh 的 depth 为同一量)。

交点在后方(Z<=0)或视线与平面平行的像素为 NaN。

推导:X_cam = Z·d(d = K_cam⁻¹[u,v,1])。投影仪侧的列条件为(K_proj[0] − u_p·K_proj[2])·X_proj = 0。代入 X_proj = rot·X_cam + trans, 对 Z 求解得 Z = −(a·trans) / (a·(rot·d)),a = K_proj[0] − u_p·K_proj[2]。

Raises:形状、矩阵不正确,基线为零,相机矩阵奇异时抛出 ValueError。

来源(公开文献):基于光线与平面交点的结构光三角测量 — Hartley & Zisserman, *Multiple View Geometry* 2nd ed. §12(射影几何中的相交)/ Salvi et al., *Pattern Recognition* 43 2010(结构光图案的分类与解码)。

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

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

参考(示例数据、文献)

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

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

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

• structured_light_scan — py -3.11 examples_3d/structured_light_scan.py

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

depth_to_points · tsdf_from_depth · to_points · fuse_to_voxel · depth_to_organized_points · normals_from_depth · occlusion_edges · bearing_angle_image

同类别(structured_light)

wrapped_phase · unwrap_phase_2d · graycode_decode · decode_fringe · synthesize_fringes · absolute_phase


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

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