paper op• 資料種類:image2d × mask → image2d
• 呼叫: import fullseye as fs; fs.ledger.annotate_outline(img, mask, label=None, color='emphasis', width=1.5, alpha=1.0, dash=None, font_size=12, label_offset=(0, 0), box_alpha=0.6, text_color=None, scheme='okabe_ito', font_path=None, layout=None)(要直接呼叫實作,import annotate; annotate.annotate_outline(img, mask, label=None, color='emphasis', width=1.5, alpha=1.0, dash=None, font_size=12, label_offset=(0, 0), box_alpha=0.6, text_color=None, scheme='okabe_ito', font_path=None, layout=None);從台帳取用則 opsannotate.get("annotate_outline"))
回傳影像(image2d):把遮罩輪廓畫成(抗鋸齒的)閉合折線,並在重心處放文字。
ValueError
mask 的形狀與影像不同、沒有為真的像素、alpha 在 [0,1] 之外。
步驟:若無 layout,則用 annotate_outline_layout(mask) 求邊界環(沿像素邊的 (x, y) 封閉多邊形,外周和孔都有,按連通分量)和質心, 再把各環以距離覆蓋率的抗鋸齒折線疊加上去。若有 label, 則在質心 + label_offset 處放置 text_box(anchor="cm",帶襯底)。
• img:(H, W) / (H, W, 1|3|4),float64 副本、[0, 1]。
• mask:(H, W),與影像同形([row, col] 索引)。非 bool 用 > 0.5 二值化,非有限則 ValueError。沒有為真的像素則 ValueError。
• width:線寬 [px],0.5 以上。dash=(on, off) [px] 為虛線(on > 0、off >= 0)。
• alpha:[0, 1]。box_alpha 是文字襯底的不透明度。
• label_offset:(dx, dy) [px]。質心落在輪廓外的形狀(新月形等) 在這裡偏移。
• layout:傳入 annotate_outline_layout 的回傳值即可不重新計算,把同一配置用於另一張圖(讀取 contours / centroid)。
• 回傳值:與輸入同形的 float64。
若要用填色表示則用 overlay_mask,若要為多個區域編號則用 annotate_markers。
• dataset_conventions — 訓練資料集規範知識 —— COCO / YOLO / VOC 及外觀檢測中的陷阱
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• paper_figure — py -3.11 examples/paper_figure.py
• poc_rotation_invariance_audit — py -3.11 examples/poc_rotation_invariance_audit.py
image2d 作為輸入)text_box · arrow · leader_line · label_points · crosshair · legend_box · color_bar · scale_bar
paper)annotate_leader_layout · annotate_leader · annotate_markers · annotate_legend · annotate_dimension_layout · annotate_dimension · annotate_angle_layout · annotate_angle
*Provenance: annotate.py — ANNOTATE 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.