annotate3d op• 資料種類:image2d → image2d
• 呼叫: import fullseye as fs; fs.ledger.annotate3d_axes(img, pose, K, origin=(0.0, 0.0, 0.0), length=1.0, depth=None, labels=('X', 'Y', 'Z'), colors=('wrong', 'right', 'reference'), width=2, font_size=11, occlusion_tol=0.01, scheme='okabe_ito', font_path=None)(要直接呼叫實作,import annotate3d; annotate3d.annotate3d_axes(img, pose, K, origin=(0.0, 0.0, 0.0), length=1.0, depth=None, labels=('X', 'Y', 'Z'), colors=('wrong', 'right', 'reference'), width=2, font_size=11, occlusion_tol=0.01, scheme='okabe_ito', font_path=None);從台帳取用則 ops3d.get("annotate3d_axes"))
回傳影像(image2d):從 origin 投影繪製 object 座標(pose 的輸入側)的三軸(gnomon)。
ValueError
length 非正、原點或軸端在相機後方、labels/colors 不是 3 個、
軸的文字放不進影像、原點與軸端都在影像外。
步驟: 投影 origin 以及從它沿 object 座標 +X / +Y / +Z 方向前進 length 的 3 個點(與 annotate3d_project 相同的慣例),從原點像素向各軸端像素繪製 annotate.arrow(箭頭尖 8x6 px)。在軸端之外 0.7 * font_size px 的位置以無背景(box_alpha=0)的文字放置 labels[i]。
參數:
• origin (3,)(object 座標),length: 軸的長度(網格單位,> 0)。
• labels: 3 個字串(預設 ("X", "Y", "Z"))。colors: 3 種顏色(角色名或 RGB。預設 ("wrong", "right", "reference") 是調色盤的角色名)。
• width: 線寬 [px],1 以上的整數。font_size [px]。
• depth / occlusion_tol: 會傳給投影,但本 op 不做遮擋顯示(虛線)(判定只用於 depth 的形狀檢查)。
回傳值: 繪製後的新影像(float64 [0, 1])。
報錯條件: length <= 0 / labels 或 colors 的長度不是 3 / 原點或任一軸端 z <= 1e-9 / 位姿、K、depth 不正確 / 軸的文字放不進影像 / 原點與軸端都在影像外(annotate.arrow 會拒絕)。只有軸端在框外時照常繪製(箭頭朝框外畫出)。與視線重合而塌縮成點的軸(像素長度小於 1e-9)會被靜默略過。
用途: 說明圖的位姿(gnomon)。把 render3d.look_at 的 pose 原樣傳入,把 origin 放在網格的質心或 bounds 的角上。
座標系:origin 和軸的方向都在 pose 所映射的來源座標系(object 座標)中解讀。look_at 的 pose 是 world→camera,所以此時就是 world 的軸。傳入包含物體姿態 M(object→world)的 pose @ M,則畫出物體的軸。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py
image2d 作為輸入)fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade
annotate3d)annotate3d_project · annotate3d_arrow · annotate3d_label · annotate3d_scale_bar · annotate3d_bbox · annotate3d_measure
*Provenance: annotate3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.