点云技术相关产学研社区

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

扫一扫,访问微社区

查看: 5106|回复: 9

ICP等配准显示的问题

[复制链接]
发表于 2013-7-4 09:09:25 | 显示全部楼层 |阅读模式
如何动态的展示配准过程,书中提到利用函数 bool registerVisualizationCallback(boost::function< FunctionSignature>  &visualizerCallback),这个回调函数的参数是一个函数参数,这个参数怎么弄啊?才能在我的viewer中显示呢?
回复

使用道具 举报

发表于 2013-7-11 20:47:39 | 显示全部楼层

回帖奖励 +2 金钱

顶一个,希望大牛们多帮忙啊,让我们这些个新手快速提高。
回复 支持 反对

使用道具 举报

发表于 2013-7-17 13:07:12 | 显示全部楼层
采用RegistrationVisualizer类可以实现你需要的功能,如果需要知道你提及的函数的具体用法,参照该类的源代码即可。这个类的使用代码样例如下
  1. // Create the registration visualizer which will display points of type pcl::PointXYZ
  2. pcl::RegistrationVisualizer<pcl::PointXYZ, pcl::PointXYZ> registrationVisualizer;

  3. // Set the maximum number of correspondences which will be displayed. Note that if
  4. // this number is greater than 30 the visualization thread is slowed down and not all
  5. // intermediate results will be displayed
  6. registrationVisualizer.setMaximumDisplayedCorrespondences (30);

  7. // Start the display window
  8. registrationVisualizer.startDisplay();

  9. // Prepare the registration method to be visualized

  10. // ...

  11. pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp;
  12. icp.setInputCloud(cloud_in);
  13. icp.setInputTarget(cloud_out);

  14. // ...

  15. // Register the registration method
  16. registrationVisualizer.setRegistration (icp);

  17. // Start running the registration method
  18. icp.align (source_aligned);

  19. // Print the registration results

  20. // ...

  21. // Use a loop to enable examination of final results
  22. while (true)
  23. {
  24. boost::this_thread::sleep (boost::posix_time::seconds (1));
  25. }
复制代码
回复 支持 反对

使用道具 举报

发表于 2013-7-17 13:07:44 | 显示全部楼层
等你的白兔 发表于 2013-7-11 20:47
顶一个,希望大牛们多帮忙啊,让我们这些个新手快速提高。

见楼上回复
回复 支持 反对

使用道具 举报

发表于 2014-4-15 09:50:18 | 显示全部楼层
mypcl 发表于 2013-7-17 13:07
见楼上回复

您好,我见到tools里面的registration_visualizer.cpp与上述代码类似,只是没有最后面的循环。在添加后进行配准,生成的图片为一堆红绿黑的矩形色块,单击后变成了和三维坐标系类似的色线,不知您有没有遇到过这种情况。谢谢~
回复 支持 反对

使用道具 举报

发表于 2014-4-20 10:05:35 | 显示全部楼层
david_duan 发表于 2014-4-15 09:50
您好,我见到tools里面的registration_visualizer.cpp与上述代码类似,只是没有最后面的循环。在添加后进 ...

你的问题能贴图吗,我好像没遇到过,但在新版本里配准的显示,特别是对应点的显示,是有bug的。
回复 支持 反对

使用道具 举报

发表于 2014-4-21 10:13:29 | 显示全部楼层
mypcl 发表于 2014-4-20 10:05
你的问题能贴图吗,我好像没遇到过,但在新版本里配准的显示,特别是对应点的显示,是有bug的。 ...

您好,后来我仔细观察了一下,其实就是只显示出了坐标系,而没有点云内容。后来我采用了pairwise的代码进行输出就解决了:)
回复 支持 反对

使用道具 举报

发表于 2014-8-5 22:42:39 | 显示全部楼层
惊现大神!{:3_41:}
回复 支持 反对

使用道具 举报

发表于 2014-8-29 17:29:50 | 显示全部楼层
本帖最后由 FeelweeL 于 2014-9-2 20:47 编辑
mypcl 发表于 2014-4-20 10:05
你的问题能贴图吗,我好像没遇到过,但在新版本里配准的显示,特别是对应点的显示,是有bug的。 ...

参照你的代码,以及 https://github.com/PointCloudLib ... 29c3d1a1ec17a12f12c这篇贴文修正了registriter_visualizer 类的一个bug后,运行成功了,但是只是显示出了坐标啊轴和一些文字信息,没有显示点云。。。:(能上传更详细点的代码吗?Thanks

而且鼠标缩放一下后,还出现vtk错误,是怎么回事呀:(

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册加入PCL中国点云技术相关产学研社区

x
回复 支持 反对

使用道具 举报

发表于 2014-8-29 17:33:45 | 显示全部楼层
david_duan 发表于 2014-4-21 10:13
您好,后来我仔细观察了一下,其实就是只显示出了坐标系,而没有点云内容。后来我采用了pairwise的代码进 ...

我遇到了跟你完全一样的问题,你用的输出显示的代码是怎样的,能上传分享一下吗?感谢!!:hug:
回复 支持 反对

使用道具 举报

本版积分规则

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

GMT+8, 2024-5-13 19:22 , Processed in 1.297968 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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