win10+vs2017+PCL1.8.1配置过程及注意事项

 最近需要用到PCL库,在此把配置过程中需要注意的问题记录下来,配置过程中参考了很多博主,在此感谢他们的帮助。

pcl1.8.1的相关文件在这里  https://pan.baidu.com/s/1QdmWDlfTJBv18aPF88ynng   提取码:pen5 

rabbit.pcd文件在这里 链接:https://pan.baidu.com/s/1irrT_x2ebG01oENL7afqRw   提取码:l3x9 
 

我的路径是:E:\BaiduNetdiskDownload\pcl\PCL 1.8.1

1.安装PCL

(1)一定要选择 Add PCL to the system PATH for all user 

(2)在安装pcl的中途会跳出来openNI2的安装,最好把它安装在 E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\OpenNI2

(3)把下载的pbd压缩包解压,里面的pbd文件复制在 E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\bin

 

2.配置环境变量(5个):

我的电脑-右键属性-高级选项设置-环境变量-下面的系统变量中的PATH中添加以下路径:

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\bin;(这一项在选择了Add PCL to the system PATH for all user 就会自动产生)
E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\VTK\bin;
E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\FLANN\bin;
E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\Qhull\bin;
E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\OpenNI2\Tools;

 

3.vs的相关操作

(1)新建一个空项目,注意在这里选择Debug-x64 

(2)在解决方案资源管理器中,右键选择属性,在最上面的配置中选择Debug-x64 ,在VC++目录的包含目录库目录里分别添加以下对应项。

包含目录(7个):

E:\BaiduNetdiskDownload\pcl\PCL1.8.1\3rdParty\OpenNI2\Include;

E:\BaiduNetdiskDownload\pcl\PCL1.8.1\include\pcl-1.8;

E:\BaiduNetdiskDownload\pcl\PCL1.8.1\3rdParty\VTK\include\vtk-8.0;

E:\BaiduNetdiskDownload\pcl\PCL1.8.1\3rdParty\Qhull\include;

E:\BaiduNetdiskDownload\pcl\PCL1.8.1\3rdParty\FLANN\include;

E:\BaiduNetdiskDownload\pcl\PCL1.8.1\3rdParty\Eigen\eigen3;

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\Boost\include\boost-1_64;

库目录(6个):

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\OpenNI2\Lib;

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\VTK\lib;

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\Qhull\lib

;E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\FLANN\lib;

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\3rdParty\Boost\lib;

E:\BaiduNetdiskDownload\pcl\PCL 1.8.1\lib;


(4)在链接器-输入-附加依赖项中添加以下lib文件

附加依赖项:

