match_localize op• 数据种类:voxel × voxel → position
• 调用: import fullseye as fs; fs.ledger.match_hough_3d(scene, template, device='cpu', ndir=26, mc=0.05, topk=1, nms=3, subvoxel=True)(要直接调用实现,import match3d; match3d.match_hough_3d(scene, template, device='cpu', ndir=26, mc=0.05, topk=1, nms=3, subvoxel=True);从台账取用则 ops3d.get("match_hough_3d"))
• 经台账调用的返回值: fullseye.ledger.match_hough_3d(...) 只返回声明的 out 类型 position 的值(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.match_hough_3d.raw(...),或直接调用 match3d.match_hough_3d。
• GPU:该算子有 GPU 路径(device="cuda")
generalized Hough 3D(Ballard R-table 投票)。voxel × Hough 列。
把 GHT 以 GPU 原生方式表述为 各方向 bin 相关之和:
accumulator A(t) = Σ_bin ( scene_bin ⋆ template_bin )。每条边缘按其梯度方向投票, 缺失的边缘只会降低峰值(对遮挡、杂波鲁棒)。与 shape-based(连续内积的单一解) 不同,其差异化在于 返回投票 accumulator,可用 NMS 取多个峰值 = 多个实例。返回值为 (topk,4) 的 [votes, d, h, w] (votes 降序)。
步骤:把两个 volume 的单位梯度(mc 是对 sobel3d 原始输出的阈值)量化到 ndir 个参考方向中最接近的一个,对每个方向 bin 用 conv3d 累加“scene 中该 bin 的 2 值场 ⋆ 模板中该 bin 的 2 值场”。除以模板的有效边缘数,因此 votes 在 [0, 1] 内,1 表示全部边缘一致。
• ndir:26 及以下取 26 邻域方向列表的前 ndir 个(少于 26 时方向有偏),27 及以上
在 fibonacci 球上均匀分布。方向越粗对旋转越宽容,但伪峰也越多。
• 返回值 (topk, 4) 的每行为 [votes, z, y, x],votes 降序。坐标是 模板中心 (T//2)
的 scene 坐标,subvoxel=True 时为 ±2 邻域质心。
• nms:每取一个峰值,就把 ±nms voxel 的立方体置为 −1,再找下一个。相邻的
多个实例需把 nms 调小。
• 模板没有边缘时为全 0 的 (topk,4)。模板不能完全容纳的位置为 0。
后续:用 refine_translation_lk / refine_peak_newton 细化各峰值。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• matching_localize — py -3.11 examples_3d/matching_localize.py
position 作为输入)refine_peak_newton · refine_translation_lk · refine_lm · fuse_to_voxel
match_localize)match_shape_3d · match_chamfer_3d · match_curvature_3d · match_mip_2d · match_points_ncc
*Provenance: match3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.