structured_light opimage2d → depthimport 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(構造化光パターンの分類と復号)。
py -3.11 examples_3d/structured_light_scan.pydepth を入力に取れる)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 operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.