VS2019+PCL 1.12.0安装和配置教程

1. PCL 1.12.0下载和安装

  1. PCL 1.12.0下载链接:https://github.com/PointCloudLibrary/pcl/releases

  2. 下载这两个文件:
    PCL-1.12.0-AllInOne-msvc2019-win64.exe
    pcl-1.12.0-rc1-pdb-msvc2019-win64.zip
    VS2019+PCL 1.12.0安装和配置教程_第1张图片

  3. 双击PCL-1.12.0-AllInOne-msvc2019-win64.exe进行安装
    VS2019+PCL 1.12.0安装和配置教程_第2张图片

    VS2019+PCL 1.12.0安装和配置教程_第3张图片
    VS2019+PCL 1.12.0安装和配置教程_第4张图片
    VS2019+PCL 1.12.0安装和配置教程_第5张图片
    VS2019+PCL 1.12.0安装和配置教程_第6张图片
    VS2019+PCL 1.12.0安装和配置教程_第7张图片
    VS2019+PCL 1.12.0安装和配置教程_第8张图片

  4. 安装过程中出现如下弹窗,单击安装
    VS2019+PCL 1.12.0安装和配置教程_第9张图片
    VS2019+PCL 1.12.0安装和配置教程_第10张图片

  5. 安装目录如下
    VS2019+PCL 1.12.0安装和配置教程_第11张图片
    VS2019+PCL 1.12.0安装和配置教程_第12张图片

  6. 解压pcl-1.12.0-rc1-pdb-msvc2019-win64.zip,将解压得到的文件夹中的内容添加到:C:\Program Files\PCL 1.12.0\bin
    VS2019+PCL 1.12.0安装和配置教程_第13张图片
    VS2019+PCL 1.12.0安装和配置教程_第14张图片
    安装到此结束。

2. VS2019配置PCL 1.12.0

此电脑,右键,属性,高级系统设置,高级,环境变量,双击Path
VS2019+PCL 1.12.0安装和配置教程_第15张图片
添加如下8条

C:\Program Files\OpenNI2\Lib
C:\Program Files\OpenNI2\Redist
C:\Program Files\OpenNI2\Tools
C:\Program Files\PCL 1.12.0\bin
C:\Program Files\PCL 1.12.0\3rdParty\Boost\lib
C:\Program Files\PCL 1.12.0\3rdParty\FLANN\bin
C:\Program Files\PCL 1.12.0\3rdParty\Qhull\bin
C:\Program Files\PCL 1.12.0\3rdParty\VTK\bin

VS2019+PCL 1.12.0安装和配置教程_第16张图片
注意:这一步完成之后,需要将电脑注销一下才能生效(不用重启)。
打开VS2019创建新项目
VS2019+PCL 1.12.0安装和配置教程_第17张图片
VS2019+PCL 1.12.0安装和配置教程_第18张图片
VS2019+PCL 1.12.0安装和配置教程_第19张图片
Release,X64;属性管理器,右键Release|x64,添加新项目属性表PCL 1.12.0 Release x64.props
VS2019+PCL 1.12.0安装和配置教程_第20张图片
VS2019+PCL 1.12.0安装和配置教程_第21张图片
VS2019+PCL 1.12.0安装和配置教程_第22张图片
通用属性,VC++目录,包含目录,添加如下内容

C:\Program Files\PCL 1.12.0\include\pcl-1.12
C:\Program Files\PCL 1.12.0\3rdParty\Boost\include\boost-1_76
C:\Program Files\PCL 1.12.0\3rdParty\Eigen\eigen3
C:\Program Files\PCL 1.12.0\3rdParty\FLANN\include
C:\Program Files\PCL 1.12.0\3rdParty\Qhull\include
C:\Program Files\OpenNI2\Include
C:\Program Files\PCL 1.12.0\3rdParty\VTK\include\vtk-9.0

VS2019+PCL 1.12.0安装和配置教程_第23张图片
通用属性,VC++目录,库目录,添加如下内容

C:\Program Files\PCL 1.12.0\lib
C:\Program Files\PCL 1.12.0\3rdParty\Boost\lib
C:\Program Files\PCL 1.12.0\3rdParty\FLANN\lib
C:\Program Files\OpenNI2\Lib
C:\Program Files\PCL 1.12.0\3rdParty\Qhull\lib
C:\Program Files\PCL 1.12.0\3rdParty\VTK\lib

VS2019+PCL 1.12.0安装和配置教程_第24张图片
C/C++,预处理器,预处理器定义,添加如下内容

