annotate3d_project — 3D annotate3d op

• Data kinds: points → table

• Call: import fullseye as fs; fs.ledger.annotate3d_project(points, pose, K, depth=None, shape=None, occlusion_tol=0.01) (implementation को सीधे call करना हो तो import annotate3d; annotate3d.annotate3d_project(points, pose, K, depth=None, shape=None, occlusion_tol=0.01), registry से लेना हो तो ops3d.get("annotate3d_project"))

उपयोग

table (dict) लौटाता है: 3-D points के pixel coordinates, आगे की दूरी, image के अंदर/occluded होने का निर्णय (project_anchors)।

drawing के बिना "सिर्फ़ projection" करने वाला op। annotate3d के सभी drawing ops अंदर जो जाँचें करते हैं, उन्हें जैसे-का-तैसा table के रूप में लौटाता है, इसलिए इसे अपने plots, numerical verification और "क्या यह point दिखता है" वाली branching के लिए इस्तेमाल करें।

projection (closed form, render3d जैसी ही convention): X_c = R X + t (pose 4x4 का object→camera है, या (R, t) का 2-tuple)। camera local -Z की ओर देखता है, इसलिए forward distance z = -X_c[2] है। pixel 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 भी इस्तेमाल होता है। pixel centre integer coordinates पर हैं, u = column, v = row)।

Arguments:

• points: (N, 3) या (3,) (object coordinates, finite)।

• depth: (H, W) की forward-distance image (render3d.render_mesh का depth, background +inf है)। देने पर shape इसी से लिया जाता है और occlusion जाँचा जाता है।

• shape: (H, W)। depth न होने पर image के अंदर होने की जाँच के लिए।

• occlusion_tol: [0, 1)। अगर pixel की depth d के लिए d < z * (1 - tol) हो तो point छिपा माना जाता है (z-buffer discretisation की छूट)।

Return value (dict, सभी की लंबाई N):

• uv (N, 2) float — (u, v) pixel coordinates। पीछे वाले points के लिए NaN।

• depth (N,) — forward distance z (पीछे होने पर ऋणात्मक)।

• in_front — z > 1e-9।

• in_image — 0 <= u <= W-1 और 0 <= v <= H-1 (सिर्फ़ आगे वाले points)। shape और depth दोनों न हों तो सभी True (जाँच नहीं हुई)।

• hidden — सिर्फ़ depth होने पर जाँचा जाता है (pixel nearest-neighbour rounding से)। न हो तो सभी False।

• visible = in_front & in_image & ~hidden।

Validation (ValueError): pose न 4x4 हो न (R, t), non-finite हो, या rotation भाग का determinant लगभग 0 हो / K 3x3 न हो, non-finite हो, या fx या fy 0 हो / points का shape गलत हो या non-finite हो / depth 2-D न हो, shape से मेल न खाए, या NaN हो / occlusion_tol [0, 1) के बाहर हो। पीछे वाले points यहाँ error नहीं बनते (in_front=False के साथ लौटते हैं। drawing ops वहाँ ValueError देते हैं)।

ध्यान दें: camera.project_points +Z की ओर देखने वाली अलग convention (OpenCV style) है, इसलिए उसका pose देने पर सभी points पीछे माने जाते हैं। render3d.render_mesh को दिए गए pose / intrinsics को ही बिना बदले दें।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py

वे अगले ops जिनसे type जुड़ता है (table को input के रूप में लेते हैं)

fuse_to_voxel · mesh_select_lod

इसी category के (annotate3d)

annotate3d_arrow · annotate3d_label · annotate3d_scale_bar · annotate3d_axes · annotate3d_bbox · annotate3d_measure


*Provenance: annotate3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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