centos版pcl下载

http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed19fa950d100b953f4c1597634b8a90406285c414d5391a564710e6a67060475ac4c50a2d0bab5e5b9ef4306f75527ea09bbede1d99eccc3f2ffe2423706b835612a419b8cb3026d620e70db7aa0ee7cdba3897b9d5a7db5244ca244538dfe78b2d5a529531e4516ca3f09619420356e7ac27658e1b2677&p=9239c75b86cc41ac5ab2c7710f0a83&newp=857ec64ad4d507b444bd9b7e0e14cb231610db2151d4d7176b82c825d7331b001c3bbfb423271203d4ce7a6407ac485fe8f63171330923a3dda5c91d9fb4c574799e612f6c&user=baidu&fm=sc&query=centos+pcl&qid=bdf85caf0009c111&p1=6

查看Install Howto
进https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/下载
epel-release-7-11.noarch.rpm

rpm -Uvh epel-release*rpm
yum install pcl-devel

也可以直接下载pcl-devel-1.7.2-1.el7.x86_64.rpm,用以下命令直接安装

 rpm -Uvh pcl-devel-1.7.2-1.el7.x86_64.rpm

跑一个简单pcl程序

http://pointclouds.org/documentation/tutorials/range_image_creation.php#range-image-creation

第一步:gedit range_image_crea./range_image_visualization -l five_people.pcdtion.cpp

#include <pcl/range_image/range_image.h>int main (int argc, char** argv) {pcl::PointCloud<pcl::PointXYZ> pointCloud;// Generate the datafor (float y=-0.5f; y<=0.5f; y+=0.01f) {for (float z=-0.5f; z<=0.5f; z+=0.01f) {pcl::PointXYZ point;point.x = 2.0f - y;point.y = y;point.z = z;pointCloud.points.push_back(point);}}pointCloud.width = (uint32_t) pointCloud.points.size();pointCloud.height = 1;// We now want to create a range image from the above point cloud, with a 1deg angular resolutionfloat angularResolution = (float) (  1.0f * (M_PI/180.0f));  //   1.0 degree in radiansfloat maxAngleWidth     = (float) (360.0f * (M_PI/180.0f));  // 360.0 degree in radiansfloat maxAngleHeight    = (float) (180.0f * (M_PI/180.0f));  // 180.0 degree in radiansEigen::Affine3f sensorPose = (Eigen::Affine3f)Eigen::Translation3f(0.0f, 0.0f, 0.0f);pcl::RangeImage::CoordinateFrame coordinate_frame = pcl::RangeImage::CAMERA_FRAME;float noiseLevel=0.00;float minRange = 0.0f;int borderSize = 1;pcl::RangeImage rangeImage;rangeImage.createFromPointCloud(pointCloud, angularResolution, maxAngleWidth, maxAngleHeight,sensorPose, coordinate_frame, noiseLevel, minRange, borderSize);std::cout << rangeImage << "\n";
}

第二步 gedit CMakeLists.txt

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)project(range_image_creation)find_package(PCL 1.2 REQUIRED)include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})add_executable (range_image_creation range_image_creation.cpp)
target_link_libraries (range_image_creation ${PCL_LIBRARIES})

第三步 mkdir build
第四步 cd build
cmake …
make
./range_image_creation

第五步 结果显示
You should see the following:

range image of size 42x36 with angular resolution 1deg/pixel and 1512 points

[root@localhost build]# ./range_image_creation
header:
seq: 0 stamp: 0 frame_id:
points[]: 1360
width: 40
height: 34
sensor_origin_: 0 0 0
sensor_orientation_: 0 0 0 1
is_dense: 0
angular resolution: 1deg/pixel in x and 1deg/pixel in y.

也可以跑一个可视化的程序

