PCL点云库可视化常用函数与经验总结
目录
一, 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点云库可视化常用函数与经验总结相关推荐
- PCL点云库(Point Cloud Library)简介
PCL点云库(Point Cloud Library)简介 什么是PCL PCL(Point Cloud Library)是在吸收了前人点云相关研究基础上建立起来的大型跨平台开源C++编程库,它实现了 ...
- matplotlib库可视化常用的图
matplotlib库可视化常用的图 主要是四种图:直方图.柱状图.饼图.散点图. 由官方文档复现. matplotlib中文文档 import matplotlib import numpy as ...
- 《PCL点云库学习VS2010(X64)》Part 37 FLANN——快速最近邻搜索库
<PCL点云库学习&VS2010(X64)>Part 37 FLANN--快速最近邻搜索库 一.介绍 该算法库在OpenCV和PCL等开源库中应用较广,是PCL的默认安装库之一.与 ...
- PCL点云库安装及学习(2021.7.28)
PCL点云库学习 2021.7.28 1.PCL简介 2.Win10系统下PCL环境配置 2.1 前提环境(Win10 64位+Visual Studio 2015) 2.2 方式一:源码编译(过程繁 ...
- CloudCompare二次开发之如何配置PCL点云库?
文章目录 0.引言 1.修改两个CMakeLists.txt文件 2.源码编译 3.测试PCL 0.引言 因笔者课题涉及点云处理,需要通过PCL进行点云数据分析处理,查阅现有网络资料,实现了Vis ...
- Py之Numpy:Numpy库中常用函数的简介、应用之详细攻略
Py之Numpy:Numpy库中常用函数的简介.应用之详细攻略 目录 Numpy库中常用函数的简介.应用 1.X, Y = np.meshgrid(X, Y) 相关文章 Py之Numpy:Numpy库 ...
- 编译安装PCL点云库,Kinect2驱动,乐视Astra相机驱动
编译安装PCL点云库 安装方法一 3d点云安装 apt-cache cearch pcl 安装 sudo apt install 上面查出来的 opencv不建议用以上方法因为需要 安装 opencv ...
- ubuntu pcl 点云库使用
pcl 点云库使用(cmakeList.xtx) cmake_minimum_required(VERSION 2.6) project(pcl_test) find_package(PCL 1. ...
- PCL点云库:ICP算法
ICP(Iterative Closest Point迭代最近点)算法是一种点集对点集配准方法.在VTK.PCL.MRPT.MeshLab等C++库或软件中都有实现,可以参见维基百科中的ICP Alg ...
最新文章
- java 判断日期是同一天_如何检查Java中的两个日期是否在同一天
- 工业级服务器销售电话,工业级服务器
- C++链表linked list(附完整源码)
- 一款黑科技让普通屏幕秒变触摸屏,厉害了我的哥
- php地址转换成经纬度,百度地图 获取地址转换为经纬度
- LeetCode 1184. 公交站间的距离
- 重启服务器导致网站系统错误,win10怎么总是莫名其妙重启?_网站服务器运行维护...
- ext拖动gridpanel的列组件消失_未来光伏组件市场格局:182mm市场占有率65%、210占5%、166占20%...
- 约瑟夫环c语言不用链表,C语言基于循环链表解决约瑟夫环问题的方法示例
- 51单片机项目设计:WiFi视频小车制作教程、正点原子wifi摄像头模块应用、手机wifi控制
- java keytool用法_java keytool 用法
- C# 通过api 下载sharepoint中的文件
- 敏捷开发 开源软件_开源软件开发的利与弊
- 如何免费且快速的搭建个人网站
- 从零开发短视频电商 隐藏业务ID以及缩短业务链接
- 阿里巴巴大数据实践之数据建模
- FFT专题:IFFT后信号如何重建
- 二十、哈希表的基础知识
- jack server 常见错误解决方法
- Oracle EBS Interface/API(35) -创建供应商地点API
热门文章
- 百度地图清除指定覆盖物
- 【Python】2500块的外包项目,一款加密的直播引流软件,逆向JavaScript,保姆级实战教学!
- spring4开发SpringBatch 样例 -配置文件版
- 软件测试实习——第二十四天
- 天才基本法--裴之的“自动战棋“代码
- VI退出 退出VIM 适用新手
- 未来计算机的畅享300,新学期畅享作文300字(通用5篇)
- ubuntu 命令行批量重命名文件夹
- 如何保证电脑硬盘格式化后数据不能被恢复?
- django3.x+DRF+simpleui+uniapp打造自己的任务推广(兼职、悬赏)平台