match_localize op• Data kinds: voxel × voxel → position
• Call: import fullseye as fs; fs.ledger.match_chamfer_3d(scene, template, device='cpu', thr=0.3, edt='scipy') (to call the implementation directly, import match3d; match3d.match_chamfer_3d(scene, template, device='cpu', thr=0.3, edt='scipy'); from the registry, ops3d.get("match_chamfer_3d"))
• Return value through the ledger: fullseye.ledger.match_chamfer_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_chamfer_3d.raw(...) or call match3d.match_chamfer_3d directly.
• GPU: this op has a GPU path (device="cuda")
Chamfer / distance-field matching (robust to partial views and occlusion). The voxel × chamfer column.
Places the template's edge points on the EDT of the scene's edges (the distance from each voxel to the nearest edge) and minimises the distance sum. score(pos)=Σ_{template edge} DT_scene(pos+edge)/n. Lower is a better match. It still works when some edge points are missing (more robust to occlusion than NCC). The correlation (conv3d) is always on the GPU. The distance field is edt="scipy" (CPU, default) or edt="jfa" (edt_jfa, all-GPU with no CPU round trip; exactly matches scipy). Returns [chamfer distance, d, h, w].
Procedure: on both volumes, voxels with |∇| > thr·max|∇| become edges (thr is, relative to each volume's maximum gradient, a relative ratio; the gradient is sobel3d). The distance transform DT of the scene edges is built, and the template's 2-valued edge volume is used as the kernel for conv3d; the result is divided by the edge count n. The dist in the return value [dist, z, y, x] is "the mean distance per template edge voxel (1 voxel) to the nearest scene edge (in voxel units)", with 0 a perfect match. The position is the scene coordinate of the template centre (T//2), as an integer (no subvoxel refinement; if needed, go to refine_translation_lk; it uses the corner convention, so subtract T//2). Positions where the template does not fit entirely are filled with max+1 and excluded. If the template has no edges (thr too high, etc.) the score is all 0 and index (0,0,0) is returned. If the scene has no edges, the distance field is meaningless (lower thr). edt="jfa" uses edt_jfa and stays entirely on device; otherwise scipy (CPU).
• 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.
• matching_localize — py -3.11 examples_3d/matching_localize.py
position as input)refine_peak_newton · refine_translation_lk · refine_lm · fuse_to_voxel
match_localize)match_shape_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.