在使用CloudCompare时遇到了这个报错:
[20:44:55] [PLY] 'Error reading 'blue' of 'vertex' number 997780'
[20:44:56] An error occurred while loading '2024-05-17_09-16-50_point_cloud': the third-party library in charge of saving/loading the file has failed to perform the operation
于是在pycharm里使用open3d运行代码:
import open3d as o3d
print("->正在加载点云... ")
pcd = o3d.io.read_point_cloud("C:/Users/dians/desktop/d.ply")
print(pcd)
同样报错:
RPly: Error reading 'blue' of 'vertex' number 997780
[Open3D WARNING] Read PLY failed: unable to read file: C:/Users/dians/desktop/2024-05-17_09-16-50_point_cloud.ply
PointCloud with 997781 points.
但是如果使用在线点云可视化网站可以正常打开 【点击打开】
查询到open3d的issue中的同样问题:https://github.com/isl-org/Open3D/issues/932
在Windows下WSL使用vim 文件名 打开后,执行:wq保存命令,再用hexdump 文件名 查看后发现多了000a,一个换行符后,可以在open3d里和cloudcompare里正确运行了。
不清楚这是哪个地方遗留下的问题。
但是没有000a的换行有时候也可以成功运行,不了解。