1

これが私のクラスの関数宣言です:

template <typename PointInT, typename PointNT, typename PointOutT>
class WrinklednessEstimation: public FeatureFromNormals<PointInT, PointNT, PointOutT>
{
    ...
    void normalsToSpherical(const PointCloud<PointNT> &input, PointCloud<Normal> &output);
    ...
}

ここに実装の一部があります:

template <typename PointInT, typename PointNT, typename PointOutT> void
pcl::WrinklednessEstimation<PointInT, PointNT, PointOutT>::normalsToSpherical(const PointCloud<PointNT> &input, PointCloud<Normal> &output)
{
    ...
}

そして、ここにコンパイラが不平を言っています:

wrinkledness.cpp: In member function ‘void pcl::WrinklednessEstimation<PointInT, PointNT, pointOutT>::computeFeature(typename pcl::Feature<PointInT, PointOutT>::PointCloudOut&) [with PointInT = pcl::PointWithViewpoint, PointNT = pcl::Normal, PointOutT = pcl::InterestPoint]’:
wrinkledness.cpp:76:   instantiated from here
wrinkledness.cpp:40: error: no matching function for call to ‘pcl::WrinklednessEstimation<pcl::PointWithViewpoint, pcl::Normal, pcl::InterestPoint>::normalsToSpherical(boost::shared_ptr<const pcl::PointCloud<pcl::Normal> >&, boost::shared_ptr<pcl::PointCloud<pcl::Normal> >&)’
wrinkledness.cpp:45: note: candidates are: void pcl::WrinklednessEstimation<PointInT, PointNT, PointOutT>::normalsToSpherical(const pcl::PointCloud<PointOutT>&, pcl::PointCloud<pcl::Normal>&) [with PointInT = pcl::PointWithViewpoint, PointNT = pcl::Normal, PointOutT = pcl::InterestPoint]

私が理解していないのは、なぜ候補が最初のパラメータのPointOutT代わりに持っているのですか?PointNT

ありがとう

4

1 に答える 1

4

boost::shared_ptr関数を呼び出すときに引数として使用しています。*my_shared_ptr代わりに、のようなもので関数を呼び出してみてください。

于 2012-05-22T08:16:44.743 に答える