structured_light opimages → image2dimport 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 に使う。
py -3.11 examples_3d/graycode_structured_light.pypy -3.11 examples_3d/structured_light_scan.pyimage2d を入力に取れる)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 operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.