open3d学习记录--o3d.geometry.PointCloud与np.array之间的转换

o3d.geometry.PointCloud转np.array

import open3d as o3d
import numpy as np

ply_path = '1.pcd'
pcd= o3d.io.read_point_cloud(path2source)
#pcd 转 np.array
pcd_arr = np.asarray(pcd.points)
print(pcd_arr.shape())

np.array 转o3d.geometry.PointCloud

pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(pcd_arr)

 

你可能感兴趣的:(open3d学习,python,3d,人工智能)