小编Vis*_*hal的帖子

如何将 3D 点云 (.ply) 转换为网格(具有面和顶点)?

我有一个包含 100 万个点的 3-D 点云文件,我需要将其转换为 trimesh 中的网格文件。这里的最终目标是获取一个点云并确定该点云是凸面还是凹面(trimesh 允许我在将云转换为网格后这样做)。我愿意接受其他图书馆来解决这个问题。

我已经尝试使用 scipy 进行 Delaunay 三角剖分,但似乎无法将我的点云转换为正确的格式,以便trimesh 可以读取它。

import open3d as o3d
import numpy as np
import trimesh
from scipy.spatial import Delaunay


pointcloud = o3d.io.read_triangle_mesh("pointcloud.ply")
points = np.array(pointcloud.points)
triangle_mesh = Delaunay(points)
#  How do i include triangle_mesh from Delaunay triangulation into processing the mesh file?
mesh = trimesh.load("pointcloud.ply")
print(trimesh.convex.is_convex(mesh))
Run Code Online (Sandbox Code Playgroud)

错误

geometry::TriangleMesh appears to be a geometry::PointCloud (only contains vertices, but no triangles).
geometry::TriangleMesh with 1390073 points and 0 triangles.
expected = (faces.shape[0], faces.shape[1] * …
Run Code Online (Sandbox Code Playgroud)

python mesh delaunay point-clouds trimesh

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

delaunay ×1

mesh ×1

point-clouds ×1

python ×1

trimesh ×1