_CRT_SECURE_NO_WARNINGS
_SCL_SECURE_NO_WARNINGS
_SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING

VS2019+PCL 1.12.0安装和配置教程_第25张图片
C/C++,所有选项,SDL检查,选择否
VS2019+PCL 1.12.0安装和配置教程_第26张图片
通用属性,链接器,输入,附加依赖项,添加PCL和VTK中的lib文件
VS2019+PCL 1.12.0安装和配置教程_第27张图片

win+r调出运行窗口,并输入cmd
输入:cd /d C:\Program Files\PCL 1.12.0\3rdParty\VTK\lib
输入:dir /b *.lib *>VTK_lib.txt
输入:cd /d C:\Program Files\PCL 1.12.0\lib
输入:dir /b *.lib *>PCL_lib.txt

VS2019+PCL 1.12.0安装和配置教程_第28张图片

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
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_lib.txt
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
//pkgconfig

vtkChartsCore-9.0.lib
vtkChartsCore-9.0d.lib
vtkCommonColor-9.0.lib
vtkCommonColor-9.0d.lib
vtkCommonComputationalGeometry-9.0.lib
vtkCommonComputationalGeometry-9.0d.lib
vtkCommonCore-9.0.lib
vtkCommonCore-9.0d.lib
vtkCommonDataModel-9.0.lib
vtkCommonDataModel-9.0d.lib
vtkCommonExecutionModel-9.0.lib
vtkCommonExecutionModel-9.0d.lib
vtkCommonMath-9.0.lib
vtkCommonMath-9.0d.lib
vtkCommonMisc-9.0.lib
vtkCommonMisc-9.0d.lib
vtkCommonSystem-9.0.lib
vtkCommonSystem-9.0d.lib
vtkCommonTransforms-9.0.lib
vtkCommonTransforms-9.0d.lib
vtkDICOMParser-9.0.lib
vtkDICOMParser-9.0d.lib
vtkDomainsChemistry-9.0.lib
vtkDomainsChemistry-9.0d.lib
vtkDomainsChemistryOpenGL2-9.0.lib
vtkDomainsChemistryOpenGL2-9.0d.lib
vtkdoubleconversion-9.0.lib
vtkdoubleconversion-9.0d.lib
vtkexodusII-9.0.lib
vtkexodusII-9.0d.lib
vtkexpat-9.0.lib
vtkexpat-9.0d.lib
vtkFiltersAMR-9.0.lib
vtkFiltersAMR-9.0d.lib
vtkFiltersCore-9.0.lib
vtkFiltersCore-9.0d.lib
vtkFiltersExtraction-9.0.lib
vtkFiltersExtraction-9.0d.lib
vtkFiltersFlowPaths-9.0.lib
vtkFiltersFlowPaths-9.0d.lib
vtkFiltersGeneral-9.0.lib
vtkFiltersGeneral-9.0d.lib
vtkFiltersGeneric-9.0.lib
vtkFiltersGeneric-9.0d.lib
vtkFiltersGeometry-9.0.lib
vtkFiltersGeometry-9.0d.lib
vtkFiltersHybrid-9.0.lib
vtkFiltersHybrid-9.0d.lib
vtkFiltersHyperTree-9.0.lib
vtkFiltersHyperTree-9.0d.lib
vtkFiltersImaging-9.0.lib
vtkFiltersImaging-9.0d.lib
vtkFiltersModeling-9.0.lib
vtkFiltersModeling-9.0d.lib
vtkFiltersParallel-9.0.lib
vtkFiltersParallel-9.0d.lib
vtkFiltersParallelImaging-9.0.lib
vtkFiltersParallelImaging-9.0d.lib
vtkFiltersPoints-9.0.lib
vtkFiltersPoints-9.0d.lib
vtkFiltersProgrammable-9.0.lib
vtkFiltersProgrammable-9.0d.lib
vtkFiltersSelection-9.0.lib
vtkFiltersSelection-9.0d.lib
vtkFiltersSMP-9.0.lib
vtkFiltersSMP-9.0d.lib
vtkFiltersSources-9.0.lib
vtkFiltersSources-9.0d.lib
vtkFiltersStatistics-9.0.lib
vtkFiltersStatistics-9.0d.lib
vtkFiltersTexture-9.0.lib
vtkFiltersTexture-9.0d.lib
vtkFiltersTopology-9.0.lib
vtkFiltersTopology-9.0d.lib
vtkFiltersVerdict-9.0.lib
vtkFiltersVerdict-9.0d.lib
vtkfreetype-9.0.lib
vtkfreetype-9.0d.lib
vtkGeovisCore-9.0.lib
vtkGeovisCore-9.0d.lib
vtkgl2ps-9.0.lib
vtkgl2ps-9.0d.lib
vtkglew-9.0.lib
vtkglew-9.0d.lib
vtkhdf5-9.0.lib
vtkhdf5-9.0d.lib
vtkhdf5_hl-9.0.lib
vtkhdf5_hl-9.0d.lib
vtkImagingColor-9.0.lib
vtkImagingColor-9.0d.lib
vtkImagingCore-9.0.lib
vtkImagingCore-9.0d.lib
vtkImagingFourier-9.0.lib
vtkImagingFourier-9.0d.lib
vtkImagingGeneral-9.0.lib
vtkImagingGeneral-9.0d.lib
vtkImagingHybrid-9.0.lib
vtkImagingHybrid-9.0d.lib
vtkImagingMath-9.0.lib
vtkImagingMath-9.0d.lib
vtkImagingMorphological-9.0.lib
vtkImagingMorphological-9.0d.lib
vtkImagingSources-9.0.lib
vtkImagingSources-9.0d.lib
vtkImagingStatistics-9.0.lib
vtkImagingStatistics-9.0d.lib
vtkImagingStencil-9.0.lib
vtkImagingStencil-9.0d.lib
vtkInfovisCore-9.0.lib
vtkInfovisCore-9.0d.lib
vtkInfovisLayout-9.0.lib
vtkInfovisLayout-9.0d.lib
vtkInteractionImage-9.0.lib
vtkInteractionImage-9.0d.lib
vtkInteractionStyle-9.0.lib
vtkInteractionStyle-9.0d.lib
vtkInteractionWidgets-9.0.lib
vtkInteractionWidgets-9.0d.lib
vtkIOAMR-9.0.lib
vtkIOAMR-9.0d.lib
vtkIOAsynchronous-9.0.lib
vtkIOAsynchronous-9.0d.lib
vtkIOCityGML-9.0.lib
vtkIOCityGML-9.0d.lib
vtkIOCore-9.0.lib
vtkIOCore-9.0d.lib
vtkIOEnSight-9.0.lib
vtkIOEnSight-9.0d.lib
vtkIOExodus-9.0.lib
vtkIOExodus-9.0d.lib
vtkIOExport-9.0.lib
vtkIOExport-9.0d.lib
vtkIOExportGL2PS-9.0.lib
vtkIOExportGL2PS-9.0d.lib
vtkIOExportPDF-9.0.lib
vtkIOExportPDF-9.0d.lib
vtkIOGeometry-9.0.lib
vtkIOGeometry-9.0d.lib
vtkIOImage-9.0.lib
vtkIOImage-9.0d.lib
vtkIOImport-9.0.lib
vtkIOImport-9.0d.lib
vtkIOInfovis-9.0.lib
vtkIOInfovis-9.0d.lib
vtkIOLegacy-9.0.lib
vtkIOLegacy-9.0d.lib
vtkIOLSDyna-9.0.lib
vtkIOLSDyna-9.0d.lib
vtkIOMINC-9.0.lib
vtkIOMINC-9.0d.lib
vtkIOMotionFX-9.0.lib
vtkIOMotionFX-9.0d.lib
vtkIOMovie-9.0.lib
vtkIOMovie-9.0d.lib
vtkIONetCDF-9.0.lib
vtkIONetCDF-9.0d.lib
vtkIOOggTheora-9.0.lib
vtkIOOggTheora-9.0d.lib
vtkIOParallel-9.0.lib
vtkIOParallel-9.0d.lib
vtkIOParallelXML-9.0.lib
vtkIOParallelXML-9.0d.lib
vtkIOPLY-9.0.lib
vtkIOPLY-9.0d.lib
vtkIOSegY-9.0.lib
vtkIOSegY-9.0d.lib
vtkIOSQL-9.0.lib
vtkIOSQL-9.0d.lib
vtkIOTecplotTable-9.0.lib
vtkIOTecplotTable-9.0d.lib
vtkIOVeraOut-9.0.lib
vtkIOVeraOut-9.0d.lib
vtkIOVideo-9.0.lib
vtkIOVideo-9.0d.lib
vtkIOXML-9.0.lib
vtkIOXML-9.0d.lib
vtkIOXMLParser-9.0.lib
vtkIOXMLParser-9.0d.lib
vtkjpeg-9.0.lib
vtkjpeg-9.0d.lib
vtkjsoncpp-9.0.lib
vtkjsoncpp-9.0d.lib
vtklibharu-9.0.lib
vtklibharu-9.0d.lib
vtklibproj-9.0.lib
vtklibproj-9.0d.lib
vtklibxml2-9.0.lib
vtklibxml2-9.0d.lib
vtkloguru-9.0.lib
vtkloguru-9.0d.lib
vtklz4-9.0.lib
vtklz4-9.0d.lib
vtklzma-9.0.lib
vtklzma-9.0d.lib
vtkmetaio-9.0.lib
vtkmetaio-9.0d.lib
vtknetcdf-9.0.lib
vtknetcdf-9.0d.lib
vtkogg-9.0.lib
vtkogg-9.0d.lib
vtkParallelCore-9.0.lib
vtkParallelCore-9.0d.lib
vtkParallelDIY-9.0.lib
vtkParallelDIY-9.0d.lib
vtkpng-9.0.lib
vtkpng-9.0d.lib
vtkpugixml-9.0.lib
vtkpugixml-9.0d.lib
vtkRenderingAnnotation-9.0.lib
vtkRenderingAnnotation-9.0d.lib
vtkRenderingContext2D-9.0.lib
vtkRenderingContext2D-9.0d.lib
vtkRenderingContextOpenGL2-9.0.lib
vtkRenderingContextOpenGL2-9.0d.lib
vtkRenderingCore-9.0.lib
vtkRenderingCore-9.0d.lib
vtkRenderingFreeType-9.0.lib
vtkRenderingFreeType-9.0d.lib
vtkRenderingGL2PSOpenGL2-9.0.lib
vtkRenderingGL2PSOpenGL2-9.0d.lib
vtkRenderingImage-9.0.lib
vtkRenderingImage-9.0d.lib
vtkRenderingLabel-9.0.lib
vtkRenderingLabel-9.0d.lib
vtkRenderingLOD-9.0.lib
vtkRenderingLOD-9.0d.lib
vtkRenderingOpenGL2-9.0.lib
vtkRenderingOpenGL2-9.0d.lib
vtkRenderingSceneGraph-9.0.lib
vtkRenderingSceneGraph-9.0d.lib
vtkRenderingUI-9.0.lib
vtkRenderingUI-9.0d.lib
vtkRenderingVolume-9.0.lib
vtkRenderingVolume-9.0d.lib
vtkRenderingVolumeOpenGL2-9.0.lib
vtkRenderingVolumeOpenGL2-9.0d.lib
vtkRenderingVtkJS-9.0.lib
vtkRenderingVtkJS-9.0d.lib
vtksqlite-9.0.lib
vtksqlite-9.0d.lib
vtksys-9.0.lib
vtksys-9.0d.lib
vtkTestingRendering-9.0.lib
vtkTestingRendering-9.0d.lib
vtktheora-9.0.lib
vtktheora-9.0d.lib
vtktiff-9.0.lib
vtktiff-9.0d.lib
vtkverdict-9.0.lib
vtkverdict-9.0d.lib
vtkViewsContext2D-9.0.lib
vtkViewsContext2D-9.0d.lib
vtkViewsCore-9.0.lib
vtkViewsCore-9.0d.lib
vtkViewsInfovis-9.0.lib
vtkViewsInfovis-9.0d.lib
vtkWrappingTools-9.0.lib
vtkWrappingTools-9.0d.lib
vtkzlib-9.0.lib
vtkzlib-9.0d.lib
//cmake
//vtk
vtkChartsCore-9.0.lib
vtkChartsCore-9.0d.lib
vtkCommonColor-9.0.lib
vtkCommonColor-9.0d.lib
vtkCommonComputationalGeometry-9.0.lib
vtkCommonComputationalGeometry-9.0d.lib
vtkCommonCore-9.0.lib
vtkCommonCore-9.0d.lib
vtkCommonDataModel-9.0.lib
vtkCommonDataModel-9.0d.lib
vtkCommonExecutionModel-9.0.lib
vtkCommonExecutionModel-9.0d.lib
vtkCommonMath-9.0.lib
vtkCommonMath-9.0d.lib
vtkCommonMisc-9.0.lib
vtkCommonMisc-9.0d.lib
vtkCommonSystem-9.0.lib
vtkCommonSystem-9.0d.lib
vtkCommonTransforms-9.0.lib
vtkCommonTransforms-9.0d.lib
vtkDICOMParser-9.0.lib
vtkDICOMParser-9.0d.lib
vtkDomainsChemistry-9.0.lib
vtkDomainsChemistry-9.0d.lib
vtkDomainsChemistryOpenGL2-9.0.lib
vtkDomainsChemistryOpenGL2-9.0d.lib
vtkdoubleconversion-9.0.lib
vtkdoubleconversion-9.0d.lib
vtkexodusII-9.0.lib
vtkexodusII-9.0d.lib
vtkexpat-9.0.lib
vtkexpat-9.0d.lib
vtkFiltersAMR-9.0.lib
vtkFiltersAMR-9.0d.lib
vtkFiltersCore-9.0.lib
vtkFiltersCore-9.0d.lib
vtkFiltersExtraction-9.0.lib
vtkFiltersExtraction-9.0d.lib
vtkFiltersFlowPaths-9.0.lib
vtkFiltersFlowPaths-9.0d.lib
vtkFiltersGeneral-9.0.lib
vtkFiltersGeneral-9.0d.lib
vtkFiltersGeneric-9.0.lib
vtkFiltersGeneric-9.0d.lib
vtkFiltersGeometry-9.0.lib
vtkFiltersGeometry-9.0d.lib
vtkFiltersHybrid-9.0.lib
vtkFiltersHybrid-9.0d.lib
vtkFiltersHyperTree-9.0.lib
vtkFiltersHyperTree-9.0d.lib
vtkFiltersImaging-9.0.lib
vtkFiltersImaging-9.0d.lib
vtkFiltersModeling-9.0.lib
vtkFiltersModeling-9.0d.lib
vtkFiltersParallel-9.0.lib
vtkFiltersParallel-9.0d.lib
vtkFiltersParallelImaging-9.0.lib
vtkFiltersParallelImaging-9.0d.lib
vtkFiltersPoints-9.0.lib
vtkFiltersPoints-9.0d.lib
vtkFiltersProgrammable-9.0.lib
vtkFiltersProgrammable-9.0d.lib
vtkFiltersSelection-9.0.lib
vtkFiltersSelection-9.0d.lib
vtkFiltersSMP-9.0.lib
vtkFiltersSMP-9.0d.lib
vtkFiltersSources-9.0.lib
vtkFiltersSources-9.0d.lib
vtkFiltersStatistics-9.0.lib
vtkFiltersStatistics-9.0d.lib
vtkFiltersTexture-9.0.lib
vtkFiltersTexture-9.0d.lib
vtkFiltersTopology-9.0.lib
vtkFiltersTopology-9.0d.lib
vtkFiltersVerdict-9.0.lib
vtkFiltersVerdict-9.0d.lib
vtkfreetype-9.0.lib
vtkfreetype-9.0d.lib
vtkGeovisCore-9.0.lib
vtkGeovisCore-9.0d.lib
vtkgl2ps-9.0.lib
vtkgl2ps-9.0d.lib
vtkglew-9.0.lib
vtkglew-9.0d.lib
vtkhdf5-9.0.lib
vtkhdf5-9.0d.lib
vtkhdf5_hl-9.0.lib
vtkhdf5_hl-9.0d.lib
vtkImagingColor-9.0.lib
vtkImagingColor-9.0d.lib
vtkImagingCore-9.0.lib
vtkImagingCore-9.0d.lib
vtkImagingFourier-9.0.lib
vtkImagingFourier-9.0d.lib
vtkImagingGeneral-9.0.lib
vtkImagingGeneral-9.0d.lib
vtkImagingHybrid-9.0.lib
vtkImagingHybrid-9.0d.lib
vtkImagingMath-9.0.lib
vtkImagingMath-9.0d.lib
vtkImagingMorphological-9.0.lib
vtkImagingMorphological-9.0d.lib
vtkImagingSources-9.0.lib
vtkImagingSources-9.0d.lib
vtkImagingStatistics-9.0.lib
vtkImagingStatistics-9.0d.lib
vtkImagingStencil-9.0.lib
vtkImagingStencil-9.0d.lib
vtkInfovisCore-9.0.lib
vtkInfovisCore-9.0d.lib
vtkInfovisLayout-9.0.lib
vtkInfovisLayout-9.0d.lib
vtkInteractionImage-9.0.lib
vtkInteractionImage-9.0d.lib
vtkInteractionStyle-9.0.lib
vtkInteractionStyle-9.0d.lib
vtkInteractionWidgets-9.0.lib
vtkInteractionWidgets-9.0d.lib
vtkIOAMR-9.0.lib
vtkIOAMR-9.0d.lib
vtkIOAsynchronous-9.0.lib
vtkIOAsynchronous-9.0d.lib
vtkIOCityGML-9.0.lib
vtkIOCityGML-9.0d.lib
vtkIOCore-9.0.lib
vtkIOCore-9.0d.lib
vtkIOEnSight-9.0.lib
vtkIOEnSight-9.0d.lib
vtkIOExodus-9.0.lib
vtkIOExodus-9.0d.lib
vtkIOExport-9.0.lib
vtkIOExport-9.0d.lib
vtkIOExportGL2PS-9.0.lib
vtkIOExportGL2PS-9.0d.lib
vtkIOExportPDF-9.0.lib
vtkIOExportPDF-9.0d.lib
vtkIOGeometry-9.0.lib
vtkIOGeometry-9.0d.lib
vtkIOImage-9.0.lib
vtkIOImage-9.0d.lib
vtkIOImport-9.0.lib
vtkIOImport-9.0d.lib
vtkIOInfovis-9.0.lib
vtkIOInfovis-9.0d.lib
vtkIOLegacy-9.0.lib
vtkIOLegacy-9.0d.lib
vtkIOLSDyna-9.0.lib
vtkIOLSDyna-9.0d.lib
vtkIOMINC-9.0.lib
vtkIOMINC-9.0d.lib
vtkIOMotionFX-9.0.lib
vtkIOMotionFX-9.0d.lib
vtkIOMovie-9.0.lib
vtkIOMovie-9.0d.lib
vtkIONetCDF-9.0.lib
vtkIONetCDF-9.0d.lib
vtkIOOggTheora-9.0.lib
vtkIOOggTheora-9.0d.lib
vtkIOParallel-9.0.lib
vtkIOParallel-9.0d.lib
vtkIOParallelXML-9.0.lib
vtkIOParallelXML-9.0d.lib
vtkIOPLY-9.0.lib
vtkIOPLY-9.0d.lib
vtkIOSegY-9.0.lib
vtkIOSegY-9.0d.lib
vtkIOSQL-9.0.lib
vtkIOSQL-9.0d.lib
vtkIOTecplotTable-9.0.lib
vtkIOTecplotTable-9.0d.lib
vtkIOVeraOut-9.0.lib
vtkIOVeraOut-9.0d.lib
vtkIOVideo-9.0.lib
vtkIOVideo-9.0d.lib
vtkIOXML-9.0.lib
vtkIOXML-9.0d.lib
vtkIOXMLParser-9.0.lib
vtkIOXMLParser-9.0d.lib
vtkjpeg-9.0.lib
vtkjpeg-9.0d.lib
vtkjsoncpp-9.0.lib
vtkjsoncpp-9.0d.lib
vtklibharu-9.0.lib
vtklibharu-9.0d.lib
vtklibproj-9.0.lib
vtklibproj-9.0d.lib
vtklibxml2-9.0.lib
vtklibxml2-9.0d.lib
vtkloguru-9.0.lib
vtkloguru-9.0d.lib
vtklz4-9.0.lib
vtklz4-9.0d.lib
vtklzma-9.0.lib
vtklzma-9.0d.lib
vtkmetaio-9.0.lib
vtkmetaio-9.0d.lib
vtknetcdf-9.0.lib
vtknetcdf-9.0d.lib
vtkogg-9.0.lib
vtkogg-9.0d.lib
vtkParallelCore-9.0.lib
vtkParallelCore-9.0d.lib
vtkParallelDIY-9.0.lib
vtkParallelDIY-9.0d.lib
vtkpng-9.0.lib
vtkpng-9.0d.lib
vtkpugixml-9.0.lib
vtkpugixml-9.0d.lib
vtkRenderingAnnotation-9.0.lib
vtkRenderingAnnotation-9.0d.lib
vtkRenderingContext2D-9.0.lib
vtkRenderingContext2D-9.0d.lib
vtkRenderingContextOpenGL2-9.0.lib
vtkRenderingContextOpenGL2-9.0d.lib
vtkRenderingCore-9.0.lib
vtkRenderingCore-9.0d.lib
vtkRenderingFreeType-9.0.lib
vtkRenderingFreeType-9.0d.lib
vtkRenderingGL2PSOpenGL2-9.0.lib
vtkRenderingGL2PSOpenGL2-9.0d.lib
vtkRenderingImage-9.0.lib
vtkRenderingImage-9.0d.lib
vtkRenderingLabel-9.0.lib
vtkRenderingLabel-9.0d.lib
vtkRenderingLOD-9.0.lib
vtkRenderingLOD-9.0d.lib
vtkRenderingOpenGL2-9.0.lib
vtkRenderingOpenGL2-9.0d.lib
vtkRenderingSceneGraph-9.0.lib
vtkRenderingSceneGraph-9.0d.lib
vtkRenderingUI-9.0.lib
vtkRenderingUI-9.0d.lib
vtkRenderingVolume-9.0.lib
vtkRenderingVolume-9.0d.lib
vtkRenderingVolumeOpenGL2-9.0.lib
vtkRenderingVolumeOpenGL2-9.0d.lib
vtkRenderingVtkJS-9.0.lib
vtkRenderingVtkJS-9.0d.lib
vtksqlite-9.0.lib
vtksqlite-9.0d.lib
vtksys-9.0.lib
vtksys-9.0d.lib
vtkTestingRendering-9.0.lib
vtkTestingRendering-9.0d.lib
vtktheora-9.0.lib
vtktheora-9.0d.lib
vtktiff-9.0.lib
vtktiff-9.0d.lib
vtkverdict-9.0.lib
vtkverdict-9.0d.lib
vtkViewsContext2D-9.0.lib
vtkViewsContext2D-9.0d.lib
vtkViewsCore-9.0.lib
vtkViewsCore-9.0d.lib
vtkViewsInfovis-9.0.lib
vtkViewsInfovis-9.0d.lib
vtkWrappingTools-9.0.lib
vtkWrappingTools-9.0d.lib
vtkzlib-9.0.lib
vtkzlib-9.0d.lib
//VTK_lib.txt

