前言
三维重建的深度学习用到的格式不太相同,off,stl,ply格式之间可能要互相转换。open3d库就可以简单实现格式转换。
open3d安装
open3d库清华镜像下载:
pip install open3d -i https://pypi.tuna.tsinghua.edu.cn/simple/
读写数据
import open3d as o3d
mesh = o3d.io.read_triangle_mesh("xx.off") #读取.off文件
o3d.io.write_triangle_mesh("xx.ply",mesh) #存储新格式,stl,ply
相比这种https://blog.csdn.net/taifyang/article/details/116382273?spm=1001.2014.3001.5506,这样存储简单很多。