#include <iostream>#include <pcl/common/common_headers.h>
#include <pcl/range_image/range_image.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/range_image_visualizer.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/console/parse.h>typedef pcl::PointXYZ PointType;// --------------------
// -----Parameters-----
// --------------------
float angular_resolution_x = 0.5f,angular_resolution_y = angular_resolution_x;
pcl::RangeImage::CoordinateFrame coordinate_frame = pcl::RangeImage::CAMERA_FRAME;
bool live_update = false;// --------------
// -----Help-----
// --------------
void
printUsage (const char* progName)
{std::cout << "\n\nUsage: "<<progName<<" [options] <scene.pcd>\n\n"<< "Options:\n"<< "-------------------------------------------\n"<< "-rx <float>  angular resolution in degrees (default "<<angular_resolution_x<<")\n"<< "-ry <float>  angular resolution in degrees (default "<<angular_resolution_y<<")\n"<< "-c <int>     coordinate frame (default "<< (int)coordinate_frame<<")\n"<< "-l           live update - update the range image according to the selected view in the 3D viewer.\n"<< "-h           this help\n"<< "\n\n";
}void
setViewerPose (pcl::visualization::PCLVisualizer& viewer, const Eigen::Affine3f& viewer_pose)
{Eigen::Vector3f pos_vector = viewer_pose * Eigen::Vector3f(0, 0, 0);Eigen::Vector3f look_at_vector = viewer_pose.rotation () * Eigen::Vector3f(0, 0, 1) + pos_vector;Eigen::Vector3f up_vector = viewer_pose.rotation () * Eigen::Vector3f(0, -1, 0);viewer.setCameraPosition (pos_vector[0], pos_vector[1], pos_vector[2],look_at_vector[0], look_at_vector[1], look_at_vector[2],up_vector[0], up_vector[1], up_vector[2]);
}// --------------
// -----Main-----
// --------------
int
main (int argc, char** argv)
{// --------------------------------------// -----Parse Command Line Arguments-----// --------------------------------------if (pcl::console::find_argument (argc, argv, "-h") >= 0){printUsage (argv[0]);return 0;}if (pcl::console::find_argument (argc, argv, "-l") >= 0){live_update = true;std::cout << "Live update is on.\n";}if (pcl::console::parse (argc, argv, "-rx", angular_resolution_x) >= 0)std::cout << "Setting angular resolution in x-direction to "<<angular_resolution_x<<"deg.\n";if (pcl::console::parse (argc, argv, "-ry", angular_resolution_y) >= 0)std::cout << "Setting angular resolution in y-direction to "<<angular_resolution_y<<"deg.\n";int tmp_coordinate_frame;if (pcl::console::parse (argc, argv, "-c", tmp_coordinate_frame) >= 0){coordinate_frame = pcl::RangeImage::CoordinateFrame (tmp_coordinate_frame);std::cout << "Using coordinate frame "<< (int)coordinate_frame<<".\n";}angular_resolution_x = pcl::deg2rad (angular_resolution_x);angular_resolution_y = pcl::deg2rad (angular_resolution_y);// ---------------------------------------------------./range_image_visualization -l five_people.pcd---------------// -----Read pcd file or create example point cloud if not given-----// ------------------------------------------------------------------pcl::PointCloud<PointType>::Ptr point_cloud_ptr (new pcl::PointCloud<PointType>);pcl::PointCloud<PointType>& point_cloud = *point_cloud_ptr;Eigen::Affine3f scene_sensor_pose (Eigen::Affine3f::Identity ());std::vector<int> pcd_filename_indices = pcl::console::parse_file_extension_argument (argc, argv, "pcd");if (!pcd_filename_indices.empty ()){std::string filename = argv[pcd_filename_indices[0]];if (pcl::io::loadPCDFile (filename, point_cloud) == -1){std::cout << "Was not able to open file \""<<filename<<"\".\n";printUsage (argv[0]);return 0;}scene_sensor_pose = Eigen::Affine3f (Eigen::Translation3f (point_cloud.sensor_origin_[0],point_cloud.sensor_origin_[1],point_cloud.sensor_origin_[2])) *Eigen::Affine3f (point_cloud.sensor_orientation_);}else{std::cout << "\nNo *.pcd file given => Generating example point cloud.\n\n";for (float x=-0.5f; x<=0.5f; x+=0.01f){for (float y=-0.5f; y<=0.5f; y+=0.01f){PointType point;  point.x = x;  point.y = y;  point.z = 2.0f - y;point_cloud.points.push_back (point);}}point_cloud.width = (int) point_cloud.points.size ();  point_cloud.height = 1;}// -----------------------------------------------// -----Create RangeImage from the PointCloud-----// -----------------------------------------------float noise_level = 0.0;float min_range = 0.0f;int border_size = 1;pcl::RangeImage::Ptr range_image_ptr(new pcl::RangeImage);pcl::RangeImage& range_image = *range_image_ptr;   range_image.createFromPointCloud (point_cloud, angular_resolution_x, angular_resolution_y,pcl::deg2rad (360.0f), pcl::deg2rad (180.0f),scene_sensor_pose, coordinate_frame, noise_level, min_range, border_size);// --------------------------------------------// -----Open 3D viewer and add point cloud-----// --------------------------------------------pcl::visualization::PCLVisualizer viewer ("3D Viewer");viewer.setBackgroundColor (1, 1, 1);pcl::visualization::PointCloudColorHandlerCustom<pcl::PointWithRange> range_image_color_handler (range_image_ptr, 0, 0, 0);viewer.addPointCloud (range_image_ptr, range_image_color_handler, "range image");viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "range image");//viewer.addCoordinateSystem (1.0f, "global");//PointCloudColorHandlerCustom<PointType> point_cloud_color_handler (point_cloud_ptr, 150, 150, 150);//viewer.addPointCloud (point_cloud_ptr, point_cloud_color_handler, "original point cloud");viewer.initCameraParameters ();setViewerPose(viewer, range_image.getTransformationToWorldSystem ());// --------------------------// -----Show range image-----// --------------------------pcl::visualization::RangeImageVisualizer range_image_widget ("Range image");range_image_widget.showRangeImage (range_image);//--------------------// -----Main loop-----//--------------------while (!viewer.wasStopped ()){range_image_widget.spinOnce ();viewer.spinOnce ();pcl_sleep (0.01);if (live_update){scene_sensor_pose = viewer.getViewerPose();range_image.createFromPointCloud (point_cloud, angular_resolution_x, angular_resolution_y,pcl::deg2rad (360.0f), pcl::deg2rad (180.0f),scene_sensor_pose, pcl::RangeImage::LASER_FRAME, noise_level, min_range, border_size);range_image_widget.showRangeImage (range_image);}}
}

