detect op• 数据种类:voxel → primitive
• 调用: import fullseye as fs; fs.ledger.hough_plane_3d(vol, device='cpu', ndir=200, nd=128, mc=0.0, iso=0.5, tol=1.0)(要直接调用实现,import match3d; match3d.hough_plane_3d(vol, device='cpu', ndir=200, nd=128, mc=0.0, iso=0.5, tol=1.0);从台账取用则 ops3d.get("hough_plane_3d"))
• GPU:该算子有 GPU 路径(device="cuda")
平面检测(2D Hough 直线的 3D 提升)。以梯度=法线,向 (法线 n, 距离 d) 空间投票。
薄边界面的每个 voxel 向自身法线方向 bin 与 d=n·p 投票 → 峰值=主平面。法线用获胜 bin 内实际法线的平均来精细化,d 取投影的众数。用于从点云/voxel 中提取地面、墙面。返回值 (n(3,), d, inliers, total)。
步骤:取 (vol > iso) 的 1 voxel 厚的边界面(占用 voxel 中经 3³ erosion 后消失的部分), 以这些 voxel 的单位梯度(sobel3d,mc 是对原始输出的阈值)作为法线 n。n 折叠到轴 0 分量非负的半球,d = n·p(p 为整数 voxel index (z,y,x))。向 ndir 个参考方向(26 以下为 26 邻域,更多则为 fibonacci 球)和 nd 个 d bin 投票, 用票数最多 bin 的实际法线平均精细化 n,用向该 n 的投影直方图众数附近的中位数精细化 d。返回值 (n(3,), d, inliers, total):n 为 (z,y,x) 顺序的单位法线(numpy float32), 平面为 n·(z,y,x) = d(voxel 单位)。inliers 为 |n·p − d| < tol 的边界 voxel 数, total 为边界 voxel 总数(inliers/total 即主平面所占比例)。
• 边界 voxel 少于 10 个时 返回 None(不是异常)。
• 密度 voxel 按 iso 2 值化(若为点数密度,0.5 即"1 个点以上")。
• 只返回 1 个平面。多个平面需去掉内点后重新运行,点云则用 plane_segmentation
/ ransac_plane。
后段:用 distance_point_plane / angle_between_planes 测量。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• detect_primitives_3d — py -3.11 examples_3d/detect_primitives_3d.py
primitive 作为输入)fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment
detect)*Provenance: match3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.