annotate3d_axes — 3D annotate3d op

資料種類:image2dimage2d

呼叫: 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` 投影繪製世界座標三軸(gnomon)。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

Raises

------

ValueError

length が非正、原点や軸端がカメラの後ろ、labels/colors が 3 つでない、

軸の文字が画像に収まらない。

手順: `origin と、そこから世界座標の +X / +Y / +Z 方向に length` 進んだ

3 点を射影(`annotate3d_project` と同じ慣習)し、原点の画素から各軸端の画素へ

`annotate.arrow(矢じり 8x6 px)を描く。軸端の先 0.7 * font_size` px の

位置に `labels[i] を背景なし(box_alpha=0`)の文字で置く。

引数:

• `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 / labelscolors` の長さが 3 でない /

原点または軸端のいずれかが `z <= 1e-9 / 姿勢・Kdepth` の不正 / 軸の

文字が画像に収まらない。枠外の軸端はエラーにしない(矢印は枠外まで引く)。

視線と一致して点に潰れた軸(画素長 1e-9 未満)は黙ってスキップする。

使いどころ: 図の姿勢の説明(gnomon)。`render3d.look_atpose` を

そのまま渡し、`origin にメッシュの重心や bounds` の角を置く。

參考(範例資料・文獻)

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

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

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

annotate3d_figurepy -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.