to_points — 3D transform op

• 数据种类:voxel × points × mesh × depth × gaussians → points

• 调用: import fullseye as fs; fs.ledger.to_points(data, kind, samples=20000, **kw)(要直接调用实现,import fuse3d; fuse3d.to_points(data, kind, samples=20000, **kw);从台账取用则 ops3d.get("to_points"))

用法

任意 3D 结构 → 点群(共同表示)。把全部 5 种结构统一到一个入口。

kind: "points"(N,3)/ "mesh"=(vertices,faces)/ "depth"=depth+{fx,fy,cx,cy[,stride]}/

"voxel"=密度 grid+{iso}/ "3dgs"=means(N,3)。

各 kind 的转换(按实现):

• "points" / "3dgs": 只返回 np.asarray(data, float)(不检查形状。传入 (N, 3) 是调用方的责任)。

• "mesh": data = (vertices, faces)。用 match3d.mesh_to_points 做按面积加权的均匀采样,得 samples 个点(默认 20000,seed 固定 = 确定性)。

• "depth": data 为深度图 (H, W),kw 中 fx, fy, cx, cy 必需(缺少则 KeyError),stride 可选(默认 1,抽取)。用 match3d.depth_to_points 的针孔反投影,仅把 depth > 0 的像素变为 (x, y, z) 点(相机坐标,x = 列方向,y = 行方向,z = 深度)。

• "voxel": 用 kw["iso"](默认 0.5)对密度 grid (D, H, W) 做阈值, 把 np.argwhere 的 整数 index 坐标 (z, y, x) 转为 float 作为点云。不转换为物理坐标(不乘 spacing)。

返回值: (N, 3) float64。kind 不属于以上任何一种时 ValueError。samples 在 "mesh" 以外被忽略。

注意: "voxel" 的坐标为数组 index 顺序 (z, y, x),"depth" 为相机坐标 (x, y, z),各种类的轴含义不同。用 register_cross / fuse_to_voxel 混合不同种类时,须由调用方统一这一差异。

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

• transforms_repr — py -3.11 examples_3d/transforms_repr.py

类型可衔接的下一个算子(可接受 points 作为输入)

points_to_voxel · gaussians_to_voxel · estimate_point_normals · match_points_ncc · match_pca · moment_axes · icp_point2point_3d · icp_point2plane

同类别(transform)

points_to_voxel · gaussians_to_voxel · mesh_to_voxel · mesh_to_points · depth_to_points · voxel_to_mips · voxel_to_mesh · tsdf_from_depth


*Provenance: fuse3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.