void find_match_shot(pcl::PointCloudpcl::BINARY::Ptr shot1, pcl::PointCloudpcl::BINARY::Ptr shot2, pcl::CorrespondencesPtr model_scene_corrs)其中,shot1是布尔型描述子写法有问题吗
时间: 2023-07-02 15:19:33 浏览: 52
这段代码中存在问题,因为pcl::BINARY并不是PCL库中的数据类型。如果您想使用PCL的布尔型描述子来计算两个点云之间的相似性,可以使用以下代码:
```
pcl::PointCloud<pcl::Histogram<64, pcl::po::common::IntensityAndXY> >::Ptr shot1(new pcl::PointCloud<pcl::Histogram<64, pcl::po::common::IntensityAndXY> >());
pcl::PointCloud<pcl::Histogram<64, pcl::po::common::IntensityAndXY> >::Ptr shot2(new pcl::PointCloud<pcl::Histogram<64, pcl::po::common::IntensityAndXY> >());
pcl::registration::CorrespondenceEstimation<pcl::Histogram<64, pcl::po::common::IntensityAndXY>, pcl::Histogram<64, pcl::po::common::IntensityAndXY> > est;
est.setInputSource(shot1);
est.setInputTarget(shot2);
est.determineCorrespondences(*model_scene_corrs);
```
这段代码将创建两个PointCloud对象,分别用于存储两个点云的布尔型描述子。然后,使用pcl::registration::CorrespondenceEstimation类计算两个点云之间的对应关系。需要注意的是,这里的数据类型为pcl::Histogram<64, pcl::po::common::IntensityAndXY>,其中64表示描述子的维度,IntensityAndXY表示描述子计算所需的附加信息。