shape op• 資料種類:image2d → image2d
• 呼叫: import fullseye as fs; fs.ledger.rounded_rect(img, rect, radius=8, color='neutral', width=2, fill=False, alpha=1.0, scheme='okabe_ito')(要直接呼叫實作,import annotate; annotate.rounded_rect(img, rect, radius=8, color='neutral', width=2, fill=False, alpha=1.0, scheme='okabe_ito');從台帳取用則 opsannotate.get("rounded_rect"))
圓角矩形(fill=True 時填充)。用作襯底或外框。
ValueError
矩形在影像外、radius 為負或超過邊長的一半、alpha 在 [0,1] 之外。
繪製: 以像素中心到「圓角矩形」的距離判定是否在內側,fill=False 時只疊加從外周起 max(1, width) px 寬的帶(距離判定 1 級, 無反鋸齒)。合成為 out = m*color + (1-m)*img 乘以 alpha 的結果。
• img: (H, W) / (H, W, 1|3|4)。回傳轉換為 float64 並截斷到 [0, 1] 的 副本(不改變輸入)。NaN/Inf 則 ValueError。
• rect: (x, y, w, h),x = 行、y = 列。捨入為整數,w, h > 0, 且必須完全在影像內(超出部分不截短而是 ValueError)。佔據的像素為 x .. x+w-1、y .. y+h-1。
• radius: 角的半徑 [px],0 <= radius <= min(w, h)/2。0 為一般矩形。
• color: palette 的角色名稱("neutral" 等,由 scheme 解析)或 [0, 1] 的 RGB。灰階影像使用 RGB 的平均值。
• 回傳值: 與輸入同形的 float64。
用於手工組出與 text_box 的底板或 annotate_legend 的外框相同的外觀時。
• dataset_conventions — 訓練資料集規範知識 —— COCO / YOLO / VOC 及外觀檢測中的陷阱
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• annotate_gallery — py -3.11 examples/annotate_gallery.py
• poc_machine_condition_fusion — py -3.11 examples/poc_machine_condition_fusion.py
image2d 作為輸入)text_box · arrow · leader_line · label_points · crosshair · legend_box · color_bar · scale_bar
shape)filled_polygon · arc · ellipse
*Provenance: annotate.py — ANNOTATE 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.