如上面编译过程进行编译
运行 ./range_image_visualization -l five_people.pcd

结果展示

centos安装pcl相关推荐

  1. CentOS 安装docker.ce报错提示containerd.io >= 1.2.2-3问题

    centos安装docker.ce遇到报错,提示如下 # yum install -y docker-ce Last metadata expiration check: 0:01:49 ago on ...

  2. CentOS安装crontab

    CentOS安装crontab: yum install crontabs 说明: service crond start //启动服务 service crond stop //关闭服务 servi ...

  3. CentOS 安装Apache

    # centOS 安装A M P 环境 [参考简书作者,非常感谢!!!](https://www.jianshu.com/p/bc14ff0ab1c7) ## 一 Apache 环境安装 1 安装Ap ...

  4. centos 安装 NTFS支持

    2019独角兽企业重金招聘Python工程师标准>>> 参考的原文网址: centos安装完之后,默认是不支持NTFS磁盘格式的,解决的方法之一就是安装NTFS-3G模块,但是默认的 ...

  5. centos安装及网络配置

    感谢老师传授,共同学习!谢谢!仅供自己日后复习之用! centos安装关键点: 创建分区: / 系统分区 /boot 启动分区 SWAP 交换分区,虚拟内存.主要是缓解物理内存不足. 虚拟化软件: V ...

  6. centos安装tensorFlow的java环境

    参考问题汇总 centos安装tensorFlow版本的时候会遇到的一些问题,参考这个链接:https://blog.csdn.net/luoyexuge/article/details/783212 ...

  7. centos 安装 svn

    centos 安装svn服务 1. # yum install subversion 2.然后检查下安装的版本号 因为版本号不同可能会出现不同的情况 版本 信息 [root@VM_137_37_cen ...

  8. Linux(CentOS)安装分区方案

    为什么80%的码农都做不了架构师?>>>    Linux(CentOS)安装分区方案 /boot(不是必须的):/boot分区用于引导系统,它包含了操作系统的内核和在启动系统过程中 ...

  9. CentOS安装jdk的三种方法

    2019独角兽企业重金招聘Python工程师标准>>> CentOS安装jdk的三种方法 环境 Linux版本:CentOS 6.5.Ubuntu 12.04.5 JDK版本:JDK ...

最新文章

  1. 牛客多校第六场-H-Pair
  2. Notepad++加上xml格式化的功能
  3. 王超:奇虎360MongoDB
  4. 2021暑假实习-SSM超市积分管理系统-day02笔记
  5. c++ 链表_算法学习笔记 - 链表 - 单链表的粗糙实现
  6. $_post 数据上传到那个位置_如何实现图片上传并保存到数据库?
  7. java jdk API中英文下载
  8. caffe-windows10-matlab2014a安装配置6个问题
  9. Android 4.0操作系统的20个使用小技巧
  10. java 强制类型转换_lt;08gt;数据类型转换
  11. 素性测试AKS算法程序
  12. C语言调用外部API实现车牌识别
  13. php博客平台 开源,PHP开源博客Blog - PHP开源网(PHP-OPEN.ORG)
  14. imageview显示圆形图片
  15. 本文为Mybatis面经,其中难点问题做了详细解释
  16. 使用 Eav 模型构建可无限扩展的数据存储能力
  17. python爬虫:爬取猫眼TOP100榜的100部高分经典电影
  18. 【C++】相对路径与绝对路径以及斜杠与反斜杠的区别
  19. 计算机考研没有获奖没有科研难吗,大学期间没有什么获奖经历和科研成果, 对考研的影响大吗?...
  20. QT+opencv环境搭建

热门文章

  1. 关于kafka集群搭建前后
  2. getenv java,java System.getenv环境名称以“=”开头
  3. 电商项目订单取消(Redis 延迟队列)--1
  4. 如何使用 SigNoz 快速搭建一个可观测系统
  5. 《rt-thread驱动框架分析》-lcd驱动
  6. 一文搞懂RESTFUL风格(Java版)
  7. 02-线性系统稳定性及劳斯判据
  8. 佳能以影像产品和官方SDK为核心提供智慧影像解决方案
  9. AI(角度渐变icon绘制步骤)
  10. IIS使用流程(有图解)