fullseye

optscene_mask — OPTICS scene op

使い方

index 番のプリミティブが見えている画素の真値マスク (H, W) の bool。

画素完全(アンチエイリアスしない)。検出結果との IoU をそのまま測れる。

手順: camera_rays(camera) で全画素の光線を作り、trace_rays で最初の 交点を取り、hit["index"] == index の画素を True にする。手前の別部品に 隠れた部分は False(見えている画素だけ)。光線は画素中心 1 本なので、 境界の画素は「中心がその部品に落ちるか」で決まる。

render_optscene の画像と同じカメラで作れば画素が一対一に対応する。 深度の真値は optscene_depth、欠陥の真値は optscene_defect_mask、 部品ごとのインスタンス列は optscene_instances

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

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

詳しい使い方ガイド

背景知識ガイド(この op の手前にある物理・規約)

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

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

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

fraunhofer_pattern · pupil_psf · pupil_blur · psf_to_mtf · illumination_uniformity · render_through_lens · surface_defect · defocus_blur

同カテゴリ(scene)

scene_material · scene_plane · scene_sphere · scene_box · scene_cylinder · surface_defect · surface_finish · random_defects


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

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