annotate3d op• 資料種類:points → table
• 呼叫: import fullseye as fs; fs.ledger.annotate3d_project(points, pose, K, depth=None, shape=None, occlusion_tol=0.01)(要直接呼叫實作,import annotate3d; annotate3d.annotate3d_project(points, pose, K, depth=None, shape=None, occlusion_tol=0.01);從台帳取用則 ops3d.get("annotate3d_project"))
回傳表(dict):3-D 點的像素座標、前向距離,以及在畫面內/被遮蔽的判定(:func:project_anchors)。
> 以下的詳細說明為原文 —— 摘要與標題已翻譯。
描画を伴わない「射影だけ」の op。annotate3d の全描画 op が内部で使う判定を
そのまま表として返すので、自前のプロット・数値検証・「この点は見えるか」の
分岐に使う。
射影(閉形式、render3d と同一慣習): `X_c = R X + t(pose` は 4x4 の
object→camera、または `(R, t)` の 2-tuple)。カメラは local -Z を見るので
前方距離は `z = -X_c[2]。画素は u = fx X_c[0]/z + skew X_c[1]/z + cx`、
`v = cy - fy X_c[1]/z(K は 3x3、K[0,1]` の skew も使う。画素中心は
整数座標、`u = 列、v` = 行)。
引数:
• `points: (N, 3) または (3,)`(object 座標、有限)。
• `depth: (H, W) の前方距離画像(render3d.render_mesh の depth`、
背景は `+inf)。渡すと shape` はこれから取り、遮蔽を判定する。
• `shape: (H, W)。depth` が無いときの画像内判定に使う。
• `occlusion_tol: [0, 1)。画素の深度 d が d < z * (1 - tol)` なら
隠れ(z-buffer 離散化の許容)。
返り値(dict、全て長さ `N`):
• `uv (N, 2) float — (u, v)` 画素座標。後ろの点は NaN。
• `depth (N,) — 前方距離 z`(後ろは負)。
• `in_front — z > 1e-9`。
• `in_image — 0 <= u <= W-1 かつ 0 <= v <= H-1`(前方の点のみ)。
`shape も depth` も無ければ全 True(未判定)。
• `hidden — depth` があるときだけ判定(画素は最近傍丸め)。無ければ全 False。
• `visible = in_front & in_image & ~hidden`。
検証(`ValueError): pose が 4x4 でも (R, t)` でもない・非有限・回転部の
行列式がほぼ 0 / `K が 3x3 でない・非有限・fx か fy が 0 / points` の
形・非有限 / `depth が 2-D でない・shape` と不一致・NaN を含む /
`occlusion_tol が [0, 1)` の外。後ろの点はここではエラーにしない
(`in_front=False で返す。描画 op はそこで ValueError` にする)。
注意: `camera.project_points` は +Z を見る別慣習(OpenCV 流)なので、その
姿勢を渡すと全点が後ろ扱いになる。`render3d.render_mesh に渡した pose` /
`intrinsics` をそのまま渡す。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py
table 作為輸入)fuse_to_voxel · mesh_select_lod
annotate3d)annotate3d_arrow · annotate3d_label · annotate3d_scale_bar · annotate3d_axes · annotate3d_bbox · annotate3d_measure
*Provenance: annotate3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.