|
楼主 |
发表于 2016-11-8 20:12:21
|
显示全部楼层
WangCC 发表于 2016-11-3 20:00
你好,你是怎么获取采样点在原点云中的索引号的?我现在急需这方面的解决方法! ...
利用这个函数void pcl::SampleConsensus< T >::getRandomSamples (const boost::shared_ptr< std::vector< int > > & indices,size_t nr_samples,std::set< int > & indices_subset)可以获取需要获取的自己设置的随机点,
运用:
pcl::RandomSampleConsensus<pcl::PointXYZ>ransac;
set<int> samplePointIndex;//存储采样点
int samplePointsize;//采样点个数
boost::shared_ptr<std::vector<int>> PtIndexPtr(new std::vector<int>(pointIndex));//获取指向容器的指针
//获取随机采样点
ransac.getRandomSamples(PtIndexPtr,samplePointsize,samplePointIndex);
|
|