当前位置:   article > 正文

3D点云学习笔记(PCL安装及配置)_pcl库

pcl库

1 PCL简介

PCL英文全称为Point Cloud Library,对于3D点云处理来说,PCL完全是一个的模块化的现代C++模板库。其基于以下第三方库:Boost、Eigen、FLANN、VTK、CUDA、OpenNI2、Qhull,实现点云相关的获取、滤波、分割、配准、检索、特征提取、识别、追踪、曲面重建、可视化等。PCL架构图如下图所示

在这里插入图片描述

PCL包含一下模块库,滤波器Filter、特征Features、关键点Keypoints、配准Resistrantion、kd树Kd-tree、oc树Octree、分割Segmentation、采样一致性Sample Consensus、表面Surface、距离图像Range Image、输入输出I/O、可视化Visualization、常用库Common、搜索Search、二进制文件Binaries

PCL Walkthrough
PCL官网
PCL各模块文档

2 PCL安装(Win10 64位+Visual Studio 2019)

2.1 PCL安装包安装

在PCL下载地址中,根据自己的Visual Studio版本,选择合适的PCL版本,如下图VS2019需要安装PCL-1.12.1,下载下图中的前两项(PCL-1.12.1-AllInOne-msvc2019-win64.exepcl-1.12.1-pdb-msvc2019-win64.zip),直接运行PCL-1.12.1-AllInOne-msvc2019-win64.exePCL 下载地址在这里插入图片描述
由于需要添加的环境变量较多,所以在此界面中需选择不加入到环境变量,之后再手动添加,
在这里插入图片描述
在以下组件界面选择全部组件
在这里插入图片描述
若在安装过程中弹出OpenNI的安装框,将OpenNI的安装路径设置为PCL安装路径下的3rdParty\OpenNI2文件夹。若未弹出,则双击在PCL安装路径下的3rdParty\OpenNi下的.smi文件。

安装程序结束后,PCL安装目录结构如下图所示,其中第三方库3rdParty文件夹下包含Boost、Eigen、FLANN、OpenNI2、Qhull和VTK六个文件夹,各个文件夹目录结构见下图。
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

2.2 PCL解压缩文件

pcl-1.12.1-pdb-msvc2019-win64.zip解压后的pdb文件全部拷贝到PCL安装目录下的bin文件夹中。

2.3 配置环境变量

在系统变量中新建PCL,里面包含

 D:\Program Files\PCL 1.12.1\bin;
 D:\Program Files\PCL 1.12.1\3rdParty\VTK\bin;
 D:\Program Files\PCL 1.12.1\3rdParty\Qhull\bin;
 D:\Program Files\PCL 1.12.1\3rdParty\FLANN\bin;
 D:\Program Files\PCL 1.12.1\3rdParty\OpenNI2\Tools;
  • 1
  • 2
  • 3
  • 4
  • 5

之后在环境变量path中加入%PCL%
在这里插入图片描述
在这里插入图片描述

2.4 VS2019配置PCL

2.4.1 VS2019配置 Include包含目录(.h)

在属性页窗口中选择VC++目录,点击右侧的包含目录,向其中添加 .h文件所在目录 后点击确定。

D:\Program Files\PCL 1.12.1\3rdParty\FLANN\include
D:\Program Files\PCL 1.12.1\3rdParty\Qhull\include
D:\Program Files\PCL 1.12.1\3rdParty\OpenNI2\Include
D:\Program Files\PCL 1.12.1\3rdParty\VTK\include\vtk-8.0
D:\Program Files\PCL 1.12.1\3rdParty\Eigen\eigen3
D:\Program Files\PCL 1.12.1\3rdParty\Boost\include\boost-1_64
D:\Program Files\PCL 1.12.1\include\pcl-1.12
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

2.4.2 VS2019配置 Lib库目录

在属性页窗口中选择VC++目录,点击右侧的库目录,向其中添加 .lib文件所在目录 后点击确定。

D:\Program Files\PCL 1.12.1\3rdParty\Qhull\lib
D:\Program Files\PCL 1.12.1\3rdParty\OpenNI2\Lib
D:\Program Files\PCL 1.12.1\3rdParty\FLANN\lib
D:\Program Files\PCL 1.12.1\3rdParty\VTK\lib
D:\Program Files\PCL 1.12.1\3rdParty\Boost\lib
D:\Program Files\PCL 1.12.1\lib

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

2.4.3 VS2019配置 链接器->输入(使用Eclipse+Java来获取lib下的lib文件名)

