转载请注明出处:http://my.youkuaiyun.com/ye_shen_wei_mian
生平第一篇博客,有点小激动,写的不好还望多多包涵,也欢迎分享更好的解决办法和思路。。。
网上关于PCL(Point Cloud Library)这个库的资料确实少之又少,遇到有的比较难解决的bug只能上csdn,stackoverflow上面各种找解决方法,还有PCL user mailing list,这是个不错的PCL开发者讨论区。
解决问题的过程非常的花时间和精力,因此希望能够通过分享自己遇到的问题,来免去后来者在同样的问题上再走一遍同样的路的痛苦,同时也欢迎大家提出更好的解决方案和思路撒~~~
最近因为课题的原因,要使用到PCL库中的IntegralImageNormalEstimation进行表面法线的预测。
代码如下(代码仅供参考,可以上PCL的官网上查阅相应的例程):
pcl::PointCloud<pcl::PointXYZI>::Ptr cloud_ptr(new pcl::PointCloud<pcl::PointXYZI>);
*cloud_ptr = cloud_;
pcl::PointCloud<pcl::Normal>::Ptr cloud_normals_ptr(new pcl::PointCloud<pcl::Normal>);
pcl::IntegralImageNormalEstimation<pcl::PointXYZI, pcl::Normal> ne;
ne.setNormalEstimationMethod(ne.AVERAGE_3D_GRADIENT);
ne.set