mesh_to_points — 3D transform op

• 数据种类:mesh → points

• 调用: import fullseye as fs; fs.ledger.mesh_to_points(vertices, faces, samples=20000, seed=0)(要直接调用实现,import match3d; match3d.mesh_to_points(vertices, faces, samples=20000, seed=0);从台账取用则 ops3d.get("mesh_to_points"))

用法

mesh(顶点+面)→ 表面点群(面积加权均匀采样)。mesh→point cloud 转换。

步骤: 以三角形 tri = vertices[faces] 的面积 0.5·|(b−a)×(c−a)| 为概率,有放回地抽取 samples 个面,在每个面上取 u, v ~ U(0,1),若 u + v > 1 则折回为 (1−u, 1−v) (均匀 barycentric)。点 = a + u(b−a) + v(c−a)。seed 固定 default_rng,因此相同参数得到相同点云。

• vertices (V,3) float,faces (F,3) int(从 0 开始的顶点 index)。

• 返回值 (samples, 3) float64。与面数无关,恰好 samples 个点。

• 全部面都退化(面积和 0)时概率变为 NaN,rng.choice 抛出 ValueError。

• 不附带法线(用 estimate_point_normals 添加)。按面积加权,所以面越大点越多,

与顶点密度无关。

后续: points_to_voxel / icp_point2point_3d / match_pca。

参考(示例数据、文献)

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

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

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

• mesh_decimate — py -3.11 examples_3d/mesh_decimate.py

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

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

同类别(transform)

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


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

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