基于pcl库将下述问题的警告输出设为禁用pclPLYReader Edianyun09ply24 property float32 focal of element camera is not handledpclPLYReader Edianyun09ply25 property float32 scalex of element camera is not handledpclPLYReade
要将pcl库中的警告输出设为禁用,可以使用pcl库中的setVerbosityLevel函数将输出级别设置为不同的级别。要禁用警告输出,可以将输出级别设置为pcl::console::L_ALWAYS。
下面是一个示例代码,展示了如何将警告输出设为禁用:
#include <pcl/console/parse.h>
#include <pcl/console/print.h>
#include <pcl/io/ply_io.h>
int main(int argc, char** argv)
{
// 禁用pcl库中的警告输出
pcl::console::setVerbosityLevel(pcl::console::L_ALWAYS);
// 读取PLY文件
pcl::PLYReader reader;
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
reader.read("E:\\dianyun\\09.ply", *cloud);
return 0;
}
通过调用pcl::console::setVerbosityLevel(pcl::console::L_ALWAYS)函数,警告输出将被禁用。请注意,这将禁用所有警告输出,所以在实际开发中,可能需要根据需要进行调整
AI 优化版
原文地址:https://www.cveoy.top/t/topic/iMQx 著作权归作者所有。请勿转载和采集!