annotate_dimension — ANNOTATE paper op

Data kinds: image2dimage2d

Call: import annotate; annotate.annotate_dimension(img, p0, p1, units_per_pixel=1.0, unit='px', offset=20.0, extension=6.0, color='neutral', width=1.5, head_len=9.0, head_width=6.0, label_fmt='{:.1f}', font_size=11, box_alpha=0.6, text_color=None, scheme='okabe_ito', font_path=None, layout=None) (or opsannotate.get("annotate_dimension"))

Usage

Returns an image (image2d): a dimension line (arrowheads at both ends, extension lines, value and unit).

> The detailed description below is the original text — the summary and the headings are translated.

値は `|p1-p0| * units_per_pixel`(閉形式)。幾何は

:func:annotate_dimension_layout

Raises

------

ValueError

:func:annotate_dimension_layout と同じ + units_per_pixel が非正、

寸法線が画像の外、文字が収まらない。

Detailed usage guide

figure_annotation family guide

Background guides (the physics and conventions behind this op)

dataset_conventions — 学習データセット規約の知識 — COCO / YOLO / VOC と外観検査での落とし穴

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.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

paper_figurepy -3.11 examples/paper_figure.py

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

text_box · arrow · leader_line · label_points · crosshair · legend_box · color_bar · scale_bar

Same category (paper)

annotate_leader_layout · annotate_leader · annotate_markers · annotate_legend · annotate_dimension_layout · annotate_angle_layout · annotate_angle · annotate_scale_bar_layout


*Provenance: annotate.py — ANNOTATE 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.