photometric op• 데이터 종류: images → image2d
• 호출: import specularity; specularity.photometric_residual(images, lights, normals=None, albedo=None, normalize=True)(또는 opsspecular.get("photometric_residual"))
Lambert 모델이 화소별로 얼마나 어긋나는지. → (H, W) RMS 잔차.
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
`sqrt(mean_n (albedo * (n.L_n) - I_n)^2)` — the root-mean-square
disagreement between the linear model and the measurements, in the units of
the input radiance. On a synthetic Lambertian surface with the true
float64 normals and albedo supplied it measures 1.4e-16 at worst; with them
omitted the floor rises to 4.5e-08, because
:func:photometric.photometric_stereo returns float32 and that is its
precision, not a modelling error (supplying the *same* truth cast to
float32 reproduces 4.5e-08 exactly). It is large where the assumption
actually broke: 0.50 at worst on the same scene with 3 of 8 lights blocked
by a cast shadow — fifteen orders of magnitude above the clean floor. All
four numbers measured in `tests/test_specularity.py`.
This is the diagnostic that tells you *whether* you need
:func:photometric_stereo_robust before you reach for it, and it is the
map an inspection routine thresholds to find glossy defects.
With *normals* and *albedo* omitted it solves them first with
:func:photometric.photometric_stereo and reports the residual of that fit
— the honest self-assessment of the plain estimator. Pass them to score an
estimate that came from somewhere else (a robust fit, a CAD model, a
previous frame).
Note the residual uses `n.L **without** the max(., 0)` clamp, because
that is the linear system the solver actually inverted; a pixel in attached
shadow therefore shows a residual, which is the intended signal rather than
an artefact.
Raises `ValueError`: *images* / *lights* problems as in
:func:photometric_stereo_robust; *normals* is not `(H, W, 3)` matching
the images; *albedo* is not `(H, W)`; exactly one of *normals* / *albedo*
is given (the pair is meaningless apart — the model is `albedo * n`).
• specular_photometric 패밀리 가이드
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.
• specular_photometric — py -3.11 examples/specular_photometric.py
image2d 를 입력으로 받는 것)photometric)*Provenance: specularity.py — SPECULAR 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.