.las turn .txt sub .pcd, compile errors occurred in operation

References:

murtiad / las2pcd : ubuntu make a gadget that can be installed, for las (rgb)

undone

According to the above source modification of cmakelist.txt own Cmakelist.txt, run again:
cmake ... successfully
make unsuccessful, the following error
Here Insert Picture Description
error less than before, but still does not
add the sentence:

link_directories (/usr/lib)

Or make unsuccessful
speak PCL_COMMON_LIBRARIES changed PCL_LIBRARIES
!!!
Then make a success! !
But there are some Represents warnings:
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
the make is actually successful, but could not run how it was? ? ?

I do not know
temporarily abandoned

One way is the direct source of the gadget is installed, did not try

First try to turn into las txt, txt then converted to pcd
first with liblas converted into las txt, direct input (because of its unity with the input on the command line in command can be run successfully, but it is put in .cpp wrong, probably because of his skill is not enough, Cmakelist.txt statements problem, right):

las2txt -i /home/wml/las2pcd/Plot_1_2_Backpack_cut.las -o /home/wml/las2pcd/Plot_1_2_Backpack_cut.txt

输出结果是点云的XYZ
Here Insert Picture Description
然后用PCL将txt读取到pcd
cloud.width:对于无序点云,是点的数量,对于有序点云,是每行点的数量
cloud.height: 对于无序点云,height=1,对于有序点云,height是行数
这篇文章写出来的txt2pcd.cpp可以运行
PengPengBlog–PCL——txt文件转到PCD文件
在ubuntu中cmake… 和make都可以run。
结果。。。抛出std::bad_alloc,意思是内存不够。。。
总共有三百多万数据,.las文件是97M+。
换个小点的数据再试一次,这次换个.las = 22.3M的数据
这次有65万个点
Here Insert Picture Description
注意: lasinfo 或las2txt 后面的文件名不能太长,否则读不出来
转成txt是28.6M,还是读不出来
那如果只有一棵树呢,看是否可以
还显示内存不够??重新开机再试,还是不行,说明程序有bug。
可能的原因是坐标系的问题,坐标系的数字太大了。
如果把坐标转换为相对坐标呢?能不能转出来

用python读取.txt, 然后计算,减去最小值,再保存成.txt
现在坐标转换完成了
onetree文件里又51334个点,在ubuntu上跑的时候还会出现内存不够的错误

If it is reduced to 10,000 + points? Or not, a 8900 + it? ? Or not, if 1000+ points not work, then, is the problem the program
deletes left 1312 points,
or not, that is the code problems

After viewing the files compiled find flann installation problems, so re-installation flann. As follows:
Reference: https://www.cnblogs.com/yhl0414/p/7146839.html
but my show has been installed on.

Published 28 original articles · won praise 0 · Views 1211

Guess you like

Origin blog.csdn.net/weixin_43779943/article/details/102641318