arc — ANNOTATE shape op

• 資料種類:image2d → image2d

• 呼叫: import fullseye as fs; fs.ledger.arc(img, center, radius, start_deg, end_deg, color='neutral', width=2, alpha=1.0, scheme='okabe_ito')(要直接呼叫實作,import annotate; annotate.arc(img, center, radius, start_deg, end_deg, color='neutral', width=2, alpha=1.0, scheme='okabe_ito');從台帳取用則 opsannotate.get("arc"))

用法

圓弧。角度以度計,從螢幕 x 軸順時針(因為 row 朝下)。

Raises

ValueError

radius 非正、角度非有限、start == end、alpha 在 [0,1] 之外。

繪製: 對到中心的距離 d 滿足 |d - radius| <= max(0.6, width/2),且像素方位角位於從 start_deg 順時針 (end_deg - start_deg) mod 360 的範圍內的像素上色(無反鋸齒)。方位角為 atan2(y - cy, x - cx),0 度 = 右(+x),90 度 = 下(+y),順時針為正。

• center: (x, y),x = 行、y = 列。可以在影像外(超出部分只是被截掉)。

• radius: 正 [px]。

• start_deg, end_deg: 度。從 start 順時針畫到 end。差為 360 的倍數(end - start 不為 0 而是 360 等)時為整圓。start == end 是「長度 0」,所以 ValueError。

• width: 線寬 [px]。以 max(0.6, width/2) 為半寬,所以即使小於 1 px 也不會斷開。

• img / color / alpha / scheme 的處理與 rounded_rect 相同(float64 副本、[0, 1]、角色名稱或 RGB)。

• 回傳值: 與輸入同形的 float64。

寫入角度的學術圖的規範,由 annotate_angle 一直照顧到引出文字。

詳細使用指南

• figure_annotation 族使用指南

背景知識指南(該運算子背後的物理與規範)

• 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_polish_wipe_measure — py -3.11 examples/poc_polish_wipe_measure.py

• poc_weld_radiograph_porosity — py -3.11 examples/poc_weld_radiograph_porosity.py

型別可銜接的下一個運算子(可接受 image2d 作為輸入)

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

同類別(shape)

rounded_rect · filled_polygon · ellipse


*Provenance: annotate.py — ANNOTATE 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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