加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 如何将pcl :: Histogram保存为PNG或JPG文件?

发布时间:2020-12-16 07:07:43 所属栏目:百科 来源:网络整理
导读:我想通过使用PCL API的PCLHistogramVisualizer在文件中保存相同的图像. 这是我需要在点[0]保存的直方图的变量. pcl::PointCloudHistogram100 hist; 我认为可以通过使用来完成 pcl::io::savePNGFile(path,*hist); 但这是我得到的错误 warning: ‘void pcl::io
我想通过使用PCL API的PCLHistogramVisualizer在文件中保存相同的图像.

这是我需要在点[0]保存的直方图的变量.

pcl::PointCloud<Histogram<100> > hist;

我认为可以通过使用来完成

pcl::io::savePNGFile(path,*hist);

但这是我得到的错误

warning: ‘void pcl::io::savePNGFile(const string&,const pcl::PointCloud<PointT>&) [with T = pcl::Histogram<50>,std::string = std::basic_string<char>]’ is deprecated (declared at /usr/local/include/pcl-1.7/pcl/io/png_io.h:123): pcl::io::savePNGFile<typename T> (file_name,cloud) is deprecated,please use a new generic function pcl::io::savePNGFile (file_name,cloud,field_name) with "rgb" as the field name. [-Wdeprecated-declarations]

/usr/local/include/pcl-1.7/pcl/io/png_io.h:129:9: error: ‘const struct pcl::Histogram<50>’ has no member named ‘r’

/usr/local/include/pcl-1.7/pcl/io/png_io.h:130:9: error: ‘const struct pcl::Histogram<50>’ has no member named ‘g’

/usr/local/include/pcl-1.7/pcl/io/png_io.h:131:9: error: ‘const struct pcl::Histogram<50>’ has no member named ‘b’

所以我不能这样做,因为它没有任何rgb字段,但我真的需要保存大量的直方图,我无法一直截屏.

解决方法

我建议您使用 PCL mailing list来解决这些具体问题.开发人员很可能会在那里回答.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读