繁体   English   中英

迭代最近点算法的编译过程中面临错误

[英]Facing error during compilation of Iterative closest point algorithm

我正在尝试从此站点编译程序。

http://pointclouds.org/documentation/tutorials/iterative_closest_point.php )!

但是在编译过程中,我遇到了以下错误。

'pcl::Registration<PointSource,PointTarget,Scalar>::setInputCloud' : cannot convert parameter 1 from 'boost::shared_ptr<T>' to 'const boost::shared_ptr<T> &' \\sample\\kinect2_grabber.h 424 1 Sample

出现错误的代码如下:

icp.setInputCloud (cloud);
icp.setInputTarget (cloud);

我已经在函数convertRGBDepthToPointXYZRGB这样的内部声明了这个云

pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud( new pcl::PointCloud<pcl::PointXYZRGB>() );

我不知道如何纠正以上错误。请有人帮我解决以上错误。

谢谢

您已经为两个模板参数在pcl::PointXYZ类型上模板化IterativeClosestPoint对象,以便其参数类型由类模板确定的函数setInputCloudsetInputTarget期望将pcl::PointXYZ对象作为其参数。 但是,您试图将pcl::PointXYZRGB传递给该对象。 而是在pcl::PointXYZRGB对象作为源和目标的模板。

IterativeClosestPoint类的API:

http://docs.pointclouds.org/1.7.1/classpcl_1_1_iterative_closest_point.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM