annotate3d_measure — 3D annotate3d op

• Data kinds: image2d → image2d

• Call: import fullseye as fs; fs.ledger.annotate3d_measure(img, p0, p1, pose, K, unit='', depth=None, color='emphasis', width=1.5, tick=8.0, font_size=12, label_fmt='{:.3g}', box_alpha=0.6, text_color=None, occlusion_tol=0.01, scheme='okabe_ito', font_path=None) (implementation को सीधे call करना हो तो import annotate3d; annotate3d.annotate3d_measure(img, p0, p1, pose, K, unit='', depth=None, color='emphasis', width=1.5, tick=8.0, font_size=12, label_fmt='{:.3g}', box_alpha=0.6, text_color=None, occlusion_tol=0.01, scheme='okabe_ito', font_path=None), registry से लेना हो तो ops3d.get("annotate3d_measure"))

उपयोग

image (image2d) लौटाता है: 3-D के 2 points के बीच दूरी (mesh units) को project की गई line और मान से दिखाता है।

मान |p1 - p0| है (3-D, closed form)। pixel पर लंबाई छोटी दिखे तब भी मान नहीं बदलता।

Raises

ValueError

2 points एक ही हों, endpoint camera के पीछे / image के बाहर हो।

प्रक्रिया: dist = |p1 - p0| (object coordinates में Euclidean distance, unit mesh unit) की गणना की जाती है, और p0, p1 को project किया जाता है (annotate3d_project वाली ही convention)। दोनों सिरों के pixels को जोड़ने वाली line, दोनों सिरों पर लंबवत ticks (लंबाई tick px), और दोनों सिरों पर radius 3 px के dots बनाए जाते हैं, और line के मध्य-बिंदु से screen के ऊपर की ओर tick/2 + 4 px दूर की जगह पर label_fmt.format(dist) + " " + unit का text box रखा जाता है।

Arguments:

• p0, p1: object coordinates (3,) (finite, एक ही point हों तो reject)।

• unit: string (खाली हो तो सिर्फ़ संख्या)। label_fmt: str.format format (default "{:.3g}")। unit conversion नहीं होता — mesh mm में हो तो mm ही रहता है।

• width [px] >= 0.5, tick [px] >= 0, font_size / box_alpha / text_color / font_path: text box का रूप।

• depth: forward-distance image। दोनों सिरे छिपे हों तो line dashed बनती है, और छिपे endpoint का dot खोखला (ring) बनता है। occlusion_tol: [0, 1)।

Return value: drawing वाली नई image (float64 [0, 1])।

Error की शर्तें: |p1 - p0| < 1e-12 हो / कोई भी endpoint z <= 1e-9 हो / कोई भी endpoint image के बाहर हो (दोनों सिरों पर in_image ज़रूरी) / pose, K या depth अमान्य हो / text box न समाए।

उपयोग: figure पर fit_sphere3 का diameter, smallest_box3 का edge, या 2 feature points के बीच की दूरी दिखाने के लिए। मान खुद drawing से पहले के np.linalg.norm(p1 - p0) के बराबर है।

संदर्भ (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 जुड़ता है (image2d को input के रूप में लेते हैं)

fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade

इसी category के (annotate3d)

annotate3d_project · annotate3d_arrow · annotate3d_label · annotate3d_scale_bar · annotate3d_axes · annotate3d_bbox


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