由于项目运行时需要链接到其他lib库文件,所以需要向链接器指定项目运行需要链接到的lib文件名称,因此需要获取PCL安装目录下lib文件夹以及第三方库3rdParty文件夹下所有的lib文件名称,具体的lib文件夹包含:`

1)D:\Program Files\PCL 1.12.1\lib;
(2)D:\Program Files\PCL 1.12.1\3rdParty\Boost\lib;
(3)D:\Program Files\PCL 1.12.1\3rdParty\FLANN\lib;
(4)D:\Program Files\PCL 1.12.1\3rdParty\OpenNI2\Lib;
(5)D:\Program Files\PCL 1.12.1\3rdParty\Qhull\lib;
(6)D:\Program Files\PCL 1.12.1\3rdParty\VTK\lib`
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

以下为获取lib文件名的python程序,需要将file_dir替换成上面的程序运行6次

import os

def traverse(f):
    fs = os.listdir(f)
    print(fs)
    for f1 in fs:
        try:
            if f1.split('.')[1] == 'lib' or f1.split('.')[2] == 'lib':
                print(f1)
        except:
            print()

    return

file_dir = 'D:\\Program Files\\PCL 1.12.1\\3rdParty\\VTK\\Lib'
traverse(file_dir)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

PCL1.12.1 64位Release版本的lib文件如下所示

