fullseye

wet_dry_inspection_pair — OPTICS watervision op

使い方

The same textured plate rendered dry and wet, and the contrast of its defect in each -> dict.

texture (H, W) in [0, 1] is the diffuse albedo of the plate and defect_mask (H, W, bool) marks the defect (at least one pixel inside and one outside). Both images use the per-pixel :func:wet_surface_appearance for the diffuse part. The specular part uses a local normal: a Gaussian-smoothed random height map (seed, smoothing normal_sigma_px) whose slopes are scaled to an RMS slope per axis of roughness; each pixel mirrors the light with the Fresnel reflectance of its local incidence angle into the Gaussian lobe of wet_surface_appearance about the viewing direction, so a glint appears where the local normal bisects the light and the view and moves when light_deg changes. The dry and the wet plate share the normals, so they differ only by the film. light_deg is in the xz plane from the plate normal, the viewer on the other side at view_deg. The defect contrast is the Michelson contrast (mean_ok - mean_defect) / (mean_ok + mean_defect) of the region means, reported for the whole image and for the diffuse part alone. Because the film darkens dark pixels proportionally more (the factor (1 - r) / (1 - a r) grows with a), a dark defect on a brighter plate gains diffuse contrast when wet; the glints (shared by both regions) pull the total contrast the other way, so the table has both and predicted_diffuse_contrast_wet (the one-step prediction from the region mean albedos).

The table has dry, wet, diffuse_dry, diffuse_wet, specular_dry, specular_wet (images), contrast_dry, contrast_wet, contrast_diffuse_dry, contrast_diffuse_wet, predicted_diffuse_contrast_wet, coverage, glint_pixels_dry / glint_pixels_wet (pixels whose specular term exceeds the median diffuse albedo) and normals. A film of 0 gives identical images. Shapes that differ, a mask without both classes, textures outside [0, 1] or a negative film are refused.

ファミリ共通の入力契約(fail-closed)

optics の全 op は入力を検証してから計算する(黙って通さない):

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(table を入力に取れる)

abcd_matrix · wavefront_stats · sfr_from_edge · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd

同カテゴリ(watervision)

caustic_irradiance · bottle_image · fill_level_from_image · wet_surface_appearance · underwater_inspection_image · caustic_floor_segmentation


Provenance: watervision.py — OPTICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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