photometric op• Data kinds: images → normalmap
• Call: import fullseye as fs; fs.ledger.photometric_stereo(images, lights, mask=None, normalize=True, *, lit_only=False, lit_thresh=0.001) (to call the implementation directly, import photometric; photometric.photometric_stereo(images, lights, mask=None, normalize=True, *, lit_only=False, lit_thresh=0.001); from the registry, ops3d.get("photometric_stereo"))
• Return value through the ledger: fullseye.ledger.photometric_stereo(...) returns **only the declared out type normalmap** (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.photometric_stereo.raw(...) or call photometric.photometric_stereo directly.
Lambertian photometric stereo: recover normals and albedo from N images taken under known light directions. → (normals HxWx3, albedo HxW).
> The detailed description below is the original text — the summary and the headings are translated.
I_n = albedo * max(N·L_n, 0)。各画素で g = albedo*N を最小二乗 g = pinv(L) @ I で解き、
albedo=|g|, normal=g/|g|。N>=3 必要。albedo~0 や mask 外の画素は normal=(0,0,1)。
normalize=True で光源ベクトルを単位方向に正規化(render_lambertian と同一規約 = アルベド絶対値が正しく出る)。
強度重み付き光源を使うなら normalize=False にし、合成側も生ベクトルで揃えること。
lit_only(2026-09-04 追加): 付着影(attached shadow)を外して解く。モデルの
max(·, 0) は非線形なので、N·L < 0 の観測(真の値は 0)を線形最小二乗にそのまま入れると
解が偏る ―― 実測: 影も AO も無い球で中央値 9°、点灯している光源だけで解くと
0.000°。既定は False(従来の挙動を変えない)。True にすると画素ごとに
I > lit_thresh の光源だけを使って解き直す。同じ点灯パターンの画素をまとめて
1 回の疑似逆行列で処理するので、追加コストは光源数ぶんのパターン数に比例する程度
(6 灯なら最大 64 群)。点灯光源が 3 未満の画素は全光源の解に戻す(fail-open:
解けない画素を NaN にするより、偏っていても値がある方が下流の積分が壊れない)。
lit_thresh: 「点灯している」とみなす輝度の下限。撮影ノイズより上に置く。
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• photometric_stereo — py -3.11 examples_3d/photometric_stereo.py
normalmap as input)fuse_to_voxel · render_shaded · phong_shade · matcap_shade · brdf_lommel_seeliger · brdf_hapke · bump_normals_fbm · integrate_normals
photometric)surface_normals · integrate_normals · render_lambertian
*Provenance: photometric.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.