点云技术相关产学研社区

 找回密码
 立即注册加入PCL中国点云技术相关产学研社区

扫一扫,访问微社区

查看: 7181|回复: 6

配准对应点可视化RegistrationVisualizer类问题

[复制链接]
发表于 2014-2-5 11:05:48 | 显示全部楼层 |阅读模式
本帖最后由 mypcl 于 2014-2-5 11:24 编辑

PCL目前对应对应点对的可视化提供了两个解决方案,一个是pcl::visualization::PCLVisualizer的
bool
addCorrespondences (const typename pcl::PointCloud< PointT >::ConstPtr &source_points, const typename pcl::PointCloud< PointT >::ConstPtr &target_points, const std::vector< int > &correspondences, const std::string &id="correspondences", int viewport=0)
函数,相对比较麻烦。
另一个是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) 机制所搞的点对可视化都暂时有问题了。折腾了半天才发现。貌似现成的还得等段时间把,自己改改了。
回复

使用道具 举报

发表于 2016-4-11 20:41:24 | 显示全部楼层
你好,我用你说的第一种方式,并没有成功,难道第一种方式也有问题?
MView->addCorrespondences(ds_src, ds_tgt, cor_inliers_ptr, "correspondences", v2);
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-4-12 16:50:26 | 显示全部楼层
xidandawang 发表于 2016-4-11 20:41
你好,我用你说的第一种方式,并没有成功,难道第一种方式也有问题?
MView->addCorrespondences(ds_src, d ...

恩,是的,你用的源码是什么时候的?我好久没更新机器上的源码了。
回复 支持 反对

使用道具 举报

发表于 2016-4-13 14:37:44 | 显示全部楼层
1.7.2版本的,那现在要想可视化对应点,就没有方法了吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-4-14 13:53:38 | 显示全部楼层
xidandawang 发表于 2016-4-13 14:37
1.7.2版本的,那现在要想可视化对应点,就没有方法了吗?

自己画就行了,挺简单的。
回复 支持 反对

使用道具 举报

发表于 2016-4-15 10:23:01 | 显示全部楼层
好吧,最笨的方法了……addLine(……)
回复 支持 反对

使用道具 举报

发表于 2016-8-26 22:21:18 | 显示全部楼层
xidandawang 发表于 2016-4-15 10:23
好吧,最笨的方法了……addLine(……)

请问,你用addline做出来了么?
回复 支持 反对

使用道具 举报

本版积分规则

QQ|小黑屋|点云技术相关产学研社区 ( 陕ICP备13001629号 )

GMT+8, 2024-5-6 03:40 , Processed in 4.339172 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表