【发布时间】:2019-05-11 09:17:12
【问题描述】:
我正在使用带有预构建版本的 PCL(Windows 为 1.9.1),甚至使用源代码构建一个,但我无法拥有迭代最近点 (ICP) 甚至其他过滤器(例如,正常估计)才能正常工作。 这是我的 C++ 代码:
#include <pcl/io/ply_io.h>
#include <pcl/registration/icp.h>
void test(void)
{
typedef pcl::PointXYZ PointType;
typedef pcl::PointCloud<PointType> PointCloudType;
typedef pcl::IterativeClosestPoint<PointType, PointType, float> ICPType;
PointCloudType::Ptr pcA(new PointCloudType());
pcl::io::loadPLYFile("pointcloud00000.ply", *pcA);
std::cout << "pcA size: " << pcA->points.size() << std::endl;
PointCloudType::Ptr pcB(new PointCloudType());
pcl::io::loadPLYFile("pointcloud00001.ply", *pcB);
std::cout << "pcB size: " << pcB->points.size() << std::endl;
ICPType icp;
icp.setInputSource(pcA);
icp.setInputTarget(pcB);
PointCloudType pcC;
icp.align(pcC);
std::cout << "pcC size: " << pcC.points.size() << std::endl;
}
这就是我在输出控制台中得到的:
pcA size: 19346
pcB size: 19409
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud!
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud!
[pcl::IterativeClosestPoint::computeTransformation] Not enough correspondences found. Relax your threshold parameters.
pcC size: 19346
使用云有一些问题,PCL 抱怨它们是空的,但正如它所写的那样,它们被填充了大约 20K 点。
你能帮帮我吗?
【问题讨论】:
-
你最终解决了这个问题吗?
-
好吧,我没有,只是由于项目时间安排而转移到另一个 icp 实施。
标签: c++ point-cloud-library point-clouds