win10 VS2019点云库PCL1.12.0安装
苦瓜王子 人气:0PCL简介:点云库全称是Point Cloud Library(PCL),是一个独立的、大规模的、开放的2D/3D图像和点云处理项目。PCL根据BSD许可条款发布的,是可以免费用于商用和研究使用。
PCL相关网站:
项目开发需要用到PCL,下面记录一下我的PCL安装和配置过程。
1. 版本信息
win10系统
PCL:我安装的是PCL 1.12.0,需要下载两个文件:
VS2019社区版
2. 安装教程
step1:
直接运行PCL-1.12.0-rc1-AllInOne-msvc2019-win64.exe,常规的安装过程不赘述。
注意:1、添加PCL到系统PATH。2、建议安装到非系统盘。3、安装路径全英文。
step2:
安装完成后,将pcl-1.12.0-rc1-pdb-msvc2019-win64.zip解压,将.pdb文件拷贝到pcl\bin目录下。
至此PCL的安装就完成了。
3. 环境变量设置
在系统环境变量中添加
我的PCL安装路径是D:\Program Files\PCL 1.12.0
所以我需要添加的环境变量是:
D:\Program Files\PCL 1.12.0\bin
D:\Program Files\PCL 1.12.0\3rdParty\FLANN\bin
D:\Program Files\PCL 1.12.0\3rdParty\Qhull\bin
D:\Program Files\PCL 1.12.0\3rdParty\VTK\bin
D:\Program Files\PCL 1.12.0\3rdParty\Boost\lib
C:\Program Files\OpenNI2\Redist(因为我的OpenNI2装在别的地方了)
4. VS中PCL的配置
step1:
VS中新建一个C++控制台程序,一点基操,如果项目正在开发就用旧的项目。右击解决方案,点击属性,或者从工具栏的视图-属性页进入。
选择此项目的配置:Debug还是Release,活动平台要选x64。这一点决定了后面导入依赖项的种类。
step2:
添加包含目录:VC++目录 -> 包含目录 -> 点击右列,出现一个下拉列表,点击后出现编辑,点击进入。
包含目录:
你的PCL安装路径\PCL 1.XX.XX\3rdPart\Boost\include\boost-1_76
D:\Program Files\PCL 1.12.0-rc1\3rdParty\Eigen\eigen3
D:\Program Files\PCL 1.12.0-rc1\3rdParty\FLANN\include
D:\Program Files\PCL 1.12.0-rc1\3rdParty\OpenNI2\Include(这一个需要看OpenNI2装的位置)
D:\Program Files\PCL 1.12.0-rc1\3rdParty\VTK\include\vtk-9.0
D:\Program Files\PCL 1.12.0-rc1\3rdParty\Qhull\include
D:\Program Files\PCL 1.12.0-rc1\include\pcl-1.12
step3:
添加库目录:步骤同step2
库目录:
D:\Program Files\PCL 1.12.0-rc1\3rdParty\Boost\lib
D:\Program Files\PCL 1.12.0-rc1\3rdParty\FLANN\lib
D:\Program Files\PCL 1.12.0-rc1\3rdParty\OpenNI2\Lib(这一个需要看OpenNI2装的位置)
D:\Program Files\PCL 1.12.0-rc1\3rdParty\Qhull\lib
D:\Program Files\PCL 1.12.0-rc1\3rdParty\VTK\lib
D:\Program Files\PCL 1.12.0-rc1\lib
step4:
添加依赖项:这一步比较繁琐,需要耐心和一定的时间。
附加的依赖项是step3各个库目录中的.lib文件,debug模式为XXXgdXXX.lib,release模式就是除了XXXgdXXX.lib的那一堆.lib文件,因为文件数很多,建议用bat文件批量获得各个库目录下的.lib文件名。
参考其他博主的方法:VS中PCL库附加依赖项配置
@echo off
for %%I in (*.lib) do echo %%I>>all.txt
for %%I in (*d.lib) do echo %%I>>adebug.txt
for %%I in (*9.0.lib) do echo %%I>>arelease.txt
pause
根据不同库目录下的.lib文件名,修改下图中画红框的部分,就能快速得到需要的.lib文件。
将各个库目录下的对应debug或者release版本的.lib文件名添加到依赖项列表中,即可完成配置。
可以将下列的lib文件名先复制到文本文件中,再粘贴至VS中。
PCL1.12.0 debug版本.lib文件名列表(直接复制到库目录下即可)
pcl_commond.lib
pcl_featuresd.lib
pcl_filtersd.lib
pcl_iod.lib
pcl_io_plyd.lib
pcl_kdtreed.lib
pcl_keypointsd.lib
pcl_mld.lib
pcl_octreed.lib
pcl_outofcored.lib
pcl_peopled.lib
pcl_recognitiond.lib
pcl_registrationd.lib
pcl_sample_consensusd.lib
pcl_searchd.lib
pcl_segmentationd.lib
pcl_stereod.lib
pcl_surfaced.lib
pcl_trackingd.lib
pcl_visualizationd.liblibboost_atomic-vc142-mt-gd-x64-1_76.lib
libboost_bzip2-vc142-mt-gd-x64-1_76.lib
libboost_chrono-vc142-mt-gd-x64-1_76.lib
libboost_container-vc142-mt-gd-x64-1_76.lib
libboost_context-vc142-mt-gd-x64-1_76.lib
libboost_contract-vc142-mt-gd-x64-1_76.lib
libboost_coroutine-vc142-mt-gd-x64-1_76.lib
libboost_date_time-vc142-mt-gd-x64-1_76.lib
libboost_exception-vc142-mt-gd-x64-1_76.lib
libboost_fiber-vc142-mt-gd-x64-1_76.lib
libboost_filesystem-vc142-mt-gd-x64-1_76.lib
libboost_graph-vc142-mt-gd-x64-1_76.lib
libboost_graph_parallel-vc142-mt-gd-x64-1_76.lib
libboost_iostreams-vc142-mt-gd-x64-1_76.lib
libboost_json-vc142-mt-gd-x64-1_76.lib
libboost_locale-vc142-mt-gd-x64-1_76.lib
libboost_log-vc142-mt-gd-x64-1_76.lib
libboost_log_setup-vc142-mt-gd-x64-1_76.lib
libboost_math_c99-vc142-mt-gd-x64-1_76.lib
libboost_math_c99f-vc142-mt-gd-x64-1_76.lib
libboost_math_c99l-vc142-mt-gd-x64-1_76.lib
libboost_math_tr1-vc142-mt-gd-x64-1_76.lib
libboost_math_tr1f-vc142-mt-gd-x64-1_76.lib
libboost_math_tr1l-vc142-mt-gd-x64-1_76.lib
libboost_mpi-vc142-mt-gd-x64-1_76.lib
libboost_nowide-vc142-mt-gd-x64-1_76.lib
libboost_numpy38-vc142-mt-gd-x64-1_76.lib
libboost_prg_exec_monitor-vc142-mt-gd-x64-1_76.lib
libboost_program_options-vc142-mt-gd-x64-1_76.lib
libboost_python38-vc142-mt-gd-x64-1_76.lib
libboost_random-vc142-mt-gd-x64-1_76.lib
libboost_regex-vc142-mt-gd-x64-1_76.lib
libboost_serialization-vc142-mt-gd-x64-1_76.lib
libboost_stacktrace_noop-vc142-mt-gd-x64-1_76.lib
libboost_stacktrace_windbg-vc142-mt-gd-x64-1_76.lib
libboost_stacktrace_windbg_cached-vc142-mt-gd-x64-1_76.lib
libboost_system-vc142-mt-gd-x64-1_76.lib
libboost_test_exec_monitor-vc142-mt-gd-x64-1_76.lib
libboost_thread-vc142-mt-gd-x64-1_76.lib
libboost_timer-vc142-mt-gd-x64-1_76.lib
libboost_type_erasure-vc142-mt-gd-x64-1_76.lib
libboost_unit_test_framework-vc142-mt-gd-x64-1_76.lib
libboost_wave-vc142-mt-gd-x64-1_76.lib
libboost_wserialization-vc142-mt-gd-x64-1_76.lib
libboost_zlib-vc142-mt-gd-x64-1_76.lib
flann-gd.lib
flann_cpp-gd.lib
flann_cpp_s-gd.lib
flann_s-gd.lib
OpenNI2.libqhullcpp_d.lib
qhullstatic_d.lib
qhullstatic_rd.lib
qhull_rd.lib
vtkChartsCore-9.0d.lib
vtkCommonColor-9.0d.lib
vtkCommonComputationalGeometry-9.0d.lib
vtkCommonCore-9.0d.lib
vtkCommonDataModel-9.0d.lib
vtkCommonExecutionModel-9.0d.lib
vtkCommonMath-9.0d.lib
vtkCommonMisc-9.0d.lib
vtkCommonSystem-9.0d.lib
vtkCommonTransforms-9.0d.lib
vtkDICOMParser-9.0d.lib
vtkDomainsChemistry-9.0d.lib
vtkDomainsChemistryOpenGL2-9.0d.lib
vtkdoubleconversion-9.0d.lib
vtkexodusII-9.0d.lib
vtkexpat-9.0d.lib
vtkFiltersAMR-9.0d.lib
vtkFiltersCore-9.0d.lib
vtkFiltersExtraction-9.0d.lib
vtkFiltersFlowPaths-9.0d.lib
vtkFiltersGeneral-9.0d.lib
vtkFiltersGeneric-9.0d.lib
vtkFiltersGeometry-9.0d.lib
vtkFiltersHybrid-9.0d.lib
vtkFiltersHyperTree-9.0d.lib
vtkFiltersImaging-9.0d.lib
vtkFiltersModeling-9.0d.lib
vtkFiltersParallel-9.0d.lib
vtkFiltersParallelImaging-9.0d.lib
vtkFiltersPoints-9.0d.lib
vtkFiltersProgrammable-9.0d.lib
vtkFiltersSelection-9.0d.lib
vtkFiltersSMP-9.0d.lib
vtkFiltersSources-9.0d.lib
vtkFiltersStatistics-9.0d.lib
vtkFiltersTexture-9.0d.lib
vtkFiltersTopology-9.0d.lib
vtkFiltersVerdict-9.0d.lib
vtkfreetype-9.0d.lib
vtkGeovisCore-9.0d.lib
vtkgl2ps-9.0d.lib
vtkglew-9.0d.lib
vtkhdf5-9.0d.lib
vtkhdf5_hl-9.0d.lib
vtkImagingColor-9.0d.lib
vtkImagingCore-9.0d.lib
vtkImagingFourier-9.0d.lib
vtkImagingGeneral-9.0d.lib
vtkImagingHybrid-9.0d.lib
vtkImagingMath-9.0d.lib
vtkImagingMorphological-9.0d.lib
vtkImagingSources-9.0d.lib
vtkImagingStatistics-9.0d.lib
vtkImagingStencil-9.0d.lib
vtkInfovisCore-9.0d.lib
vtkInfovisLayout-9.0d.lib
vtkInteractionImage-9.0d.lib
vtkInteractionStyle-9.0d.lib
vtkInteractionWidgets-9.0d.lib
vtkIOAMR-9.0d.lib
vtkIOAsynchronous-9.0d.lib
vtkIOCityGML-9.0d.lib
vtkIOCore-9.0d.lib
vtkIOEnSight-9.0d.lib
vtkIOExodus-9.0d.lib
vtkIOExport-9.0d.lib
vtkIOExportGL2PS-9.0d.lib
vtkIOExportPDF-9.0d.lib
vtkIOGeometry-9.0d.lib
vtkIOImage-9.0d.lib
vtkIOImport-9.0d.lib
vtkIOInfovis-9.0d.lib
vtkIOLegacy-9.0d.lib
vtkIOLSDyna-9.0d.lib
vtkIOMINC-9.0d.lib
vtkIOMotionFX-9.0d.lib
vtkIOMovie-9.0d.lib
vtkIONetCDF-9.0d.lib
vtkIOOggTheora-9.0d.lib
vtkIOParallel-9.0d.lib
vtkIOParallelXML-9.0d.lib
vtkIOPLY-9.0d.lib
vtkIOSegY-9.0d.lib
vtkIOSQL-9.0d.lib
vtkIOTecplotTable-9.0d.lib
vtkIOVeraOut-9.0d.lib
vtkIOVideo-9.0d.lib
vtkIOXML-9.0d.lib
vtkIOXMLParser-9.0d.lib
vtkjpeg-9.0d.lib
vtkjsoncpp-9.0d.lib
vtklibharu-9.0d.lib
vtklibproj-9.0d.lib
vtklibxml2-9.0d.lib
vtkloguru-9.0d.lib
vtklz4-9.0d.lib
vtklzma-9.0d.lib
vtkmetaio-9.0d.lib
vtknetcdf-9.0d.lib
vtkogg-9.0d.lib
vtkParallelCore-9.0d.lib
vtkParallelDIY-9.0d.lib
vtkpng-9.0d.lib
vtkpugixml-9.0d.lib
vtkRenderingAnnotation-9.0d.lib
vtkRenderingContext2D-9.0d.lib
vtkRenderingContextOpenGL2-9.0d.lib
vtkRenderingCore-9.0d.lib
vtkRenderingFreeType-9.0d.lib
vtkRenderingGL2PSOpenGL2-9.0d.lib
vtkRenderingImage-9.0d.lib
vtkRenderingLabel-9.0d.lib
vtkRenderingLOD-9.0d.lib
vtkRenderingOpenGL2-9.0d.lib
vtkRenderingSceneGraph-9.0d.lib
vtkRenderingUI-9.0d.lib
vtkRenderingVolume-9.0d.lib
vtkRenderingVolumeOpenGL2-9.0d.lib
vtkRenderingVtkJS-9.0d.lib
vtksqlite-9.0d.lib
vtksys-9.0d.lib
vtkTestingRendering-9.0d.lib
vtktheora-9.0d.lib
vtktiff-9.0d.lib
vtkverdict-9.0d.lib
vtkViewsContext2D-9.0d.lib
vtkViewsCore-9.0d.lib
vtkViewsInfovis-9.0d.lib
vtkWrappingTools-9.0d.lib
vtkzlib-9.0d.lib
PCL1.12.0 release版本.lib文件名列表(直接复制到库目录下即可)
pcl_common.lib
pcl_features.lib
pcl_filters.lib
pcl_io.lib
pcl_io_ply.lib
pcl_kdtree.lib
pcl_keypoints.lib
pcl_ml.lib
pcl_octree.lib
pcl_outofcore.lib
pcl_people.lib
pcl_recognition.lib
pcl_registration.lib
pcl_sample_consensus.lib
pcl_search.lib
pcl_segmentation.lib
pcl_stereo.lib
pcl_surface.lib
pcl_tracking.lib
pcl_visualization.liblibboost_atomic-vc142-mt-x64-1_76.lib
libboost_bzip2-vc142-mt-x64-1_76.lib
libboost_chrono-vc142-mt-x64-1_76.lib
libboost_container-vc142-mt-x64-1_76.lib
libboost_context-vc142-mt-x64-1_76.lib
libboost_contract-vc142-mt-x64-1_76.lib
libboost_coroutine-vc142-mt-x64-1_76.lib
libboost_date_time-vc142-mt-x64-1_76.lib
libboost_exception-vc142-mt-x64-1_76.lib
libboost_fiber-vc142-mt-x64-1_76.lib
libboost_filesystem-vc142-mt-x64-1_76.lib
libboost_graph-vc142-mt-x64-1_76.lib
libboost_graph_parallel-vc142-mt-x64-1_76.lib
libboost_iostreams-vc142-mt-x64-1_76.lib
libboost_json-vc142-mt-x64-1_76.lib
libboost_locale-vc142-mt-x64-1_76.lib
libboost_log-vc142-mt-x64-1_76.lib
libboost_log_setup-vc142-mt-x64-1_76.lib
libboost_math_c99-vc142-mt-x64-1_76.lib
libboost_math_c99f-vc142-mt-x64-1_76.lib
libboost_math_c99l-vc142-mt-x64-1_76.lib
libboost_math_tr1-vc142-mt-x64-1_76.lib
libboost_math_tr1f-vc142-mt-x64-1_76.lib
libboost_math_tr1l-vc142-mt-x64-1_76.lib
libboost_mpi-vc142-mt-x64-1_76.lib
libboost_nowide-vc142-mt-x64-1_76.lib
libboost_numpy38-vc142-mt-x64-1_76.lib
libboost_prg_exec_monitor-vc142-mt-x64-1_76.lib
libboost_program_options-vc142-mt-x64-1_76.lib
libboost_python38-vc142-mt-x64-1_76.lib
libboost_random-vc142-mt-x64-1_76.lib
libboost_regex-vc142-mt-x64-1_76.lib
libboost_serialization-vc142-mt-x64-1_76.lib
libboost_stacktrace_noop-vc142-mt-x64-1_76.lib
libboost_stacktrace_windbg-vc142-mt-x64-1_76.lib
libboost_stacktrace_windbg_cached-vc142-mt-x64-1_76.lib
libboost_system-vc142-mt-x64-1_76.lib
libboost_test_exec_monitor-vc142-mt-x64-1_76.lib
libboost_thread-vc142-mt-x64-1_76.lib
libboost_timer-vc142-mt-x64-1_76.lib
libboost_type_erasure-vc142-mt-x64-1_76.lib
libboost_unit_test_framework-vc142-mt-x64-1_76.lib
libboost_wave-vc142-mt-x64-1_76.lib
libboost_wserialization-vc142-mt-x64-1_76.lib
libboost_zlib-vc142-mt-x64-1_76.lib
flann.lib
flann_cpp.lib
flann_cpp_s.lib
flann_s.libOpenNI2.lib
qhullcpp.lib
qhullstatic.lib
qhullstatic_r.lib
qhull_r.lib
vtkChartsCore-9.0.lib
vtkCommonColor-9.0.lib
vtkCommonComputationalGeometry-9.0.lib
vtkCommonCore-9.0.lib
vtkCommonDataModel-9.0.lib
vtkCommonExecutionModel-9.0.lib
vtkCommonMath-9.0.lib
vtkCommonMisc-9.0.lib
vtkCommonSystem-9.0.lib
vtkCommonTransforms-9.0.lib
vtkDICOMParser-9.0.lib
vtkDomainsChemistry-9.0.lib
vtkDomainsChemistryOpenGL2-9.0.lib
vtkdoubleconversion-9.0.lib
vtkexodusII-9.0.lib
vtkexpat-9.0.lib
vtkFiltersAMR-9.0.lib
vtkFiltersCore-9.0.lib
vtkFiltersExtraction-9.0.lib
vtkFiltersFlowPaths-9.0.lib
vtkFiltersGeneral-9.0.lib
vtkFiltersGeneric-9.0.lib
vtkFiltersGeometry-9.0.lib
vtkFiltersHybrid-9.0.lib
vtkFiltersHyperTree-9.0.lib
vtkFiltersImaging-9.0.lib
vtkFiltersModeling-9.0.lib
vtkFiltersParallel-9.0.lib
vtkFiltersParallelImaging-9.0.lib
vtkFiltersPoints-9.0.lib
vtkFiltersProgrammable-9.0.lib
vtkFiltersSelection-9.0.lib
vtkFiltersSMP-9.0.lib
vtkFiltersSources-9.0.lib
vtkFiltersStatistics-9.0.lib
vtkFiltersTexture-9.0.lib
vtkFiltersTopology-9.0.lib
vtkFiltersVerdict-9.0.lib
vtkfreetype-9.0.lib
vtkGeovisCore-9.0.lib
vtkgl2ps-9.0.lib
vtkglew-9.0.lib
vtkhdf5-9.0.lib
vtkhdf5_hl-9.0.lib
vtkImagingColor-9.0.lib
vtkImagingCore-9.0.lib
vtkImagingFourier-9.0.lib
vtkImagingGeneral-9.0.lib
vtkImagingHybrid-9.0.lib
vtkImagingMath-9.0.lib
vtkImagingMorphological-9.0.lib
vtkImagingSources-9.0.lib
vtkImagingStatistics-9.0.lib
vtkImagingStencil-9.0.lib
vtkInfovisCore-9.0.lib
vtkInfovisLayout-9.0.lib
vtkInteractionImage-9.0.lib
vtkInteractionStyle-9.0.lib
vtkInteractionWidgets-9.0.lib
vtkIOAMR-9.0.lib
vtkIOAsynchronous-9.0.lib
vtkIOCityGML-9.0.lib
vtkIOCore-9.0.lib
vtkIOEnSight-9.0.lib
vtkIOExodus-9.0.lib
vtkIOExport-9.0.lib
vtkIOExportGL2PS-9.0.lib
vtkIOExportPDF-9.0.lib
vtkIOGeometry-9.0.lib
vtkIOImage-9.0.lib
vtkIOImport-9.0.lib
vtkIOInfovis-9.0.lib
vtkIOLegacy-9.0.lib
vtkIOLSDyna-9.0.lib
vtkIOMINC-9.0.lib
vtkIOMotionFX-9.0.lib
vtkIOMovie-9.0.lib
vtkIONetCDF-9.0.lib
vtkIOOggTheora-9.0.lib
vtkIOParallel-9.0.lib
vtkIOParallelXML-9.0.lib
vtkIOPLY-9.0.lib
vtkIOSegY-9.0.lib
vtkIOSQL-9.0.lib
vtkIOTecplotTable-9.0.lib
vtkIOVeraOut-9.0.lib
vtkIOVideo-9.0.lib
vtkIOXML-9.0.lib
vtkIOXMLParser-9.0.lib
vtkjpeg-9.0.lib
vtkjsoncpp-9.0.lib
vtklibharu-9.0.lib
vtklibproj-9.0.lib
vtklibxml2-9.0.lib
vtkloguru-9.0.lib
vtklz4-9.0.lib
vtklzma-9.0.lib
vtkmetaio-9.0.lib
vtknetcdf-9.0.lib
vtkogg-9.0.lib
vtkParallelCore-9.0.lib
vtkParallelDIY-9.0.lib
vtkpng-9.0.lib
vtkpugixml-9.0.lib
vtkRenderingAnnotation-9.0.lib
vtkRenderingContext2D-9.0.lib
vtkRenderingContextOpenGL2-9.0.lib
vtkRenderingCore-9.0.lib
vtkRenderingFreeType-9.0.lib
vtkRenderingGL2PSOpenGL2-9.0.lib
vtkRenderingImage-9.0.lib
vtkRenderingLabel-9.0.lib
vtkRenderingLOD-9.0.lib
vtkRenderingOpenGL2-9.0.lib
vtkRenderingSceneGraph-9.0.lib
vtkRenderingUI-9.0.lib
vtkRenderingVolume-9.0.lib
vtkRenderingVolumeOpenGL2-9.0.lib
vtkRenderingVtkJS-9.0.lib
vtksqlite-9.0.lib
vtksys-9.0.lib
vtkTestingRendering-9.0.lib
vtktheora-9.0.lib
vtktiff-9.0.lib
vtkverdict-9.0.lib
vtkViewsContext2D-9.0.lib
vtkViewsCore-9.0.lib
vtkViewsInfovis-9.0.lib
vtkWrappingTools-9.0.lib
vtkzlib-9.0.lib
5. 使用 PCL的简单demo
常用点云模型下载网址:
随便下载一个点云文件,我这里下载的是bun_zipper.ply,小兔子ply格式的点云文件,所以程序里面将其转换为pcd格式的文件。
#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 pcl; using namespace pcl::io; int user_data; void viewerOneOff(pcl::visualization::PCLVisualizer& viewer) { viewer.setBackgroundColor(1.0, 0.5, 1.0); pcl::PointXYZ o; o.x = 1.0; o.y = 0; o.z = 0; //viewer.addSphere(o, 0.25, "sphere", 0); std::cout << "i only run once" << std::endl; } void viewerPsycho(pcl::visualization::PCLVisualizer& viewer) { static unsigned count = 0; std::stringstream ss; ss << "Once per viewer loop: " << count++; //viewer.removeShape("text", 0); //viewer.addText(ss.str(), 200, 300, "text", 0); //FIXME: possible race condition here: user_data++; } int main() { pcl::PLYReader reader; pcl::PointCloud<pcl::PointXYZ>::Ptr cloud1(new pcl::PointCloud<pcl::PointXYZ>); reader.read<pcl::PointXYZ>("data2\\bun_zipper.ply", *cloud1); pcl::io::savePCDFile("data2\\pointcloud.pcd", *cloud1); pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>); pcl::io::loadPCDFile("data2\\pointcloud.pcd", *cloud); pcl::visualization::CloudViewer viewer("Cloud Viewer"); //blocks until the cloud is actually rendered viewer.showCloud(cloud); //use the following functions to get access to the underlying more advanced/powerful //PCLVisualizer //This will only get called once viewer.runOnVisualizationThreadOnce(viewerOneOff); //This will get called once per visualization iteration viewer.runOnVisualizationThread(viewerPsycho); while (!viewer.wasStopped()) { //you can also do cool processing here //FIXME: Note that this is running in a separate thread from viewerPsycho //and you should guard against race conditions yourself... user_data++; } return 0; }
至此,你可以开展PCL的实践了,祝玩得愉快。
加载全部内容