上传者: 46974529
|
上传时间: 2022-04-28 01:08:53
|
文件大小: 1KB
|
文件类型: PY
import numpy as np
# Function to create point cloud file
def create_output(vertices, colors, filename):
colors = colors.reshape(-1, 3)
vertices = np.hstack([vertices.reshape(-1, 3), colors])
np.savetxt(filename, vertices, fmt='%f %f %f %d %d %d') # 必须先写入,然后利用write()在头部插入ply header