pcl_common.lib
pcl_commond.lib
pcl_features.lib
pcl_featuresd.lib
pcl_filters.lib
pcl_filtersd.lib
pcl_io.lib
pcl_iod.lib
pcl_io_ply.lib
pcl_io_plyd.lib
pcl_kdtree.lib
pcl_kdtreed.lib
pcl_keypoints.lib
pcl_keypointsd.lib
pcl_ml.lib
pcl_mld.lib
pcl_octree.lib
pcl_octreed.lib
pcl_outofcore.lib
pcl_outofcored.lib
pcl_people.lib
pcl_peopled.lib
pcl_recognition.lib
pcl_recognitiond.lib
pcl_registration.lib
pcl_registrationd.lib
pcl_sample_consensus.lib
pcl_sample_consensusd.lib
pcl_search.lib
pcl_searchd.lib
pcl_segmentation.lib
pcl_segmentationd.lib
pcl_stereo.lib
pcl_stereod.lib
pcl_surface.lib
pcl_surfaced.lib
pcl_tracking.lib
pcl_trackingd.lib
pcl_visualization.lib
pcl_visualizationd.lib
libboost_atomic-vc142-mt-gd-x64-1_78.lib
libboost_atomic-vc142-mt-x64-1_78.lib
libboost_bzip2-vc142-mt-gd-x64-1_78.lib
libboost_bzip2-vc142-mt-x64-1_78.lib
libboost_chrono-vc142-mt-gd-x64-1_78.lib
libboost_chrono-vc142-mt-x64-1_78.lib
libboost_container-vc142-mt-gd-x64-1_78.lib
libboost_container-vc142-mt-x64-1_78.lib
libboost_context-vc142-mt-gd-x64-1_78.lib
libboost_context-vc142-mt-x64-1_78.lib
libboost_contract-vc142-mt-gd-x64-1_78.lib
libboost_contract-vc142-mt-x64-1_78.lib
libboost_coroutine-vc142-mt-gd-x64-1_78.lib
libboost_coroutine-vc142-mt-x64-1_78.lib
libboost_date_time-vc142-mt-gd-x64-1_78.lib
libboost_date_time-vc142-mt-x64-1_78.lib
libboost_exception-vc142-mt-gd-x64-1_78.lib
libboost_exception-vc142-mt-x64-1_78.lib
libboost_filesystem-vc142-mt-gd-x64-1_78.lib
libboost_filesystem-vc142-mt-x64-1_78.lib
libboost_graph-vc142-mt-gd-x64-1_78.lib
libboost_graph-vc142-mt-x64-1_78.lib
libboost_graph_parallel-vc142-mt-gd-x64-1_78.lib
libboost_graph_parallel-vc142-mt-x64-1_78.lib
libboost_iostreams-vc142-mt-gd-x64-1_78.lib
libboost_iostreams-vc142-mt-x64-1_78.lib
libboost_json-vc142-mt-gd-x64-1_78.lib
libboost_json-vc142-mt-x64-1_78.lib
libboost_locale-vc142-mt-gd-x64-1_78.lib
libboost_locale-vc142-mt-x64-1_78.lib
libboost_log-vc142-mt-gd-x64-1_78.lib
libboost_log-vc142-mt-x64-1_78.lib
libboost_log_setup-vc142-mt-gd-x64-1_78.lib
libboost_log_setup-vc142-mt-x64-1_78.lib
libboost_math_c99-vc142-mt-gd-x64-1_78.lib
libboost_math_c99-vc142-mt-x64-1_78.lib
libboost_math_c99f-vc142-mt-gd-x64-1_78.lib
libboost_math_c99f-vc142-mt-x64-1_78.lib
libboost_math_c99l-vc142-mt-gd-x64-1_78.lib
libboost_math_c99l-vc142-mt-x64-1_78.lib
libboost_math_tr1-vc142-mt-gd-x64-1_78.lib
libboost_math_tr1-vc142-mt-x64-1_78.lib
libboost_math_tr1f-vc142-mt-gd-x64-1_78.lib
libboost_math_tr1f-vc142-mt-x64-1_78.lib
libboost_math_tr1l-vc142-mt-gd-x64-1_78.lib
libboost_math_tr1l-vc142-mt-x64-1_78.lib
libboost_mpi-vc142-mt-gd-x64-1_78.lib
libboost_mpi-vc142-mt-x64-1_78.lib
libboost_nowide-vc142-mt-gd-x64-1_78.lib
libboost_nowide-vc142-mt-x64-1_78.lib
libboost_numpy38-vc142-mt-gd-x64-1_78.lib
libboost_numpy38-vc142-mt-x64-1_78.lib
libboost_prg_exec_monitor-vc142-mt-gd-x64-1_78.lib
libboost_prg_exec_monitor-vc142-mt-x64-1_78.lib
libboost_program_options-vc142-mt-gd-x64-1_78.lib
libboost_program_options-vc142-mt-x64-1_78.lib
libboost_python38-vc142-mt-gd-x64-1_78.lib
libboost_python38-vc142-mt-x64-1_78.lib
libboost_random-vc142-mt-gd-x64-1_78.lib
libboost_random-vc142-mt-x64-1_78.lib
libboost_regex-vc142-mt-gd-x64-1_78.lib
libboost_regex-vc142-mt-x64-1_78.lib
libboost_serialization-vc142-mt-gd-x64-1_78.lib
libboost_serialization-vc142-mt-x64-1_78.lib
libboost_system-vc142-mt-gd-x64-1_78.lib
libboost_system-vc142-mt-x64-1_78.lib
libboost_test_exec_monitor-vc142-mt-gd-x64-1_78.lib
libboost_test_exec_monitor-vc142-mt-x64-1_78.lib
libboost_thread-vc142-mt-gd-x64-1_78.lib
libboost_thread-vc142-mt-x64-1_78.lib
libboost_timer-vc142-mt-gd-x64-1_78.lib
libboost_timer-vc142-mt-x64-1_78.lib
libboost_type_erasure-vc142-mt-gd-x64-1_78.lib
libboost_type_erasure-vc142-mt-x64-1_78.lib
libboost_unit_test_framework-vc142-mt-gd-x64-1_78.lib
libboost_unit_test_framework-vc142-mt-x64-1_78.lib
libboost_wave-vc142-mt-gd-x64-1_78.lib
libboost_wave-vc142-mt-x64-1_78.lib
libboost_wserialization-vc142-mt-gd-x64-1_78.lib
libboost_wserialization-vc142-mt-x64-1_78.lib
libboost_zlib-vc142-mt-gd-x64-1_78.lib
libboost_zlib-vc142-mt-x64-1_78.lib
flann-gd.lib
flann.lib
flann_cpp-gd.lib
flann_cpp.lib
flann_cpp_s-gd.lib
flann_cpp_s.lib
flann_s-gd.lib
flann_s.lib
OpenNI2.lib
qhullcpp.lib
qhullcpp_d.lib
qhullstatic.lib
qhullstatic_d.lib
qhullstatic_r.lib
qhullstatic_rd.lib
qhull_r.lib
qhull_rd.lib
vtkcgns-9.1.lib
vtkcgns-9.1d.lib
vtkChartsCore-9.1.lib
vtkChartsCore-9.1d.lib
vtkCommonColor-9.1.lib
vtkCommonColor-9.1d.lib
vtkCommonComputationalGeometry-9.1.lib
vtkCommonComputationalGeometry-9.1d.lib
vtkCommonCore-9.1.lib
vtkCommonCore-9.1d.lib
vtkCommonDataModel-9.1.lib
vtkCommonDataModel-9.1d.lib
vtkCommonExecutionModel-9.1.lib
vtkCommonExecutionModel-9.1d.lib
vtkCommonMath-9.1.lib
vtkCommonMath-9.1d.lib
vtkCommonMisc-9.1.lib
vtkCommonMisc-9.1d.lib
vtkCommonSystem-9.1.lib
vtkCommonSystem-9.1d.lib
vtkCommonTransforms-9.1.lib
vtkCommonTransforms-9.1d.lib
vtkDICOMParser-9.1.lib
vtkDICOMParser-9.1d.lib
vtkDomainsChemistry-9.1.lib
vtkDomainsChemistry-9.1d.lib
vtkDomainsChemistryOpenGL2-9.1.lib
vtkDomainsChemistryOpenGL2-9.1d.lib
vtkdoubleconversion-9.1.lib
vtkdoubleconversion-9.1d.lib
vtkexodusII-9.1.lib
vtkexodusII-9.1d.lib
vtkexpat-9.1.lib
vtkexpat-9.1d.lib
vtkFiltersAMR-9.1.lib
vtkFiltersAMR-9.1d.lib
vtkFiltersCore-9.1.lib
vtkFiltersCore-9.1d.lib
vtkFiltersExtraction-9.1.lib
vtkFiltersExtraction-9.1d.lib
vtkFiltersFlowPaths-9.1.lib
vtkFiltersFlowPaths-9.1d.lib
vtkFiltersGeneral-9.1.lib
vtkFiltersGeneral-9.1d.lib
vtkFiltersGeneric-9.1.lib
vtkFiltersGeneric-9.1d.lib
vtkFiltersGeometry-9.1.lib
vtkFiltersGeometry-9.1d.lib
vtkFiltersHybrid-9.1.lib
vtkFiltersHybrid-9.1d.lib
vtkFiltersHyperTree-9.1.lib
vtkFiltersHyperTree-9.1d.lib
vtkFiltersImaging-9.1.lib
vtkFiltersImaging-9.1d.lib
vtkFiltersModeling-9.1.lib
vtkFiltersModeling-9.1d.lib
vtkFiltersParallel-9.1.lib
vtkFiltersParallel-9.1d.lib
vtkFiltersParallelImaging-9.1.lib
vtkFiltersParallelImaging-9.1d.lib
vtkFiltersPoints-9.1.lib
vtkFiltersPoints-9.1d.lib
vtkFiltersProgrammable-9.1.lib
vtkFiltersProgrammable-9.1d.lib
vtkFiltersSelection-9.1.lib
vtkFiltersSelection-9.1d.lib
vtkFiltersSMP-9.1.lib
vtkFiltersSMP-9.1d.lib
vtkFiltersSources-9.1.lib
vtkFiltersSources-9.1d.lib
vtkFiltersStatistics-9.1.lib
vtkFiltersStatistics-9.1d.lib
vtkFiltersTexture-9.1.lib
vtkFiltersTexture-9.1d.lib
vtkFiltersTopology-9.1.lib
vtkFiltersTopology-9.1d.lib
vtkFiltersVerdict-9.1.lib
vtkFiltersVerdict-9.1d.lib
vtkfmt-9.1.lib
vtkfmt-9.1d.lib
vtkfreetype-9.1.lib
vtkfreetype-9.1d.lib
vtkGeovisCore-9.1.lib
vtkGeovisCore-9.1d.lib
vtkgl2ps-9.1.lib
vtkgl2ps-9.1d.lib
vtkglew-9.1.lib
vtkglew-9.1d.lib
vtkhdf5-9.1.lib
vtkhdf5-9.1d.lib
vtkhdf5_hl-9.1.lib
vtkhdf5_hl-9.1d.lib
vtkImagingColor-9.1.lib
vtkImagingColor-9.1d.lib
vtkImagingCore-9.1.lib
vtkImagingCore-9.1d.lib
vtkImagingFourier-9.1.lib
vtkImagingFourier-9.1d.lib
vtkImagingGeneral-9.1.lib
vtkImagingGeneral-9.1d.lib
vtkImagingHybrid-9.1.lib
vtkImagingHybrid-9.1d.lib
vtkImagingMath-9.1.lib
vtkImagingMath-9.1d.lib
vtkImagingMorphological-9.1.lib
vtkImagingMorphological-9.1d.lib
vtkImagingSources-9.1.lib
vtkImagingSources-9.1d.lib
vtkImagingStatistics-9.1.lib
vtkImagingStatistics-9.1d.lib
vtkImagingStencil-9.1.lib
vtkImagingStencil-9.1d.lib
vtkInfovisCore-9.1.lib
vtkInfovisCore-9.1d.lib
vtkInfovisLayout-9.1.lib
vtkInfovisLayout-9.1d.lib
vtkInteractionImage-9.1.lib
vtkInteractionImage-9.1d.lib
vtkInteractionStyle-9.1.lib
vtkInteractionStyle-9.1d.lib
vtkInteractionWidgets-9.1.lib
vtkInteractionWidgets-9.1d.lib
vtkIOAMR-9.1.lib
vtkIOAMR-9.1d.lib
vtkIOAsynchronous-9.1.lib
vtkIOAsynchronous-9.1d.lib
vtkIOCGNSReader-9.1.lib
vtkIOCGNSReader-9.1d.lib
vtkIOChemistry-9.1.lib
vtkIOChemistry-9.1d.lib
vtkIOCityGML-9.1.lib
vtkIOCityGML-9.1d.lib
vtkIOCONVERGECFD-9.1.lib
vtkIOCONVERGECFD-9.1d.lib
vtkIOCore-9.1.lib
vtkIOCore-9.1d.lib
vtkIOEnSight-9.1.lib
vtkIOEnSight-9.1d.lib
vtkIOExodus-9.1.lib
vtkIOExodus-9.1d.lib
vtkIOExport-9.1.lib
vtkIOExport-9.1d.lib
vtkIOExportGL2PS-9.1.lib
vtkIOExportGL2PS-9.1d.lib
vtkIOExportPDF-9.1.lib
vtkIOExportPDF-9.1d.lib
vtkIOGeometry-9.1.lib
vtkIOGeometry-9.1d.lib
vtkIOHDF-9.1.lib
vtkIOHDF-9.1d.lib
vtkIOImage-9.1.lib
vtkIOImage-9.1d.lib
vtkIOImport-9.1.lib
vtkIOImport-9.1d.lib
vtkIOInfovis-9.1.lib
vtkIOInfovis-9.1d.lib
vtkIOIOSS-9.1.lib
vtkIOIOSS-9.1d.lib
vtkIOLegacy-9.1.lib
vtkIOLegacy-9.1d.lib
vtkIOLSDyna-9.1.lib
vtkIOLSDyna-9.1d.lib
vtkIOMINC-9.1.lib
vtkIOMINC-9.1d.lib
vtkIOMotionFX-9.1.lib
vtkIOMotionFX-9.1d.lib
vtkIOMovie-9.1.lib
vtkIOMovie-9.1d.lib
vtkIONetCDF-9.1.lib
vtkIONetCDF-9.1d.lib
vtkIOOggTheora-9.1.lib
vtkIOOggTheora-9.1d.lib
vtkIOParallel-9.1.lib
vtkIOParallel-9.1d.lib
vtkIOParallelXML-9.1.lib
vtkIOParallelXML-9.1d.lib
vtkIOPLY-9.1.lib
vtkIOPLY-9.1d.lib
vtkIOSegY-9.1.lib
vtkIOSegY-9.1d.lib
vtkIOSQL-9.1.lib
vtkIOSQL-9.1d.lib
vtkioss-9.1.lib
vtkioss-9.1d.lib
vtkIOTecplotTable-9.1.lib
vtkIOTecplotTable-9.1d.lib
vtkIOVeraOut-9.1.lib
vtkIOVeraOut-9.1d.lib
vtkIOVideo-9.1.lib
vtkIOVideo-9.1d.lib
vtkIOXML-9.1.lib
vtkIOXML-9.1d.lib
vtkIOXMLParser-9.1.lib
vtkIOXMLParser-9.1d.lib
vtkjpeg-9.1.lib
vtkjpeg-9.1d.lib
vtkjsoncpp-9.1.lib
vtkjsoncpp-9.1d.lib
vtkkissfft-9.1.lib
vtkkissfft-9.1d.lib
vtklibharu-9.1.lib
vtklibharu-9.1d.lib
vtklibproj-9.1.lib
vtklibproj-9.1d.lib
vtklibxml2-9.1.lib
vtklibxml2-9.1d.lib
vtkloguru-9.1.lib
vtkloguru-9.1d.lib
vtklz4-9.1.lib
vtklz4-9.1d.lib
vtklzma-9.1.lib
vtklzma-9.1d.lib
vtkmetaio-9.1.lib
vtkmetaio-9.1d.lib
vtknetcdf-9.1.lib
vtknetcdf-9.1d.lib
vtkogg-9.1.lib
vtkogg-9.1d.lib
vtkParallelCore-9.1.lib
vtkParallelCore-9.1d.lib
vtkParallelDIY-9.1.lib
vtkParallelDIY-9.1d.lib
vtkpng-9.1.lib
vtkpng-9.1d.lib
vtkpugixml-9.1.lib
vtkpugixml-9.1d.lib
vtkRenderingAnnotation-9.1.lib
vtkRenderingAnnotation-9.1d.lib
vtkRenderingContext2D-9.1.lib
vtkRenderingContext2D-9.1d.lib
vtkRenderingContextOpenGL2-9.1.lib
vtkRenderingContextOpenGL2-9.1d.lib
vtkRenderingCore-9.1.lib
vtkRenderingCore-9.1d.lib
vtkRenderingFreeType-9.1.lib
vtkRenderingFreeType-9.1d.lib
vtkRenderingGL2PSOpenGL2-9.1.lib
vtkRenderingGL2PSOpenGL2-9.1d.lib
vtkRenderingImage-9.1.lib
vtkRenderingImage-9.1d.lib
vtkRenderingLabel-9.1.lib
vtkRenderingLabel-9.1d.lib
vtkRenderingLOD-9.1.lib
vtkRenderingLOD-9.1d.lib
vtkRenderingOpenGL2-9.1.lib
vtkRenderingOpenGL2-9.1d.lib
vtkRenderingSceneGraph-9.1.lib
vtkRenderingSceneGraph-9.1d.lib
vtkRenderingUI-9.1.lib
vtkRenderingUI-9.1d.lib
vtkRenderingVolume-9.1.lib
vtkRenderingVolume-9.1d.lib
vtkRenderingVolumeOpenGL2-9.1.lib
vtkRenderingVolumeOpenGL2-9.1d.lib
vtkRenderingVtkJS-9.1.lib
vtkRenderingVtkJS-9.1d.lib
vtksqlite-9.1.lib
vtksqlite-9.1d.lib
vtksys-9.1.lib
vtksys-9.1d.lib
vtkTestingRendering-9.1.lib
vtkTestingRendering-9.1d.lib
vtktheora-9.1.lib
vtktheora-9.1d.lib
vtktiff-9.1.lib
vtktiff-9.1d.lib
vtkverdict-9.1.lib
vtkverdict-9.1d.lib
vtkViewsContext2D-9.1.lib
vtkViewsContext2D-9.1d.lib
vtkViewsCore-9.1.lib
vtkViewsCore-9.1d.lib
vtkViewsInfovis-9.1.lib
vtkViewsInfovis-9.1d.lib
vtkWrappingTools-9.1.lib
vtkWrappingTools-9.1d.lib
vtkzlib-9.1.lib
vtkzlib-9.1d.lib
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417

