簡體   English   中英

STL 到點雲

[英]STL to pointcloud

我正在嘗試使用 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 object。 我需要對齊曲面而不是頂點。

如何從三角形網格中獲取點?

輸入

Output

這可能會有所幫助:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM