当前位置:网站首页>.las转.txt 再转.pcd,编译运行中出现的错误
.las转.txt 再转.pcd,编译运行中出现的错误
2022-08-10 05:30:00 【LIAN_U】
References:
murtiad/las2pcd: 做成ubuntu中可安装的一个小工具,针对las(rgb)
未完成
按照上面source中的cmakelist.txt修改自己的Cmakelist.txt,再次run:
cmake … 成功
make 不成功, 错误如下
相比之前错误少了,但还是不对
添加了一句:
link_directories (/usr/lib)
还是make不成功
讲PCL_COMMON_LIBRARIES改为PCL_LIBRARIES
!!!
然后make成功了!!
但有一些warnings:
make倒是成功了,但是无法run是怎么回事???
不知道
暂时放弃
有一个办法是直接安装source中的小工具,还没试
先试将las转成txt,再将txt转成pcd
先用liblas 将las转换成txt, 直接在command中输入(因为用它的unity在命令行中输入可以跑成功,但放到.cpp中就出错,可能是因为自己功力不够,Cmakelist.txt中的语句有问题吧):
las2txt -i /home/wml/las2pcd/Plot_1_2_Backpack_cut.las -o /home/wml/las2pcd/Plot_1_2_Backpack_cut.txt
输出结果是点云的XYZ
然后用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万个点
注意: lasinfo 或las2txt 后面的文件名不能太长,否则读不出来
转成txt是28.6M,还是读不出来
那如果只有一棵树呢,看是否可以
还显示内存不够??重新开机再试,还是不行,说明程序有bug。
可能的原因是坐标系的问题,坐标系的数字太大了。
如果把坐标转换为相对坐标呢?能不能转出来
用python读取.txt, 然后计算,减去最小值,再保存成.txt
现在坐标转换完成了
onetree文件里又51334个点,在ubuntu上跑的时候还会出现内存不够的错误
如果减小到10000+个点呢?还是不行,8900+个呢??还是不行,如果1000+的点都不行的话,就是程序的问题
删除还剩1312个点,
还是不行,那就是代码有问题
经过查看编译后的文件发现flann的安装有问题,因此重新安装下flann。 如下:
reference: https://www.cnblogs.com/yhl0414/p/7146839.html
但我的显示已经安装上了。
边栏推荐
- 树莓派入门(3)树莓派GPIO学习
- An article to master the entire JVM, JVM ultra-detailed analysis!!!
- pytorch框架学习(2)使用GPU训练
- SQLSERVER 2008 parses data in Json format
- 深度学习中的学习率调整策略(1)
- How to get the last day of a month
- CSDN Markdown 之我见代码块 | CSDN编辑器测评
- Transforming into a product, is it reliable to take the NPDP test?
- 25张炫酷交互图表,一文入门Plotly
- pytorch框架学习(9)torchvision.transform
猜你喜欢
Qiskit 学习笔记1
Read the excerpt notes made by dozens of lightweight target detection papers for literacy
pytorch框架学习(6)训练一个简单的自己的CNN (三)细节篇
【LeetCode】41. The first missing positive number
Become a language that hackers have to learn. Do you think it's okay after reading it?
oracle rac 11g安装执行root.sh时报错
OAuth2 usage scenarios, common misunderstandings, use cases
一文带你搞懂OAuth2.0
【写下自用】每次都忘记如何train?记录如何训练自己的yolov5
接口调试还能这么玩?
随机推荐
[Thesis Notes] Prototypical Contrast Adaptation for Domain Adaptive Semantic Segmentation
Stacks and Queues | Valid parentheses, delete all adjacent elements in a string, reverse Polish expression evaluation, maximum sliding window, top K high frequency elements | leecode brush questions
Interface debugging also can play this?
25张炫酷交互图表,一文入门Plotly
Qiskit 学习笔记2
如何用Apifox 的智能Mock功能?
Error when installing oracle rac 11g and executing root.sh
FPGA engineer interview questions collection 11~20
WSTP初体验
自适应空间特征融合( adaptively spatial feature fusion)一种基于数据驱动的金字塔特征融合策略
深度学习中的学习率调整策略(1)
k-近邻实现手写数字识别
文章复现:超分辨率网络-VDSR
【Pei Shu Theorem】CF1055C Lucky Days
openGauss源码,在window系统用VSCode维护吗?
深度学习中数据到底要不要归一化?实测数据来说明!
awk of the Three Musketeers of Shell Programming
The sword refers to Offer 033. Variation array
Shield Alt hotkey in vscode
论文精度 —— 2016 CVPR 《Context Encoders: Feature Learning by Inpainting》