目录

一, makeShared:使点云返回一个智能指针(深拷贝)

二,pcl::visualization::PCLVisualizer

viewer.setPointCloudRenderingProperties

setPointCloudRenderingProperties()

Note

三,RenderingProperties

四, 添加文本addText、updateText

五,点云分割

getColoredCloud()

六, 经验总结


一, makeShared:使点云返回一个智能指针(深拷贝)

      /** \brief Copy the cloud to the heap and return a smart pointer* Note that deep copy is performed, so avoid using this function on non-empty clouds.* The changes of the returned cloud are not mirrored back to this one.* \return shared pointer to the copy of the cloud*/inline Ptr makeShared () const { return Ptr (new PointCloud<PointT> (*this)); }

二,pcl::visualization::PCLVisualizer

viewer.setPointCloudRenderingProperties

setPointCloudRenderingProperties()

bool pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties (   int    property,double  value,const std::string &   id = "cloud",int     viewport = 0
)   

Set the rendering properties of a PointCloud.

Parameters

[in] property the property type
[in] value the value to be set
[in] id the point cloud object id (default: cloud)
[in] viewport the view port where the Point Cloud's rendering properties should be modified (default: all)

Note

注意事项:

设置属性前需要指定id,默认为“cloud”,如果没有设置“cloud”的id,或者其他id,将不起作用。

The list of properties can be found in pcl::visualization::LookUpTableRepresentationProperties.

三,RenderingProperties

enum pcl::visualization::RenderingProperties

Set of rendering properties.

Enumerator
PCL_VISUALIZER_POINT_SIZE 

integer starting from 1

PCL_VISUALIZER_OPACITY

Float going from 0.0 (transparent) to 1.0 (opaque)

PCL_VISUALIZER_LINE_WIDTH 

Integer starting from 1.

PCL_VISUALIZER_FONT_SIZE
PCL_VISUALIZER_COLOR 

3 floats (R, G, B) going from 0.0 (dark) to 1.0 (light)

PCL_VISUALIZER_REPRESENTATION
PCL_VISUALIZER_IMMEDIATE_RENDERING 
PCL_VISUALIZER_SHADING
PCL_VISUALIZER_LUT 

colormap type pcl::visualization::LookUpTableRepresentationProperties

PCL_VISUALIZER_LUT_RANGE 

two doubles (min and max) or PCL_VISUALIZER_LUT_RANGE_AUTO

四, 添加文本addText、updateText

        /** \brief Add a text to screen* \param[in] text the text to add* \param[in] xpos the X position on screen where the text should be added* \param[in] ypos the Y position on screen where the text should be added* \param[in] fontsize the fontsize of the text* \param[in] r the red color value* \param[in] g the green color value* \param[in] b the blue color value* \param[in] id the text object id (default: equal to the "text" parameter)* \param[in] viewport the view port (default: all)*/booladdText (const std::string &text, int xpos, int ypos, int fontsize, double r, double g, double b,const std::string &id = "", int viewport = 0);

五,点云分割

getColoredCloud()

如果云被成功分割,则函数返回彩色云。否则返回一个空指针。属于同一段的点具有相同的颜色。但是这个函数并不能保证不同的片段会有不同的颜色(这完全取决于RNG)。未在索引数组中列出的点将用红色表示。

六, 经验总结

在Visual Studio中使用Release模式运行速度更快,如果是为了运行程序,而不是调试,尽量选择Release模式,而不是Debug模式。

