match_shape_3d — 3D match_localize op

Data kinds: voxel × voxelposition

Call: import fullseye as fs; fs.ledger.match_shape_3d(vol, template, device='cpu', mc=0.05, subvoxel=True) (to call the implementation directly, import match3d; match3d.match_shape_3d(vol, template, device='cpu', mc=0.05, subvoxel=True); from the registry, ops3d.get("match_shape_3d"))

Return value through the ledger: fullseye.ledger.match_shape_3d(...) returns **only the declared out type position** (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.match_shape_3d.raw(...) or call match3d.match_shape_3d directly.

GPU: this op has a GPU path (device="cuda")

Usage

3-D shape-based (gradient-orientation) matching = the voxel version of the 2-D shapematch_gpu ("contour matching").

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

テンプレとシーンの 単位勾配ベクトルの内積和(Steger 流)。強度/コントラストに不変で、

エッジ/形状で一致を測る。score(pos)=Σ<û_scene(pos+dt), û_model(dt)>/n を 3 成分の conv3d で。

手順: 両 volume に `sobel3d → 大きさ mc` 超の voxel だけ単位ベクトル化(以下は 0)。

テンプレの単位勾配 3 成分をカーネルに、シーンの単位勾配と成分ごとに conv3d して和を取り、

テンプレの有効 voxel 数 `n` で割る。score は [−1, 1]、1 で完全一致(勾配の向きが全て

揃う)、コントラスト反転で −1。

• `mc: sobel3d` の 生出力(真の勾配の 32 倍) に対する閾値。小さいほど平坦部の

ノイズ勾配が投票に入る。

• 位置: 返り値 `[score, z, y, x]`(float64 配列)の座標は テンプレ中心 voxel(index T//2)

が scene のどこに載るか。テンプレが完全に収まる位置以外は 0 に落とすので、テンプレが scene

より大きいと全 0 のまま index (0,0,0) が返る(例外は出ない)。

• `subvoxel=True で argmax の ±2 近傍の正スコア重心に精緻化(accel_match._subvoxel_com`)。

後段: `refine_translation_lk(corner 規約なので T//2 を引く)/ refine_lm`。回転には

不変でない(`match_logpolar_z` で先に回転を合わせる)。

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)

matching_localizepy -3.11 examples_3d/matching_localize.py

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

refine_peak_newton · refine_translation_lk · refine_lm · fuse_to_voxel

Same category (match_localize)

match_chamfer_3d · match_curvature_3d · match_hough_3d · match_mip_2d · match_points_ncc


*Provenance: match3d.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.