debug版本
vtknetcdf_c++-gd.lib;pcl_common_debug.lib;pcl_features_debug.lib;pcl_filters_debug.lib;pcl_io_ply_debug.lib;pcl_io_debug.lib;pcl_kdtree_debug.lib;pcl_keypoints_debug.lib;pcl_ml_debug.lib;pcl_octree_debug.lib;pcl_outofcore_debug.lib;pcl_people_debug.lib;pcl_recognition_debug.lib;pcl_registration_debug.lib;pcl_sample_consensus_debug.lib;pcl_search_debug.lib;pcl_segmentation_debug.lib;pcl_stereo_debug.lib;pcl_surface_debug.lib;pcl_tracking_debug.lib;pcl_visualization_debug.lib;libboost_atomic-vc141-mt-gd-1_64.lib;libboost_bzip2-vc141-mt-gd-1_64.lib;libboost_chrono-vc141-mt-gd-1_64.lib;libboost_container-vc141-mt-gd-1_64.lib;libboost_context-vc141-mt-gd-1_64.lib;libboost_coroutine-vc141-mt-gd-1_64.lib;libboost_date_time-vc141-mt-gd-1_64.lib;libboost_exception-vc141-mt-gd-1_64.lib;libboost_fiber-vc141-mt-gd-1_64.lib;libboost_filesystem-vc141-mt-gd-1_64.lib;libboost_graph-vc141-mt-gd-1_64.lib;libboost_graph_parallel-vc141-mt-gd-1_64.lib;libboost_iostreams-vc141-mt-gd-1_64.lib;libboost_locale-vc141-mt-gd-1_64.lib;libboost_log-vc141-mt-gd-1_64.lib;libboost_log_setup-vc141-mt-gd-1_64.lib;libboost_math_c99-vc141-mt-gd-1_64.lib;libboost_math_c99f-vc141-mt-gd-1_64.lib;libboost_math_c99l-vc141-mt-gd-1_64.lib;libboost_math_tr1-vc141-mt-gd-1_64.lib;libboost_math_tr1f-vc141-mt-gd-1_64.lib;libboost_math_tr1l-vc141-mt-gd-1_64.lib;libboost_mpi-vc141-mt-gd-1_64.lib;libboost_numpy3-vc141-mt-gd-1_64.lib;libboost_numpy-vc141-mt-gd-1_64.lib;libboost_prg_exec_monitor-vc141-mt-gd-1_64.lib;libboost_program_options-vc141-mt-gd-1_64.lib;libboost_python3-vc141-mt-gd-1_64.lib;libboost_python-vc141-mt-gd-1_64.lib;libboost_random-vc141-mt-gd-1_64.lib;libboost_regex-vc141-mt-gd-1_64.lib;libboost_serialization-vc141-mt-gd-1_64.lib;libboost_signals-vc141-mt-gd-1_64.lib;libboost_system-vc141-mt-gd-1_64.lib;libboost_test_exec_monitor-vc141-mt-gd-1_64.lib;libboost_thread-vc141-mt-gd-1_64.lib;libboost_timer-vc141-mt-gd-1_64.lib;libboost_type_erasure-vc141-mt-gd-1_64.lib;libboost_unit_test_framework-vc141-mt-gd-1_64.lib;libboost_wave-vc141-mt-gd-1_64.lib;libboost_wserialization-vc141-mt-gd-1_64.lib;libboost_zlib-vc141-mt-gd-1_64.lib;flann-gd.lib;flann_cpp-gd.lib;flann_cpp_s-gd.lib;flann_s-gd.lib;qhull_d.lib;qhullcpp_d.lib;qhullstatic_d.lib;qhullstatic_r_d.lib;qhull_p_d.lib;qhull_r_d.lib;vtkalglib-8.0-gd.lib;vtkChartsCore-8.0-gd.lib;vtkCommonColor-8.0-gd.lib;vtkCommonComputationalGeometry-8.0-gd.lib;vtkCommonCore-8.0-gd.lib;vtkCommonDataModel-8.0-gd.lib;vtkCommonExecutionModel-8.0-gd.lib;vtkCommonMath-8.0-gd.lib;vtkCommonMisc-8.0-gd.lib;vtkCommonSystem-8.0-gd.lib;vtkCommonTransforms-8.0-gd.lib;vtkDICOMParser-8.0-gd.lib;vtkDomainsChemistry-8.0-gd.lib;vtkexoIIc-8.0-gd.lib;vtkexpat-8.0-gd.lib;vtkFiltersAMR-8.0-gd.lib;vtkFiltersCore-8.0-gd.lib;vtkFiltersExtraction-8.0-gd.lib;vtkFiltersFlowPaths-8.0-gd.lib;vtkFiltersGeneral-8.0-gd.lib;vtkFiltersGeneric-8.0-gd.lib;vtkFiltersGeometry-8.0-gd.lib;vtkFiltersHybrid-8.0-gd.lib;vtkFiltersHyperTree-8.0-gd.lib;vtkFiltersImaging-8.0-gd.lib;vtkFiltersModeling-8.0-gd.lib;vtkFiltersParallel-8.0-gd.lib;vtkFiltersParallelImaging-8.0-gd.lib;vtkFiltersPoints-8.0-gd.lib;vtkFiltersProgrammable-8.0-gd.lib;vtkFiltersSelection-8.0-gd.lib;vtkFiltersSMP-8.0-gd.lib;vtkFiltersSources-8.0-gd.lib;vtkFiltersStatistics-8.0-gd.lib;vtkFiltersTexture-8.0-gd.lib;vtkFiltersTopology-8.0-gd.lib;vtkFiltersVerdict-8.0-gd.lib;vtkfreetype-8.0-gd.lib;vtkGeovisCore-8.0-gd.lib;vtkgl2ps-8.0-gd.lib;vtkhdf5-8.0-gd.lib;vtkhdf5_hl-8.0-gd.lib;vtkImagingColor-8.0-gd.lib;vtkImagingCore-8.0-gd.lib;vtkImagingFourier-8.0-gd.lib;vtkImagingGeneral-8.0-gd.lib;vtkImagingHybrid-8.0-gd.lib;vtkImagingMath-8.0-gd.lib;vtkImagingMorphological-8.0-gd.lib;vtkImagingSources-8.0-gd.lib;vtkImagingStatistics-8.0-gd.lib;vtkImagingStencil-8.0-gd.lib;vtkInfovisCore-8.0-gd.lib;vtkInfovisLayout-8.0-gd.lib;vtkInteractionImage-8.0-gd.lib;vtkInteractionStyle-8.0-gd.lib;vtkInteractionWidgets-8.0-gd.lib;vtkIOAMR-8.0-gd.lib;vtkIOCore-8.0-gd.lib;vtkIOEnSight-8.0-gd.lib;vtkIOExodus-8.0-gd.lib;vtkIOExport-8.0-gd.lib;vtkIOExportOpenGL-8.0-gd.lib;vtkIOGeometry-8.0-gd.lib;vtkIOImage-8.0-gd.lib;vtkIOImport-8.0-gd.lib;vtkIOInfovis-8.0-gd.lib;vtkIOLegacy-8.0-gd.lib;vtkIOLSDyna-8.0-gd.lib;vtkIOMINC-8.0-gd.lib;vtkIOMovie-8.0-gd.lib;vtkIONetCDF-8.0-gd.lib;vtkIOParallel-8.0-gd.lib;vtkIOParallelXML-8.0-gd.lib;vtkIOPLY-8.0-gd.lib;vtkIOSQL-8.0-gd.lib;vtkIOTecplotTable-8.0-gd.lib;vtkIOVideo-8.0-gd.lib;vtkIOXML-8.0-gd.lib;vtkIOXMLParser-8.0-gd.lib;vtkjpeg-8.0-gd.lib;vtkjsoncpp-8.0-gd.lib;vtklibharu-8.0-gd.lib;vtklibxml2-8.0-gd.lib;vtklz4-8.0-gd.lib;vtkmetaio-8.0-gd.lib;vtkNetCDF-8.0-gd.lib;vtkoggtheora-8.0-gd.lib;vtkParallelCore-8.0-gd.lib;vtkpng-8.0-gd.lib;vtkproj4-8.0-gd.lib;vtkRenderingAnnotation-8.0-gd.lib;vtkRenderingContext2D-8.0-gd.lib;vtkRenderingContextOpenGL-8.0-gd.lib;vtkRenderingCore-8.0-gd.lib;vtkRenderingFreeType-8.0-gd.lib;vtkRenderingGL2PS-8.0-gd.lib;vtkRenderingImage-8.0-gd.lib;vtkRenderingLabel-8.0-gd.lib;vtkRenderingLIC-8.0-gd.lib;vtkRenderingLOD-8.0-gd.lib;vtkRenderingOpenGL-8.0-gd.lib;vtkRenderingVolume-8.0-gd.lib;vtkRenderingVolumeOpenGL-8.0-gd.lib;vtksqlite-8.0-gd.lib;vtksys-8.0-gd.lib;vtktiff-8.0-gd.lib;vtkverdict-8.0-gd.lib;vtkViewsContext2D-8.0-gd.lib;vtkViewsCore-8.0-gd.lib;vtkViewsInfovis-8.0-gd.lib;vtkzlib-8.0-gd.lib;
opengl32.lib