PCL点云库可视化常用函数与经验总结相关推荐

  1. PCL点云库(Point Cloud Library)简介

    PCL点云库(Point Cloud Library)简介 什么是PCL PCL(Point Cloud Library)是在吸收了前人点云相关研究基础上建立起来的大型跨平台开源C++编程库,它实现了 ...

  2. matplotlib库可视化常用的图

    matplotlib库可视化常用的图 主要是四种图:直方图.柱状图.饼图.散点图. 由官方文档复现. matplotlib中文文档 import matplotlib import numpy as ...

  3. 《PCL点云库学习VS2010(X64)》Part 37 FLANN——快速最近邻搜索库

    <PCL点云库学习&VS2010(X64)>Part 37 FLANN--快速最近邻搜索库 一.介绍 该算法库在OpenCV和PCL等开源库中应用较广,是PCL的默认安装库之一.与 ...

  4. PCL点云库安装及学习(2021.7.28)

    PCL点云库学习 2021.7.28 1.PCL简介 2.Win10系统下PCL环境配置 2.1 前提环境(Win10 64位+Visual Studio 2015) 2.2 方式一:源码编译(过程繁 ...

  5. CloudCompare二次开发之如何配置PCL点云库?

    文章目录 0.引言 1.修改两个CMakeLists.txt文件 2.源码编译 3.测试PCL 0.引言   因笔者课题涉及点云处理,需要通过PCL进行点云数据分析处理,查阅现有网络资料,实现了Vis ...

  6. Py之Numpy:Numpy库中常用函数的简介、应用之详细攻略

    Py之Numpy:Numpy库中常用函数的简介.应用之详细攻略 目录 Numpy库中常用函数的简介.应用 1.X, Y = np.meshgrid(X, Y) 相关文章 Py之Numpy:Numpy库 ...

  7. 编译安装PCL点云库,Kinect2驱动,乐视Astra相机驱动

    编译安装PCL点云库 安装方法一 3d点云安装 apt-cache cearch pcl 安装 sudo apt install 上面查出来的 opencv不建议用以上方法因为需要 安装 opencv ...

  8. ubuntu pcl 点云库使用

    pcl 点云库使用(cmakeList.xtx) cmake_minimum_required(VERSION 2.6) project(pcl_test)   find_package(PCL 1. ...

  9. PCL点云库:ICP算法

    ICP(Iterative Closest Point迭代最近点)算法是一种点集对点集配准方法.在VTK.PCL.MRPT.MeshLab等C++库或软件中都有实现,可以参见维基百科中的ICP Alg ...

最新文章

  1. java 判断日期是同一天_如何检查Java中的两个日期是否在同一天
  2. 工业级服务器销售电话,工业级服务器
  3. C++链表linked list(附完整源码)
  4. 一款黑科技让普通屏幕秒变触摸屏,厉害了我的哥
  5. php地址转换成经纬度,百度地图 获取地址转换为经纬度
  6. LeetCode 1184. 公交站间的距离
  7. 重启服务器导致网站系统错误,win10怎么总是莫名其妙重启?_网站服务器运行维护...
  8. ext拖动gridpanel的列组件消失_未来光伏组件市场格局:182mm市场占有率65%、210占5%、166占20%...
  9. 约瑟夫环c语言不用链表,C语言基于循环链表解决约瑟夫环问题的方法示例
  10. 51单片机项目设计:WiFi视频小车制作教程、正点原子wifi摄像头模块应用、手机wifi控制
  11. java keytool用法_java keytool 用法
  12. C# 通过api 下载sharepoint中的文件
  13. 敏捷开发 开源软件_开源软件开发的利与弊
  14. 如何免费且快速的搭建个人网站
  15. 从零开发短视频电商 隐藏业务ID以及缩短业务链接
  16. 阿里巴巴大数据实践之数据建模
  17. FFT专题:IFFT后信号如何重建
  18. 二十、哈希表的基础知识
  19. jack server 常见错误解决方法
  20. Oracle EBS Interface/API(35) -创建供应商地点API

热门文章

  1. 百度地图清除指定覆盖物
  2. 【Python】2500块的外包项目,一款加密的直播引流软件,逆向JavaScript,保姆级实战教学!
  3. spring4开发SpringBatch 样例 -配置文件版
  4. 软件测试实习——第二十四天
  5. 天才基本法--裴之的“自动战棋“代码
  6. VI退出 退出VIM 适用新手
  7. 未来计算机的畅享300,新学期畅享作文300字(通用5篇)
  8. ubuntu 命令行批量重命名文件夹
  9. 如何保证电脑硬盘格式化后数据不能被恢复?
  10. django3.x+DRF+simpleui+uniapp打造自己的任务推广(兼职、悬赏)平台