1. pcd数据可视化
import os
import numpy as np
import struct
import open3d as o3d
def main():
file_path='/data/elon/checkpoint/data/map.pcd'
pcd = o3d.io.read_point_cloud(file_path)
points_array = np.array(pcd.points)
points_array = points_array[80000:180000,:]
print(points_array.shape)
ply = o3d.geometry.TriangleMesh()
ply.vertices = o3d.utility.Vector3dVector(points_array)
ply_path = '/data/elon/checkpoint/data/a.ply'
o3d.io.write_triangle_mesh(ply_path, ply)
o3d.io.write_triangle_mesh (ply_path, ply, write_ascii=True)
if __name__ == '__main__':
main()
2. 未完待续… …