#include 
#include 
#include  
#include 
using namespace std;

int main()
{
	ifstream txtfile;//打开读取的文件
	ofstream txt01;//保存的文件
	ofstream txt02;//保存的文件
	string temp;
	int index = 0;//用于判断奇偶

	txtfile.open("PCL_lib.txt", ios::in);

	while (!txtfile.eof())            // 若未到文件结束一直循环
	{

		getline(txtfile, temp);//一行一行读取
		if (index % 2 == 0)//判断除以2的余数,即为奇偶的判断
		{
			txt01.open("PCL_lib1.txt", ios::app);
			txt01 << temp;
			txt01 << endl;
			txt01.close();
		}
		else
		{
			txt02.open("PCL_lib2.txt", ios::app);
			txt02 << temp;
			txt02 << endl;
			txt02.close();
		}
		index++;
	}
	txtfile.close();   //关闭文件
	txtfile.close();
	txt01.close();
	txt02.close();

	return 0;
}


#include 
#include //标准C++库中的输入输出类相关头文件。
#include 
#include //pcd 读写类相关的头文件。
#include 
#include  //PCL中支持的点类型头文件。
#include  
#include   
#include  

using namespace std;

int main()
{
	typedef struct tagPOINT_3D
	{
		double x;  //mm world coordinate x  
		double y;  //mm world coordinate y  
		double z;  //mm world coordinate z  
		double r;
	}POINT_WORLD;


	// 加载txt数据
	int number_Txt;
	FILE* fp_txt;
	tagPOINT_3D TxtPoint;
	vector<tagPOINT_3D> m_vTxtPoints;
	fp_txt = fopen("za.txt", "r");
	if (fp_txt)
	{
		while (fscanf(fp_txt, "%lf %lf %lf", &TxtPoint.x, &TxtPoint.y, &TxtPoint.z) != EOF)
		{
			m_vTxtPoints.push_back(TxtPoint);
		}
	}
	else
		cout << "txt数据加载失败!" << endl;
	number_Txt = m_vTxtPoints.size();
	//pcl::PointCloud cloud;
	//这里使用“PointXYZ”是因为我后面给的点云信息是包含的三维坐标,同时还有点云信息包含的rgb颜色信息的或者还有包含rgba颜色和强度信息。
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	// Fill in the cloud data  
	cloud->width = number_Txt;
	cloud->height = 1;
	cloud->is_dense = false;
	cloud->points.resize(cloud->width * cloud->height);
	for (size_t i = 0; i < cloud->points.size(); ++i)
	{
		cloud->points[i].x = m_vTxtPoints[i].x;
		cloud->points[i].y = m_vTxtPoints[i].y;
		cloud->points[i].z = m_vTxtPoints[i].z;
	}
	pcl::io::savePCDFileASCII("txt2pcd_bunny1.pcd", *cloud);
	std::cerr << "Saved " << cloud->points.size() << " data points to txt2pcd.pcd." << std::endl;

	//for (size_t i = 0; i < cloud.points.size(); ++i)
	//  std::cerr << "    " << cloud.points[i].x << " " << cloud.points[i].y << " " << cloud.points[i].z << std::endl;

	//PCL Visualizer
	// Viewer  
	pcl::visualization::PCLVisualizer viewer("Cloud Viewer");
	viewer.addPointCloud(cloud);
	viewer.setBackgroundColor(0, 0, 0);

	viewer.spin();
	system("pause");
	return 0;

}

