Use open3d to convert obj format to pcd format and save (model to point cloud)

import open3d as o3d

mesh = o3d.io.read_triangle_mesh('./bunny.obj')

pcd = mesh.sample_points_uniformly(number_of_points=10000)

o3d.io.write_point_cloud('./example.pcd', pcd)

Convert the model to a point cloud and save it. Of course, poisson sampling can also be used, which is more uniform, but takes longer

pcd = mesh.sample_points_poisson_disk(number_of_points=10000)

Guess you like

Origin blog.csdn.net/Aaron9489/article/details/130258058