fullseye

defect_dataset — OPTICS imaging_sim op

使い方

Synthetic defect images through a designed lens, with aligned masks (table).

Each of the n records draws 1–max_defects defects of the listed kinds (defectgen scratch / pits / crack / blob with parameters sampled from seed) on a surface_texture background of size, renders the composite with :func:render_through_lens (system defaults to the cemented doublet of :func:raytrace.example_system; noise as there, default sensor noise on), and pushes each defect’s mask through the same distortion remap only (nearest-neighbour, no blur) so the annotation sits where the blurred defect actually landed. A record is {"image", "mask", "defects": [{"kind", "params", "bbox" [x, y, w, h], "area"}], "lens": {"efl", "fno", "rms_spot_center", "rms_spot_corner", "max_distortion_pct"}, "seed"} with arrays, or with file paths when out_dir is given (img_0000.png / mask_0000.png written with imgio.save plus a COCO-like annotations.json: images, annotations with bbox/area/params, categories). Deterministic for seed; a defect that lands entirely outside the sensor after distortion is dropped from the annotations rather than reported with an empty box.

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

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

詳しい使い方ガイド

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

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

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

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

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

同カテゴリ(imaging_sim)

psf_from_opd · distortion_map · render_through_lens · calibration_views


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

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