-3.03387	-3.03879	-2.05533
-3.03776	-3.03882	-2.05536
-3.04165	-3.03886	-2.05538
-3.04554	-3.0389	-2.05541
-3.04943	-3.03894	-2.05543
-3.05332	-3.03897	-2.05546
-3.05721	-3.03901	-2.05548
-3.0611	-3.03905	-2.05551
-3.06499	-3.03908	-2.05553
-3.06888	-3.03912	-2.05556
-3.07277	-3.03916	-2.05558
-3.07666	-3.03919	-2.05561
-3.08055	-3.03923	-2.05563
-3.08444	-3.03927	-2.05566
-3.08833	-3.03931	-2.05568
-3.09222	-3.03934	-2.05571
-3.09612	-3.03938	-2.05573
-3.10001	-3.03942	-2.05576
-3.1039	-3.03945	-2.05578
-3.10779	-3.03949	-2.05581
-3.11168	-3.03953	-2.05583
-3.11557	-3.03956	-2.05586
-3.11947	-3.0396	-2.05588
-3.12336	-3.03964	-2.05591
-3.12725	-3.03968	-2.05593
-3.13114	-3.03971	-2.05596
-3.13503	-3.03975	-2.05598
-3.13893	-3.03979	-2.05601
-3.14282	-3.03982	-2.05603
-3.14671	-3.03986	-2.05606
-3.1506	-3.0399	-2.05608
-3.1545	-3.03993	-2.05611
-3.15839	-3.03997	-2.05613
-3.16228	-3.04001	-2.05616
-3.16618	-3.04005	-2.05618
-3.17007	-3.04008	-2.05621
-3.17396	-3.04012	-2.05623
-3.17786	-3.04016	-2.05626
-3.18175	-3.04019	-2.05628
-3.18564	-3.04023	-2.05631
-3.18954	-3.04027	-2.05633
-3.19343	-3.0403	-2.05636
-3.19732	-3.04034	-2.05638
-3.20122	-3.04038	-2.05641
-3.20511	-3.04042	-2.05643
-3.20901	-3.04045	-2.05646
-3.2129	-3.04049	-2.05648
-3.21679	-3.04053	-2.05651
-3.22069	-3.04056	-2.05653
-3.22458	-3.0406	-2.05656
-3.22848	-3.04064	-2.05658
-3.23237	-3.04068	-2.05661
-3.23627	-3.04071	-2.05663
-3.24016	-3.04075	-2.05666
-3.24406	-3.04079	-2.05668
-3.24795	-3.04082	-2.05671
-3.25185	-3.04086	-2.05673
-3.25574	-3.0409	-2.05676
-3.25964	-3.04093	-2.05678
-3.26353	-3.04097	-2.05681
-3.26743	-3.04101	-2.05683
-3.27132	-3.04105	-2.05686
-3.27522	-3.04108	-2.05688
-3.27912	-3.04112	-2.05691
-3.28301	-3.04116	-2.05693
-3.28691	-3.04119	-2.05696
-3.2908	-3.04123	-2.05698
-3.2947	-3.04127	-2.05701
-3.2986	-3.0413	-2.05703
-3.30249	-3.04134	-2.05706
-3.30639	-3.04138	-2.05708
-3.31029	-3.04142	-2.05711
-3.31418	-3.04145	-2.05713
-3.31808	-3.04149	-2.05716
-3.32198	-3.04153	-2.05718
-3.32587	-3.04156	-2.05721
-3.32977	-3.0416	-2.05723
-3.33367	-3.04164	-2.05726
-3.33756	-3.04168	-2.05728
-3.34146	-3.04171	-2.05731
-3.34536	-3.04175	-2.05733
-3.34926	-3.04179	-2.05736
-3.35315	-3.04182	-2.05738
-3.35705	-3.04186	-2.05741
-3.36095	-3.0419	-2.05743
-3.36485	-3.04193	-2.05746
-3.36874	-3.04197	-2.05748
-3.37264	-3.04201	-2.05751
-3.37654	-3.04205	-2.05753
-3.38044	-3.04208	-2.05756
-3.38434	-3.04212	-2.05758
-3.38824	-3.04216	-2.05761
-3.39213	-3.04219	-2.05764

VS2019+PCL 1.12.0安装和配置教程_第29张图片
VS2019+PCL 1.12.0安装和配置教程_第30张图片

你可能感兴趣的:(c++)