PCL库使用中遇到的一些问题及解决方法
a. pcl::PointCloud對象變量 與pcl::PointCloud::Ptr 對象指針 的相互轉換
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
// 對象指針
pcl::PointCloud<pcl::PointXYZ>::Ptr cloudPointer(new pcl::PointCloud<pcl::PointXYZ>);
pcl::PointCloud<pcl::PointXYZ> cloud;
// 對象變量
cloud = *cloudPointer;
cloudPointer = cloud.makeShared(); ---------------------------------------------------------------------
b.max的宏名沖突
解決方法: 使用NOMINMAX宏可以防止stl庫定義min和max 或者在max出現處使用括弧標識 (std::max)(a,b),這樣可以避免編譯器將max解釋為宏
------------------------------------------------------------------- c.
C++11標準問題 解決方法: boost庫中vector的this報錯時,
建議開啟C++11的支持
------------------------------------------------------------------
d. flann庫與opencv中的flann沖突 解決方法: 在flann前面加上全局命名空間 ::flann 在要使用opencv中flann的地方,使用cv::flann這樣可以避免沖突
---------------------------------------------------------------- ------------------------------------------------------------------
?
?
?
?
?
總結
以上是生活随笔為你收集整理的PCL库使用中遇到的一些问题及解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 阿里 蚂蚁自研 IDE 研发框架 Op
- 下一篇: Java应用结构规范