当前位置:网站首页>After PCD is converted to ply, it cannot be opened in meshlab, prompting error details: ignored EOF
After PCD is converted to ply, it cannot be opened in meshlab, prompting error details: ignored EOF
2022-07-06 08:35:00 【Will_ Ye】
1. Problem
There is one pcd Point cloud file in format , use pcd_viewer It can be displayed normally , But I want to meshlab Do some editing inside , Found unable to open , Prompt the following error 
And then use vim or gedit To open it , You'll see the problem , Some point cloud files are large , It may get stuck on the way , But my point cloud file is very small , use gedit test2.ply, It is shown as follows :
so , It's all garbled mistakes , So it can be inferred that , from pcd Turn into ply There is a problem in the process of . Usually we use them pcl_pcd2ply ./1650511200.015289296.pcd ./test2.ply To convert pcd and ply, So it is certain that this instruction is ok , So the problem is pcd Where are the papers . If you usually pay attention to import pcd After the document , Many people will do a removal NAN The operation of the value , This is actually the key , Because in pcd In the document , It does save some NAN value , And if we don't remove them first , Direct conversion ply file , This will happen , When you know why , The solution is simple .
2. Solution
The train of thought is : stay pcd turn ply front , First do a removal NAN Value operation , And then we're converting , That's fine . Here is the implementation code :
int PCD2PLY_W_removeNAN(string pcdPath, string savePath)
pcl::PCLPointCloud2 cloud_ori;
if (loadPCDFile(pcdPath, cloud_ori) < 0)
{
cout << "Error: cannot load the PCD file!!!" << endl;
return -1;
}
// remove NaN type points
// Dependent functions #include <pcl/filters/filter.h>
std::vector<int> mapping;
pcl::removeNaNFromPointCloud(*cloud_ori, *cloud_ori, mapping);
string savePath = "/home/will/test1.ply";
pcl::PLYWriter writer;
writer.write(savePath,*cloud_ori);
return 0;
}
It's generated at this point test1.ply You can be in meshlab Successfully opened .
边栏推荐
- Char to leading 0
- Bottom up - physical layer
- Mobile phones and computers on the same LAN access each other, IIS settings
- Purpose of computer F1-F12
- Colorlog结合logging打印有颜色的日志
- 电脑清理,删除的系统文件
- Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)
- Summary of phased use of sonic one-stop open source distributed cluster cloud real machine test platform
- @JsonBackReference和@JsonManagedReference(解决对象中存在双向引用导致的无限递归)
- Use Alibaba icon in uniapp
猜你喜欢
![[brush questions] top101 must be brushed in the interview of niuke.com](/img/55/5ca957e65d48e19dbac8043e89e7d9.png)
[brush questions] top101 must be brushed in the interview of niuke.com

生成器参数传入参数

软件卸载时遇到trying to use is on a network resource that is unavailable

Deep learning: derivation of shallow neural networks and deep neural networks

Synchronized solves problems caused by sharing

synchronized 解决共享带来的问题
![[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes](/img/ac/773ce8ee7f380df19edf8373250608.jpg)
[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes

C語言雙指針——經典題型
![[MySQL] database stored procedure and storage function clearance tutorial (full version)](/img/27/e775e03b77c7195216bc50c5cbefb4.png)
[MySQL] database stored procedure and storage function clearance tutorial (full version)

MySQL learning record 10getting started with JDBC
随机推荐
Pointer advanced --- pointer array, array pointer
Double pointeur en langage C - - modèle classique
Roguelike游戏成破解重灾区,如何破局?
MySQL learning records 12jdbc operation transactions
Sublime text using ctrl+b to run another program without closing other runs
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
sys.argv
On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
gcc动态库fPIC和fpic编译选项差异介绍
C language double pointer -- classic question type
【MySQL】数据库的存储过程与存储函数通关教程(完整版)
China's high purity aluminum target market status and investment forecast report (2022 Edition)
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Let the bullets fly for a while
LDAP应用篇(4)Jenkins接入
[MySQL] lock
2022.02.13 - NC001. Reverse linked list
On the inverse order problem of 01 knapsack problem in one-dimensional state
China vanadium battery Market Research and future prospects report (2022 Edition)
tree树的精准查询