2.4.4 VS2019配置预处理器

在属性页窗口中选择C/C+±>预处理器,点击右侧的预处理器定义,向其中添加_CRT_SECURE_NO_WARNINGS;后点击确定。

2.4.5 VS2019 PCL测试

#include<pcl/visualization/cloud_viewer.h>
#include<iostream>
#include<pcl/io/io.h>
#include<pcl/io/pcd_io.h>
#include<pcl/io/ply_io.h>
#include<pcl/point_types.h>

using namespace std;
using namespace pcl;

void viewerOneOff(visualization::PCLVisualizer& viewer) {
	viewer.setBackgroundColor(0, 0, 0); //设置背景颜色为黑色
}

int main() 
{
	PointCloud<PointXYZ>::Ptr cloud(new PointCloud<PointXYZ>);

	char strfilepath[256] = "rabbit.pcd";
	if (-1 == io::loadPCDFile(strfilepath, *cloud)) 
	{
		cout << "error input!" << endl;
		return -1;
	}

	cout << cloud->points.size() << endl;
	visualization::CloudViewer viewer("Cloud Viewer: Rabbit");

	viewer.showCloud(cloud);
	viewer.runOnVisualizationThreadOnce(viewerOneOff);
	system("pause");
	return 0;
}

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34

运行结果
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/267939
推荐阅读
相关标签
  

闽ICP备14008679号