stroke_tone_error — PRINTPATH stroke op

• 資料種類:image2d × pairs → table

• 呼叫: import fullseye as fs; fs.ledger.stroke_tone_error(image, points, pen_width=1.0, blur_sigma=3.0, gamma=1.0)(要直接呼叫實作,import printpath; printpath.stroke_tone_error(image, points, pen_width=1.0, blur_sigma=3.0, gamma=1.0);從台帳取用則 opsprintpath.get("stroke_tone_error"))

用法

畫線所得的濃淡與目標相差多少。→ table

★這才是一筆畫的真正目標函數。不把「畫得像不像」交給人眼, 而是用筆寬畫出、依人眼的尺度模糊,與目標暗度比較後以數值回傳。

回傳值: dict

"rms" / "max_abs" / "bias" —— 暗度之差([0, 1] 的尺度)

"corr" —— 目標暗度與所畫暗度的相關(越接近 1 越能跟上濃淡)

"ink_fraction" —— 紙上墨水的面積率

"target_darkness" —— 目標的平均暗度(應與墨水率相當的量)

"length_px" —— 線的長度[px]

★筆寬是連續的旋鈕(依覆蓋率塗色)。在線不重疊的範圍內 墨水率 ≈ 線長 × 筆寬 / 影像面積 成立,因此與目標濃度相符的筆寬可以先用閉合式解出再加以確認:

pen_width ≈ target_darkness × area / length_px。

詳細使用指南

• printpath 族使用指南

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• poc_one_stroke_epicycles — py -3.11 examples/poc_one_stroke_epicycles.py

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

gcode_write · gcode_extrusion_volume · gcode_time_estimate · gcode_layer_image · contours_to_gcode

同類別(stroke)

stipple_points_from_image · stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed


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

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