release版本

pcl_common_release.lib;pcl_features_release.lib;pcl_filters_release.lib;pcl_io_ply_release.lib;pcl_io_r.lease.lib;pcl_kdtree_release.lib;pcl_keypoints_release.lib;pcl_ml_release.lib;pcl_octree_release.lib;pcl_outofcore_release.lib;pcl_people_release.lib;pcl_recognition_release.lib;pcl_registration_release.lib;pcl_sample_consensus_release.lib;pcl_search_release.lib;pcl_segmentation_release.lib;pcl_stereo_release.lib;pcl_surface_release.lib;pcl_tracking_release.lib;pcl_visualization_release.lib;pcl_common_release.lib;pcl_features_release.lib;pcl_filters_release.lib;pcl_io_ply_release.lib;pcl_io_release.lib;pcl_kdtree_release.lib;pcl_keypoints_release.lib;pcl_ml_release.lib;pcl_octree_release.lib;pcl_outofcore_release.lib;pcl_people_release.lib;pcl_recognition_release.lib;pcl_registration_release.lib;pcl_sample_consensus_release.lib;pcl_search_release.lib;pcl_segmentation_release.lib;pcl_stereo_release.lib;pcl_surface_release.lib;pcl_tracking_release.lib;pcl_visualization_release.lib;libboost_atomic-vc141-mt-1_64.lib;libboost_bzip2-vc141-mt-1_64.lib;libboost_chrono-vc141-mt-1_64.lib;libboost_container-vc141-mt-1_64.lib;libboost_context-vc141-mt-1_64.lib;libboost_coroutine-vc141-mt-1_64.lib;libboost_date_time-vc141-mt-1_64.lib;libboost_exception-vc141-mt-1_64.lib;libboost_fiber-vc141-mt-1_64.lib;libboost_filesystem-vc141-mt-1_64.lib;libboost_graph-vc141-mt-1_64.lib;libboost_graph_parallel-vc141-mt-1_64.lib;libboost_iostreams-vc141-mt-1_64.lib;libboost_locale-vc141-mt-1_64.lib;libboost_log-vc141-mt-1_64.lib;libboost_log_setup-vc141-mt-1_64.lib;libboost_math_c99-vc141-mt-1_64.lib;libboost_math_c99f-vc141-mt-1_64.lib;libboost_math_c99l-vc141-mt-1_64.lib;libboost_math_tr1-vc141-mt-1_64.lib;libboost_math_tr1f-vc141-mt-1_64.lib;libboost_math_tr1l-vc141-mt-1_64.lib;libboost_mpi-vc141-mt-1_64.lib;libboost_numpy-vc141-mt-1_64.lib;libboost_numpy3-vc141-mt-1_64.lib;libboost_prg_exec_monitor-vc141-mt-1_64.lib;libboost_program_options-vc141-mt-1_64.lib;libboost_python-vc141-mt-1_64.lib;libboost_python3-vc141-mt-1_64.lib;libboost_random-vc141-mt-1_64.lib;libboost_regex-vc141-mt-1_64.lib;libboost_serialization-vc141-mt-1_64.lib;libboost_signals-vc141-mt-1_64.lib;libboost_system-vc141-mt-1_64.lib;libboost_test_exec_monitor-vc141-mt-1_64.lib;libboost_thread-vc141-mt-1_64.lib;libboost_timer-vc141-mt-1_64.lib;libboost_type_erasure-vc141-mt-1_64.lib;libboost_unit_test_framework-vc141-mt-1_64.lib;libboost_wave-vc141-mt-1_64.lib;libboost_wserialization-vc141-mt-1_64.lib;libboost_zlib-vc141-mt-1_64.lib;libboost_atomic-vc141-mt-1_64.lib;libboost_bzip2-vc141-mt-1_64.lib;libboost_chrono-vc141-mt-1_64.lib;libboost_container-vc141-mt-1_64.lib;libboost_context-vc141-mt-1_64.lib;libboost_coroutine-vc141-mt-1_64.lib;libboost_date_time-vc141-mt-1_64.lib;libboost_exception-vc141-mt-1_64.lib;libboost_fiber-vc141-mt-1_64.lib;libboost_filesystem-vc141-mt-1_64.lib;libboost_graph-vc141-mt-1_64.lib;libboost_graph_parallel-vc141-mt-1_64.lib;libboost_iostreams-vc141-mt-1_64.lib;libboost_locale-vc141-mt-1_64.lib;libboost_log-vc141-mt-1_64.lib;libboost_log_setup-vc141-mt-1_64.lib;libboost_math_c99-vc141-mt-1_64.lib;libboost_math_c99f-vc141-mt-1_64.lib;libboost_math_c99l-vc141-mt-1_64.lib;libboost_math_tr1-vc141-mt-1_64.lib;libboost_math_tr1f-vc141-mt-1_64.lib;libboost_math_tr1l-vc141-mt-1_64.lib;libboost_mpi-vc141-mt-1_64.lib;libboost_numpy-vc141-mt-1_64.lib;libboost_numpy3-vc141-mt-1_64.lib;libboost_prg_exec_monitor-vc141-mt-1_64.lib;libboost_program_options-vc141-mt-1_64.lib;libboost_python-vc141-mt-1_64.lib;libboost_python3-vc141-mt-1_64.lib;libboost_random-vc141-mt-1_64.lib;libboost_regex-vc141-mt-1_64.lib;libboost_serialization-vc141-mt-1_64.lib;libboost_signals-vc141-mt-1_64.lib;libboost_system-vc141-mt-1_64.lib;libboost_test_exec_monitor-vc141-mt-1_64.lib;libboost_thread-vc141-mt-1_64.lib;libboost_timer-vc141-mt-1_64.lib;libboost_type_erasure-vc141-mt-1_64.lib;libboost_unit_test_framework-vc141-mt-1_64.lib;libboost_wave-vc141-mt-1_64.lib;libboost_wserialization-vc141-mt-1_64.lib;libboost_zlib-vc141-mt-1_64.lib;OpenNI2.lib;vtkalglib-8.0.lib;vtkChartsCore-8.0.lib;vtkCommonColor-8.0.lib;vtkCommonComputationalGeometry-8.0.lib;vtkCommonCore-8.0.lib;vtkCommonDataModel-8.0.lib;vtkCommonExecutionModel-8.0.lib;vtkCommonMath-8.0.lib;vtkCommonMisc-8.0.lib;vtkCommonSystem-8.0.lib;vtkCommonTransforms-8.0.lib;vtkDICOMParser-8.0.lib;vtkDomainsChemistry-8.0.lib;vtkexoIIc-8.0.lib;vtkexpat-8.0.lib;vtkFiltersAMR-8.0.lib;vtkFiltersCore-8.0.lib;vtkFiltersExtraction-8.0.lib;vtkFiltersFlowPaths-8.0.lib;vtkFiltersGeneral-8.0.lib;vtkFiltersGeneric-8.0.lib;vtkFiltersGeometry-8.0.lib;vtkFiltersHybrid-8.0.lib;vtkFiltersHyperTree-8.0.lib;vtkFiltersImaging-8.0.lib;vtkFiltersModeling-8.0.lib;vtkFiltersParallel-8.0.lib;vtkFiltersParallelImaging-8.0.lib;vtkFiltersPoints-8.0.lib;vtkFiltersProgrammable-8.0.lib;vtkFiltersSelection-8.0.lib;vtkFiltersSMP-8.0.lib;vtkFiltersSources-8.0.lib;vtkFiltersStatistics-8.0.lib;vtkFiltersTexture-8.0.lib;vtkFiltersTopology-8.0.lib;vtkFiltersVerdict-8.0.lib;vtkfreetype-8.0.lib;vtkGeovisCore-8.0.lib;vtkgl2ps-8.0.lib;vtkhdf5-8.0.lib;vtkhdf5_hl-8.0.lib;vtkImagingColor-8.0.lib;vtkImagingCore-8.0.lib;vtkImagingFourier-8.0.lib;vtkImagingGeneral-8.0.lib;vtkImagingHybrid-8.0.lib;vtkImagingMath-8.0.lib;vtkImagingMorphological-8.0.lib;vtkImagingSources-8.0.lib;vtkImagingStatistics-8.0.lib;vtkImagingStencil-8.0.lib;vtkInfovisCore-8.0.lib;vtkInfovisLayout-8.0.lib;vtkInteractionImage-8.0.lib;vtkInteractionStyle-8.0.lib;vtkInteractionWidgets-8.0.lib;vtkIOAMR-8.0.lib;vtkIOCore-8.0.lib;vtkIOEnSight-8.0.lib;vtkIOExodus-8.0.lib;vtkIOExport-8.0.lib;vtkIOExportOpenGL-8.0.lib;vtkIOGeometry-8.0.lib;vtkIOImage-8.0.lib;vtkIOImport-8.0.lib;vtkIOInfovis-8.0.lib;vtkIOLegacy-8.0.lib;vtkIOLSDyna-8.0.lib;vtkIOMINC-8.0.lib;vtkIOMovie-8.0.lib;vtkIONetCDF-8.0.lib;vtkIOParallel-8.0.lib;vtkIOParallelXML-8.0.lib;vtkIOPLY-8.0.lib;vtkIOSQL-8.0.lib;vtkIOTecplotTable-8.0.lib;vtkIOVideo-8.0.lib;vtkIOXML-8.0.lib;vtkIOXMLParser-8.0.lib;vtkjpeg-8.0.lib;vtkjsoncpp-8.0.lib;vtklibharu-8.0.lib;vtklibxml2-8.0.lib;vtklz4-8.0.lib;vtkmetaio-8.0.lib;vtkNetCDF-8.0.lib;vtknetcdf_c++.lib;vtkoggtheora-8.0.lib;vtkParallelCore-8.0.lib;vtkpng-8.0.lib;vtkproj4-8.0.lib;vtkRenderingAnnotation-8.0.lib;vtkRenderingContext2D-8.0.lib;vtkRenderingContextOpenGL-8.0.lib;vtkRenderingCore-8.0.lib;vtkRenderingFreeType-8.0.lib;vtkRenderingGL2PS-8.0.lib;vtkRenderingImage-8.0.lib;vtkRenderingLabel-8.0.lib;vtkRenderingLIC-8.0.lib;vtkRenderingLOD-8.0.lib;vtkRenderingOpenGL-8.0.lib;vtkRenderingVolume-8.0.lib;vtkRenderingVolumeOpenGL-8.0.lib;vtksqlite-8.0.lib;vtksys-8.0.lib;vtktiff-8.0.lib;vtkverdict-8.0.lib;vtkViewsContext2D-8.0.lib;vtkViewsCore-8.0.lib;vtkViewsInfovis-8.0.lib;vtkzlib-8.0.lib;vtkalglib-8.0.lib;vtkChartsCore-8.0.lib;vtkCommonColor-8.0.lib;vtkCommonComputationalGeometry-8.0.lib;vtkCommonCore-8.0.lib;vtkCommonDataModel-8.0.lib;vtkCommonExecutionModel-8.0.lib;vtkCommonMath-8.0.lib;vtkCommonSystem-8.0.lib;vtkCommonTransforms-8.0.lib;vtkDICOMParser-8.0.lib;vtkDomainsChemistry-8.0.lib;vtkexoIIc-8.0.lib;vtkexpat-8.0.lib;vtkFiltersAMR-8.0.lib;vtkFiltersCore-8.0.lib;vtkFiltersExtraction-8.0.lib;vtkFiltersFlowPaths-8.0.lib;vtkFiltersGeneral-8.0.lib;vtkFiltersGeneric-8.0.lib;vtkFiltersGeometry-8.0.lib;vtkFiltersHybrid-8.0.lib;vtkFiltersHyperTree-8.0.lib;vtkFiltersImaging-8.0.lib;vtkFiltersModeling-8.0.lib;vtkFiltersParallel-8.0.lib;vtkFiltersParallelImaging-8.0.lib;vtkFiltersPoints-8.0.lib;vtkFiltersProgrammable-8.0.lib;vtkFiltersSelection-8.0.lib;vtkFiltersSMP-8.0.lib;vtkFiltersSources-8.0.lib;vtkFiltersStatistics-8.0.lib;vtkFiltersTexture-8.0.lib;vtkFiltersTopology-8.0.lib;vtkFiltersVerdict-8.0.lib;vtkfreetype-8.0.lib;vtkGeovisCore-8.0.lib;vtkgl2ps-8.0.lib;vtkhdf5-8.0.lib;vtkhdf5_hl-8.0.lib;vtkImagingColor-8.0.lib;vtkImagingCore-8.0.lib;vtkImagingFourier-8.0.lib;vtkImagingGeneral-8.0.lib;vtkImagingHybrid-8.0.lib;vtkImagingMath-8.0.lib;vtkImagingMorphological-8.0.lib;vtkImagingSources-8.0.lib;vtkImagingStatistics-8.0.lib;vtkImagingStencil-8.0.lib;vtkInfovisCore-8.0.lib;vtkInfovisLayout-8.0.lib;vtkInteractionImage-8.0.lib;vtkInteractionStyle-8.0.lib;vtkInteractionWidgets-8.0.lib;vtkIOAMR-8.0.lib;vtkIOCore-8.0.lib;vtkIOEnSight-8.0.lib;vtkIOExodus-8.0.lib;vtkIOExport-8.0.lib;vtkIOExportOpenGL-8.0.lib;vtkIOGeometry-8.0.lib;vtkIOImage-8.0.lib;vtkIOImport-8.0.lib;vtkIOInfovis-8.0.lib;vtkIOLegacy-8.0.lib;vtkIOLSDyna-8.0.lib;vtkIOMINC-8.0.lib;vtkIOMovie-8.0.lib;vtkIONetCDF-8.0.lib;vtkIOParallel-8.0.lib;vtkIOParallelXML-8.0.lib;vtkIOPLY-8.0.lib;vtkIOSQL-8.0.lib;vtkIOTecplotTable-8.0.lib;vtkIOVideo-8.0.lib;vtkIOXML-8.0.lib;vtkIOXMLParser-8.0.lib;vtkjpeg-8.0.lib;vtkjsoncpp-8.0.lib;vtklibharu-8.0.lib;vtklibxml2-8.0.lib;vtklz4-8.0.lib;vtkmetaio-8.0.lib;vtkNetCDF-8.0.lib;vtknetcdf_c++.lib;vtkoggtheora-8.0.lib;vtkParallelCore-8.0.lib;vtkpng-8.0.lib;vtkproj4-8.0.lib;vtkRenderingAnnotation-8.0.lib;vtkRenderingContext2D-8.0.lib;vtkRenderingContextOpenGL-8.0.lib;vtkRenderingCore-8.0.lib;vtkRenderingFreeType-8.0.lib;vtkRenderingGL2PS-8.0.lib;vtkRenderingImage-8.0.lib;vtkRenderingLabel-8.0.lib;vtkRenderingLIC-8.0.lib;vtkRenderingLOD-8.0.lib;vtkRenderingOpenGL-8.0.lib;vtkRenderingVolume-8.0.lib;vtkRenderingVolumeOpenGL-8.0.lib;vtksqlite-8.0.lib;vtksys-8.0.lib;vtktiff-8.0.lib;vtkverdict-8.0.lib;vtkViewsContext2D-8.0.lib;vtkViewsCore-8.0.lib;vtkViewsInfovis-8.0.lib;vtkzlib-8.0.lib;qhull_p.lib;qhull_r.lib;qhull.lib;qhullcpp.lib;qhullstatic.lib;qhullstatic_r.lib;flann.lib;flann_cpp.lib;flann_cpp_s.lib;flann_s.lib;flann.lib;flann_cpp.lib;flann_cpp_s.lib;flann_s.lib;

 

