point-cloud-library - 如何“正确”初始化和加载 PointCloud
问题描述
我在 Visual Studio 2015 中使用 PCL 1.8.1。以下在调试中工作正常,但在发布模式下它会因未处理的异常而崩溃:
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
pcl::io::loadPCDFile<pcl::PointXYZ>("points.pcd", *cloud );
我猜这与云boost::shared_ptr
和调试模式进行一些额外的初始化有关。
我也尝试cloud
像这样初始化:
auto cloud = boost::make_shared<pcl::PointCloud<pcl::PointXYZ>>();
或没有Ptr
pcl::PointCloud<pcl::PointXYZ> cloud;
pcl::io::loadPCDFile<pcl::PointXYZ>("leaf_raw.pcd", cloud );
但它表现出相同的行为。
解决方案
推荐阅读
- php - 当我在数据库中添加其他数据时,为什么我的函数没有更新?
- android - Lint found fatal errors while assembling a release target - gradle error?
- javascript - 如何引用firebase pushId 键?
- node.js - orientjs 不使用服务器列表?
- python - 为什么只有部分内容被写入 python 中的文件?
- multithreading - 在 Scala 中定期调用一个函数,而另一个昂贵的函数正在计算
- amazon-web-services - 有关可在 CloudWatch 中使用的 AWS 日志的概述
- c# - 如何使用 Oid 从自定义表单更新 XAF 中记录的值?
- mysql - 组合 3 个 SQL 表(一个需要搜索,一个是 avg,一个需要计数)
- javascript - 如何通过使用javascript在html中按回车键来调用函数?