overlay_mask — ANNOTATE overlay op

• Data kinds: image2d × mask → image2d

• Call: import fullseye as fs; fs.ledger.overlay_mask(img, mask, color='wrong', alpha=0.45, outline=0, outline_color=None, scheme='okabe_ito', style=None) (to call the implementation directly, import annotate; annotate.overlay_mask(img, mask, color='wrong', alpha=0.45, outline=0, outline_color=None, scheme='okabe_ito', style=None); from the registry, opsannotate.get("overlay_mask"))

Usage

Overlay a binary mask with alpha. Exactly a*f + (1-a)*b.

Parameters

mask : (H,W)

Boolean of the same size as the image (or weights in [0,1]).

A different shape is an exception -- a mix-up of (row,col) and (x,y) dies here.

alpha : float

Weight of the mask side.

outline : int

If greater than 0, the mask contour is drawn with thickness outline.

Raises

ValueError

shape mismatch / alpha outside [0,1] / non-finite in mask.

Detailed usage guide

• figure_annotation family guide

Background guides (the physics and conventions behind this op)

• dataset_conventions — Training-dataset conventions — COCO / YOLO / VOC and pitfalls in visual inspection

References (sample data, literature)

• 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.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• annotate_gallery — py -3.11 examples/annotate_gallery.py

• poc_kendama — py -3.11 examples/poc_kendama.py

• poc_pv_thermal_survey — py -3.11 examples/poc_pv_thermal_survey.py

Ops the type connects to (they accept image2d as input)

text_box · arrow · leader_line · label_points · crosshair · legend_box · color_bar · scale_bar

Same category (overlay)

overlay_labels · annotate_invert_visibility · annotate_invert · annotate_invert_path


*Provenance: annotate.py — ANNOTATE 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.