4.安装配置

在源文件在新建一个cpp文件,把下列代码复制进去,把rabbit(文章开头放了免费的百度云链接)和源cpp文件放在同一路径下。

#include <pcl/visualization/cloud_viewer.h>
#include <iostream>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingFreeType);
VTK_MODULE_INIT(vtkRenderingOpenGL);
 
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::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>);
    pcl::io::loadPCDFile("rabbit.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;
}

如果配置成功的话,便会出现如下界面:

   在配置过程中不同的电脑可能会遇到不同的问题,我帮其他两个同学配置,一样的操作步骤但是却都出现了不同的问题,在此不要忘记百度大法,一般都能得到解决。

     这是进实验室一开始定的方向,后来很快老师就给换了,本人也只接触了一周。配置时遇到的很多问题都忘记了,评论里问题都没办法帮大家,不好意思。

关于错误C4996的问题

在属性页 - C/C++ - 高级 - 禁用特定警告中写上C4996

 

 

  • 23
    点赞
  • 134
    收藏
    觉得还不错? 一键收藏
  • 84
    评论
搭建点云开发环境需要安装以下软件: 1. Visual Studio 2017:用于编写C++代码。 2. Qt 5.10.1:用于构建GUI界面。 3. PCL 1.8.1:点云库。 4. VTK 8.0:用于可视化点云数据。 以下是具体的步骤: 1. 安装 Visual Studio 2017,选择 C++ 工作负载。此外,还需要安装 CMake。 2. 下载 Qt 5.10.1 安装包并安装。需要安装的组件有:Qt 5.10.1 MSVC2017 64-bit、Qt Visual Studio Tools、Qt Charts 和 Qt Data Visualization。 3. 下载 PCL 1.8.1 for Windows,并解压到一个目录下。 4. 下载 VTK 8.0 for Windows,并解压到一个目录下。 5. 打开 CMake,设置源代码路径为 PCL 的根目录,设置构建路径为一个新的目录(例如:PCL_build)。点击 Configure,选择 Visual Studio 15 2017 Win64 作为生成器,点击 Finish。 6. 在 CMake 中,找到 VTK_DIR 设置项,将其设置为 VTK 的安装目录(例如:D:/VTK-8.0.0/build)。点击 Configure,然后点击 Generate。 7. 打开 Visual Studio 2017,选择 File > New > Project,选择 Qt Widgets Application。设置项目名称、位置和解决方案名称,然后点击 Create。 8. 在项目属性中,选择 C/C++ > General,将 Additional Include Directories 设置为 PCL 的 include 目录(例如:D:/PCL-1.8.1/include/pcl-1.8)和 VTK 的 include 目录(例如:D:/VTK-8.0.0/include/vtk-8.0)。 9. 在项目属性中,选择 Linker > General,将 Additional Library Directories 设置为 PCL 的 lib 目录(例如:D:/PCL-1.8.1/lib)和 VTK 的 lib 目录(例如:D:/VTK-8.0.0/build/bin/Release)。 10. 在项目属性中,选择 Linker > Input,将 Additional Dependencies 设置为以下库:pcl_common_release.lib、pcl_io_ply_release.lib、pcl_visualization_release.lib、vtkCommonCore-8.0.lib、vtkFiltersCore-8.0.lib、vtkInteractionStyle-8.0.lib、vtkRenderingCore-8.0.lib。 11. 编写代码并构建项目,即可开始点云开发。 以上是在 Windows 10、Visual Studio 2017、Qt 5.10.1、PCL 1.8.1 和 VTK 8.0 环境下的点云开发环境搭建步骤。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 84
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值