【问题标题】:Input Point Cloud has no data输入点云没有数据
【发布时间】:2018-01-06 04:16:46
【问题描述】:

我应用了 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)

【问题讨论】:

    标签: c++ computer-vision point-cloud-library robotics ransac


    【解决方案1】:

    在调用写入函数之前检查云的大小。

    if(cloud->size() > 0)

    【讨论】:

    • 非常感谢:)
    猜你喜欢
    • 2013-11-30
    • 1970-01-01
    • 2012-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多