annotate3d op• Data kinds: image2d → image2d
• Call: import fullseye as fs; fs.ledger.annotate3d_scale_bar(img, origin, direction, length, pose, K, unit='', depth=None, color='neutral', width=2.0, tick=8.0, font_size=12, label_fmt='{:g}', box_alpha=0.55, text_color=None, occlusion_tol=0.01, scheme='okabe_ito', font_path=None) (implementation को सीधे call करना हो तो import annotate3d; annotate3d.annotate3d_scale_bar(img, origin, direction, length, pose, K, unit='', depth=None, color='neutral', width=2.0, tick=8.0, font_size=12, label_fmt='{:g}', box_alpha=0.55, text_color=None, occlusion_tol=0.01, scheme='okabe_ito', font_path=None), registry से लेना हो तो ops3d.get("annotate3d_scale_bar"))
image (image2d) लौटाता है: mesh units में length की bar को surface पर रखकर project करता है।
bar origin से direction (normalise किया गया) की दिशा में length तक जाने वाला 3-D line segment है, और projection के बाद उसकी pixel लंबाई line of sight के सापेक्ष झुकाव से छोटी हो जाती है (perspective और foreshortening को ईमानदारी से दिखाता है)। image plane के समानांतर हो तो pixel लंबाई f * length / z होती है —— tests इसकी जाँच करते हैं।
ValueError
direction शून्य हो, length धनात्मक न हो, endpoint camera के पीछे / image के बाहर हो।
प्रक्रिया: p1 = origin + direction / |direction| * length बनाया जाता है, और origin तथा p1 को project किया जाता है (annotate3d_project वाली ही convention)। दोनों सिरों के pixels को जोड़ने वाली line, और दोनों सिरों पर लंबाई tick [px] के लंबवत ticks बनाए जाते हैं (_bar_with_ticks), और line के मध्य-बिंदु से screen के ऊपर की ओर (जिधर row छोटा है) tick/2 + 4 px दूर की जगह पर label_fmt.format(length) + " " + unit का text box रखा जाता है।
Arguments:
• origin (3,), direction (3,) (सिर्फ़ दिशा इस्तेमाल होती है। लंबाई अनदेखी, शून्य reject), length: mesh units में लंबाई (> 0, कम से कम 1e-300)।
• unit: string (खाली हो तो सिर्फ़ संख्या)। label_fmt: str.format का format (default "{:g}")।
• width [px] >= 0.5, tick [px] >= 0 (0 पर ticks नहीं), font_size / box_alpha / text_color / font_path: text box का रूप।
• depth: forward-distance image। दोनों सिरे छिपे हों तो line dashed बनती है।
• color: default "neutral" (role name)। occlusion_tol: [0, 1)।
Return value: drawing वाली नई image (float64 [0, 1])।
Error की शर्तें: direction का norm 1e-12 से कम हो / length <= 0 हो / कोई भी endpoint z <= 1e-9 हो / कोई भी endpoint image के बाहर हो (यह op दोनों सिरों पर in_image माँगता है — arrow के विपरीत, frame के बाहर reject होता है) / pose, K या depth अमान्य हो / text box न समाए।
ध्यान दें: pixel पर लंबाई line of sight के सापेक्ष झुकाव से छोटी हो जाती है (image plane के समानांतर हो तो f * length / z px)। depth की दिशा में रखने पर यह छोटा दिखता है, लेकिन वही ईमानदार projection है। 2 points के बीच का measured मान दिखाना हो तो annotate3d_measure।
• 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 के स्रोत।
• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py
image2d को input के रूप में लेते हैं)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_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.