2017-07-30 1344 views
1

我應用了RANSAC併成功地從場景中分割出了需要的部分。 問題是,當很長一段時間,所需的部分不存在在投影異常之後崩潰的相機的前面。 我怎麼可能以最好的方式處理這個異常,因爲即使在它一直在尋找它的場景中找不到該對象?輸入點雲無數據

[pcl::SampleConsensusModel::getSamples] Can not select 0 unique points out of 0! 
[pcl::RandomSampleConsensus::computeModel] No samples could be selected! 
[pcl::SACSegmentation::segment] Error segmenting the model! No solution found. 
Could not find any points that fitted the model. 
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud! 
terminate called after throwing an instance of 'pcl::IOException' 
    what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 
Aborted (core dumped) 

回答

1

檢查雲的調用寫入功能之前的大小。

if(cloud->size() > 0)

+0

非常感謝你:) –