fullseye

annotate3d_project — 3D annotate3d op

使い方

table(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 + cxv = cy - fy X_c[1]/z(K は 3x3、K[0,1] の skew も使う。画素中心は 整数座標、u = 列、v = 行)。

引数:

返り値(dict、全て長さ N):

検証(ValueError): pose が 4x4 でも (R, t) でもない・非有限・回転部の 行列式がほぼ 0 / K が 3x3 でない・非有限・fxfy が 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 をそのまま渡す。

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(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 operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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