本帖最后由 mypcl 于 2014-2-5 11:24 编辑
PCL目前对应对应点对的可视化提供了两个解决方案,一个是pcl::visualization::PCLVisualizer的函数,相对比较麻烦。
另一个是pcl::RegistrationVisualizer类,这个类是在老版本的基础上开发的,所以和目前最新的代码(2014/2/4git源码)不兼容,主要是由于回调函数中对应的表示方式,还是老的 const std::vector<int> 方式,而现在ICP实现中采用了CorrespondencesPtr temp_correspondences (new Correspondences (*correspondences_));表示点对。
boost::function<void(const pcl::PointCloud<PointSource> &cloud_src,
const std::vector<int> &indices_src,
const pcl::PointCloud<PointTarget> &cloud_tgt,
const std::vector<int> &indices_tgt)> update_visualizer_;
最新代码为了编译通过,直接将回调函数的调用段:
// Update the vizualization of icp convergence
// if (update_visualizer_ != 0)
// update_visualizer_(output, source_indices_good, *target_, target_indices_good );
暂时comment了。这以为着,用bool pcl::Registration< PointSource, PointTarget, Scalar >::registerVisualizationCallback(boost::function< FunctionSignature > & visualizerCallback) 机制所搞的点对可视化都暂时有问题了。折腾了半天才发现。貌似现成的还得等段时间把,自己改改了。 |