点云技术相关产学研社区

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

扫一扫,访问微社区

查看: 2551|回复: 3

release模式下运行中出错(filter操作,debug模式运行正常)

[复制链接]
发表于 2013-4-14 21:38:11 | 显示全部楼层 |阅读模式
本帖最后由 pyang 于 2013-4-14 22:05 编辑

程序是用openni_grabber从kinect获取数据。现做一个filtering的操作。
关键代码:
typedef pcl::PointXYZRGB PointT;
void SimpleOpenNIViewer::cloud_cb_ (const pcl::PointCloud<pcl::PointXYZRGB>::ConstPtr &cloud)
{
pcl::PassThrough<;PointT> pass;
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudInput(new pcl::PointCloud<;PointT>(*cloud));
pcl::PointCloud<;PointT>::Ptr cloud_filteredZ(new pcl::PointCloud<;PointT>);
pass.setInputCloud (cloudInput);
pass.setFilterFieldName ("z");
pass.setFilterLimits (0.6, 1.2);
pass.filter (*cloud_filteredZ);
}
编译没问题,运行过程中,执行到pass.filter (*cloud_filteredZ);时出错,程序奔溃,追踪是在xmemory文件中的
pointer allocate(size_type _Count)
  { // allocate array of _Count elements
  return (_Allocate(_Count, (pointer)0));
  }
这个函数的return 语句。望指点。
回复

使用道具 举报

发表于 2013-4-15 00:22:50 | 显示全部楼层
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudInput(new pcl::PointCloud<;PointT>(*cloud));
改为
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudInput(new pcl::PointCloud<;PointT>(cloud));
试一试,分享结果啊,thanks》
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-4-15 10:05:05 | 显示全部楼层
mypcl 发表于 2013-4-15 00:22
pcl:ointCloud:tr cloudInput(new pcl:ointCloud(*cloud));
改为
pcl:ointCloud:tr cloudInput(n ...

谢谢回复。
不过按照你说的试了,编译过不了。参数类型不匹配。
回复 支持 反对

使用道具 举报

发表于 2013-4-15 21:15:29 | 显示全部楼层
pyang 发表于 2013-4-15 10:05
谢谢回复。
不过按照你说的试了,编译过不了。参数类型不匹配。

分享下你的代码文件吧,我试一试。哦,你用的pcl版本号是,具体到8781之类的。
回复 支持 反对

使用道具 举报

本版积分规则

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

GMT+8, 2024-5-19 22:17 , Processed in 1.626070 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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