overlay opimage2d × pairs → image2dimport fullseye as fs; fs.ledger.annotate_invert_path(img, points, width=1.5, closed=False, dash=None, mode='complement', alpha=1.0, bits=128, min_contrast=1.5, on_invisible='warn') (実装を直接呼ぶなら import annotate; annotate.annotate_invert_path(img, points, width=1.5, closed=False, dash=None, mode='complement', alpha=1.0, bits=128, min_contrast=1.5, on_invisible='warn')、台帳から引くなら opsannotate.get("annotate_invert_path"))折れ線(line)を反転色で描く。アンチエイリアスつき。
線は領域より不利で、そこがこの op を分けている理由 —— 太さ 1.5 画素の 線は端の画素の被覆率が 0.3 程度しかないため、反転しても被覆の分しか 動かない。中間調の地では領域よりさらに先に消える。判定は「被覆率 0.5 以上の画素」で行う(それ未満は元から半透明なので、見えなくても それは反転のせいではない)。
points : (N,2)
折れ線の頂点 (x, y)(画素座標)。
width : float
線の太さ(画素、0.5 以上)。
closed : bool
真なら最後の点と最初の点を結ぶ。
dash : (on, off) or None
破線の刻み(画素)。:func:_dash_pieces と同じ規則。
mode, alpha, min_contrast, on_invisible :
:func:annotate_invert と同じ。
(H,W[,C]) float64 反転を乗せた複製。
import numpy as np, annotate img = np.zeros((16, 32)) out = annotate.annotate_invert_path(img, [(2, 8), (29, 8)], width=3) float(out[8, 15]) # 黒地の上なので白い線になる 1.0 float(out[2, 15]) # 線から離れたところは元のまま 0.0
py -3.11 examples/annotate_paper_tour.pyimage2d を入力に取れる)text_box · arrow · leader_line · label_points · crosshair · legend_box · color_bar · scale_bar
overlay)overlay_mask · overlay_labels · annotate_invert_visibility · annotate_invert
Provenance: annotate.py — ANNOTATE operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.