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) (to call the implementation directly, 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); from the registry, ops3d.get("annotate3d_measure"))

Usage

Returns an image (image2d): the distance between two 3-D points (in mesh units), shown as a projected line and a value.

The value is |p1 - p0| (3-D, closed form). Even if the length in pixels is foreshortened, the value does not change.

Raises

ValueError

The 2 points coincide, an endpoint is behind the camera / outside the image.

Procedure: compute dist = |p1 - p0| (Euclidean distance in object coordinates, in mesh units), and project p0, p1 (same convention as annotate3d_project). Draw the line joining the two end pixels, perpendicular ticks at both ends (length tick px), and dots of radius 3 px at both ends, and from the midpoint of the line, at a position tick/2 + 4 px toward the top of the screen, place a text box with label_fmt.format(dist) + " " + unit.

Arguments:

• p0, p1: object coordinates (3,) (finite; coinciding points are rejected).

• unit: a string (if empty, only the number). label_fmt: a str.format format (default "{:.3g}"). No unit conversion -- if the mesh is in mm, it stays mm.

• width [px] >= 0.5, tick [px] >= 0, font_size / box_alpha / text_color / font_path: appearance of the text box.

• depth: forward-distance image. If both ends are hidden the line is dashed, and the dot of a hidden endpoint is hollow (ring). occlusion_tol: [0, 1).

Return value: a new drawn image (float64 [0, 1]).

Error conditions: |p1 - p0| < 1e-12 / either endpoint has z <= 1e-9 / either endpoint is outside the image (in_image is required at both ends) / invalid pose, K or depth / the text box does not fit.

Use: show on the figure the diameter of fit_sphere3, an edge of smallest_box3, or the distance between 2 feature points. The value itself equals np.linalg.norm(p1 - p0) computed before drawing.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py

Ops the type connects to (they accept image2d as input)

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

Same category (annotate3d)

annotate3d_project · annotate3d_arrow · annotate3d_label · annotate3d_scale_bar · annotate3d_axes · annotate3d_bbox


*Provenance: annotate3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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