annotate3d op• 데이터 종류: image2d → image2d
• 호출: 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)(구현을 직접 호출하려면 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), 원장에서 가져오려면 ops3d.get("annotate3d_scale_bar"))
이미지(image2d)를 돌려줍니다: 메시 단위로 `length` 인 바를 면 위에 놓고 투영합니다.
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
バーは `origin から direction(正規化)に length` 進む 3-D 線分で、
射影後の画素長は視線に対する傾きで縮む(遠近と短縮を正直に見せる)。
像面に平行なら画素長は `f * length / z` ―― tests が確かめる。
Raises
------
ValueError
direction がゼロ、length が非正、端点がカメラの後ろ / 画像の外。
手順: `p1 = origin + direction / |direction| * length を作り、origin` と
`p1 を射影(annotate3d_project` と同じ慣習)。両端の画素を結ぶ線と、
両端に長さ `tick [px] の垂直な目盛を描き(_bar_with_ticks`)、線の中点から
画面上側(row が小さい側)へ `tick/2 + 4` px 離した位置に
`label_fmt.format(length) + " " + unit` の文字箱を置く。
引数:
• `origin (3,)、direction (3,)`(向きだけ使う。長さは無視、ゼロは
拒否)、`length: メッシュ単位の長さ(> 0、1e-300` 以上)。
• `unit: 文字列(空なら数値だけ)。label_fmt: str.format` の書式
(既定 `"{:g}"`)。
• `width [px] >= 0.5、tick [px] >= 0(0 で目盛なし)、font_size` /
`box_alpha / text_color / font_path`: 文字箱の見た目。
• `depth`: 前方距離画像。両端とも隠れていれば線を破線にする。
• `color: 既定 "neutral"(役割名)。occlusion_tol: [0, 1)`。
返り値: 描画済みの新しい画像(float64 `[0, 1]`)。
エラーになる条件: `direction のノルムが 1e-12 未満 / length <= 0` /
どちらかの端点が `z <= 1e-9` / どちらかの端点が画像の外(この op は
`in_image を両端に要求する — 矢印と違い枠外は拒否) / 姿勢・K・depth`
の不正 / 文字箱が収まらない。
注意: 画素上の長さは視線に対する傾きで短縮する(像面に平行なら
`f * length / z` px)。奥行き方向に置くと短く見えるが、それが正直な射影。
2 点間の実測値を示すなら `annotate3d_measure`。
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py
image2d 를 입력으로 받는 것)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 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.