PCL官方demo的编译使用教程

写在前面

准备PCL

参考各个版本的Open3D、PCL的编译、使用教程
本文使用PCL1.14.0PCL1.14.0安装、使用教程

PCL Demo使用

PCL官方文档

https://pcl.readthedocs.io/projects/tutorials/en/master/index.html

本地源码

找到本地PCL安装路径的相关源码,在YOUR_PATH/PCL 1.14.0/share/doc/pcl-1.14/tutorials/sources
在这里插入图片描述
在这里插入图片描述
用VsCode打开tutorials目录
在这里插入图片描述

全部编译

source路径下有一个CMakeLists.txt,已经把所有的demo都包含进来了,因此可以用脚本编译全部demo
在tutorials下新建一个compile.bat,内容是:

cmake -DCMAKE_BUILD_TYPE=Release ^
-DPCL_DIR="D:/carlos/install/PCL 1.14.0/cmake" ^
-S ./sources -B ./build

cmake --build ./build --config Release --target ALL_BUILD

在这里插入图片描述
改一下CMakeLists.txt,把一些编译不过的注释掉,编译不过的几个程序主要的原因是安装的PCL里面缺少openni的一个头文件:openni_grabber.h,报错:
fatal error C1083: 无法打开包括文件: “pcl/io/openni_grabber.h”

CMakeLists.txt内容如下:

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project("PCL_Tutorials")

foreach(subdir
  cloud_viewer
  cluster_extraction
  concatenate_clouds
  concatenate_fields
  concatenate_points
  concave_hull_2d
  conditional_removal
  convex_hull_2d
  correspondence_grouping
  cylinder_segmentation
  extract_indices
  #feature_evaluation
  greedy_projection
  implicit_shape_model
  iterative_closest_point
  kdtree_search
  min_cut_segmentation
  moment_of_inertia
  # narf_descriptor_visualization
  narf_feature_extraction
  narf_keypoint_extraction
  octree_change_detection
  octree_search
  # openni_grabber
  # openni_narf_keypoint_extraction
  # openni_range_image_visualization
  passthrough
  pcd_read
  pcd_write
  pcl_visualizer
  planar_segmentation
  # point_cloud_compression
  project_inliers
  radius_outlier_removal
  random_sample_consensus
  range_image_border_extraction
  range_image_creation
  range_image_visualization
  region_growing_rgb_segmentation
  region_growing_segmentation
  registration_api
  remove_outliers
  resampling
  rops_feature
  statistical_removal

  stick_segmentation
  supervoxel_clustering
  template_alignment
  tracking
  # vfh_recognition
  voxel_grid
  normal_distributions_transform
  # # Additional/Complex tutorials presented at PCL events
  # iros2011
  # iccv2011
  normal_estimation_using_integral_images
)

add_subdirectory(${subdir})

endforeach()

然后开始编译
在这里插入图片描述

单个编译

单个编译,见PCL1.14.0安装、使用教程中demo部分

参考

文中已列出

主要做激光/影像三维重建,配准、分割等常用点云算法,熟悉open3d、pcl等开源点云库,技术交流、咨询可私信

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

诺有缸的高飞鸟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值