【问题标题】:STL to pointcloudSTL 到点云
【发布时间】:2020-04-27 18:24:18
【问题描述】:

我正在尝试使用 open3d lib 将 stl 文件转换为点。

mesh = o3d.io.read_triangle_mesh("./stl.stl")
pcd = o3d.geometry.PointCloud()
pcd.points = mesh.vertices
pcd.colors = mesh.vertex_colors
pcd.normals = mesh.vertex_normals

问题是需要加载 mesh.surfaces 而不是顶点,但我看不到 open3d.open3d.geometry.TriangleMesh.Surface 对象。我需要对齐曲面而不是顶点。

如何从三角形网格中获取点?

Input

Output

【问题讨论】:

    标签: python mesh point-clouds open3d


    【解决方案1】:

    这可能会有所帮助:

    open3d.geometry.sample_points_uniformly(input, number_of_points=100)
    
        Function to uniformly sample points from the mesh.
    
        Parameters
                input (open3d.geometry.TriangleMesh) – The input triangle mesh.
                number_of_points (int, optional, default=100) – Number of points that should be uniformly sampled.
    
        Returns
            open3d.geometry.PointCloud
    

    【讨论】:

      猜你喜欢
      • 2020-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-13
      • 1970-01-01
      相关资源
      最近更新 更多